View Single Post
Posts: 339 | Thanked: 1,623 times | Joined on Oct 2013 @ France
#67
Originally Posted by rinigus View Post
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)
Really good so far !

So far, I had only be playing with your demo app, making some changes here and there to so see what it could do, but I have now started to work on a real use case of the qml map. I will push it later on Github.

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:
Code:
Behavior on zoomLevel { NumberAnimation { duration: 1000 } }
Behavior on pitch { NumberAnimation { duration: 1000 }  }
While testing the map dynamic behavior, In the timer that update the location source, I added:
Code:
map.center = QtPositioning.coordinate(60.16 +  0.01*Math.sin(angle), 24.94 + 0.01*Math.cos(angle))
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 ?

My next step is to allow OSRM to update the route it added previously, which shouldn't be too hard.
 

The Following 2 Users Say Thank You to Zeta For This Useful Post: