Thread
: [SailfishOS]
Mapbox GL Native QML plugin
View Single Post
rinigus
2018-01-17 , 07:00
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#
65
Originally Posted by
piggz
@rinigus How can I add 'google encoded polyline' to the mapbox widget?
@piggz, you would have to decode it first. Usually, you want to do something with the polyline in addition to showing it. So, I would expect that you would have to decode it anyway and there is no need to add support for decoding into the widget. Unless you have a good use-case where there is no need for decoding and you think that the functionality should be provided by the widget.
So, as soon as it is decoded (there are codes around), add it to the widget as a source using addSourceLine (example commented out at
https://github.com/rinigus/mapbox-gl.../main.qml#L260
), add layer using addLayer and set its properties (see
https://github.com/rinigus/mapbox-gl.../main.qml#L262
and below)
Quote & Reply
|
The Following 3 Users Say Thank You to rinigus For This Useful Post:
imaginaryenemy
,
juiceme
,
P@t
rinigus
View Public Profile
Send a private message to rinigus
Find all posts by rinigus