![]() |
2017-09-22
, 06:22
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#61
|
The Following User Says Thank You to rinigus For This Useful Post: | ||
![]() |
2017-09-22
, 08:04
|
Posts: 1,548 |
Thanked: 7,510 times |
Joined on Apr 2010
@ Czech Republic
|
#62
|
MartinK: I guess we'll get back to your post when the elementary support for adding objects is there
![]() |
2017-09-22
, 17:45
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#63
|
![]() |
2017-09-22
, 22:38
|
Posts: 300 |
Thanked: 962 times |
Joined on Jun 2010
@ USA
|
#64
|
![]() |
2017-09-22
, 23:25
|
Posts: 339 |
Thanked: 1,623 times |
Joined on Oct 2013
@ France
|
#65
|
@Zeta: the first version with the support for updating the map with the sources, layers, ... is out in github repo. You are very welcome to test it, I haven't had a chance to do it myself. Current interface is at qquickitemmapboxgl.h - I will continue adding missing methods and then would be able to test as well.
![]() |
2017-09-23
, 18:06
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#66
|
Looking good!
I can see some polyline drawn over helsinki, in a white dash-dot pattern, if that was what you expected.
I tried some changes, and I succeeded in generating this polyline data from C++ (as a QVariantMap with the geojson data), then adding it on the map layer on the QML side.
I will try to do it with a real route, as would be generated by OSRM or another routing engine, to have something more complex than what I have done by hand and see if it breaks at some level. And then make the connections so that changes on the route are updated on the map.
![]() |
2017-09-24
, 17:12
|
Posts: 339 |
Thanked: 1,623 times |
Joined on Oct 2013
@ France
|
#67
|
Zeta, just updated demo program for desktop. I'll add some simper API for adding and altering points as well as look on how to get integration between other widgets and the map (have some ideas already)
Behavior on zoomLevel { NumberAnimation { duration: 1000 } } Behavior on pitch { NumberAnimation { duration: 1000 } }
map.center = QtPositioning.coordinate(60.16 + 0.01*Math.sin(angle), 24.94 + 0.01*Math.cos(angle))
The Following 2 Users Say Thank You to Zeta For This Useful Post: | ||
![]() |
2017-09-24
, 18:35
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#68
|
Really good so far !
So, some quick comments:
I have easily taken OSRM route output (as GeoJson) and added it as a new layer on the fly.
Adding a geoJson route of 1800 points (corresponding to the "full" output option of OSRM for a route of a bit more than 100 km), doesn't introduce visible slowdown on PC. I am downloading the full France PBF to make tests with longer routes (a thousand km is possible through France).
Behaviors on zoom and pitch properties are working great !
Adding those lines allows to switch from a route overview to a car-like navigation view seemlessly:
While testing the map dynamic behavior, In the timer that update the location source, I added:Code:Behavior on zoomLevel { NumberAnimation { duration: 1000 } } Behavior on pitch { NumberAnimation { duration: 1000 } }That way the map follows the location point, but I noticed that at high zoom levels, we can see the location point being updated before the map is centered on it, which then put back the location circle in the center. I am not sure how that glitch could/should be avoided, but maybe something to block map redraw while updating a bunch of properties and enabling it later would be the correct way ? There maybe already something in place ?Code:map.center = QtPositioning.coordinate(60.16 + 0.01*Math.sin(angle), 24.94 + 0.01*Math.cos(angle))
My next step is to allow OSRM to update the route it added previously, which shouldn't be too hard.
![]() |
2017-09-25
, 07:20
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#69
|
![]() |
2017-09-25
, 19:32
|
|
Posts: 141 |
Thanked: 1,530 times |
Joined on May 2011
@ Finland
|
#70
|