Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mapbox-gl-qml
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian On Mobile
puremaps
mapbox-gl-qml
Commits
d779691b
Commit
d779691b
authored
2 years ago
by
Rinigus
Browse files
Options
Downloads
Patches
Plain Diff
Add LineString as a Feature if it is empty
parent
21e647eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/qquickitemmapboxgl.cpp
+11
-0
11 additions, 0 deletions
src/qquickitemmapboxgl.cpp
with
11 additions
and
0 deletions
src/qquickitemmapboxgl.cpp
+
11
−
0
View file @
d779691b
...
...
@@ -780,6 +780,17 @@ void QQuickItemMapboxGL::updateSourceLine(const QString &sourceID, const QVarian
{
QVariantList
coor
;
// Mapbox geojson-hpp requires at least 2 points for a line. As a result, source addition or update
// will fail unless it is imported as an empty feature - done by the point import.
// Related issue: https://github.com/rinigus/pure-maps/issues/639
if
(
coordinates
.
size
()
<
2
)
{
QVariantList
names
;
for
(
int
i
=
0
;
i
<
coordinates
.
size
();
++
i
)
names
.
append
(
name
);
updateSourcePoints
(
sourceID
,
coordinates
,
names
);
return
;
}
for
(
int
i
=
0
;
i
<
coordinates
.
size
();
++
i
)
{
QGeoCoordinate
c
=
coordinates
[
i
].
value
<
QGeoCoordinate
>
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment