osmbonuspack
osmbonuspack copied to clipboard
position marker following the route(polyline) like google maps
Hi! MKergall thank you very much for this greate library. Curently im creating navigation app with speedcameras detection. I have most of the stuff already working i have few question regarding improving user experiance.
- When in google maps you set the road, somehow position marker is following exactly the route (polyline), it seems like some kind of snap algorythm. Is there something like this implemented in osmdroid/osmbonuspack ? If not could you give me some guidelines how to do it ?
- I'm using animateTo() to follow current location and move the map, position marker is just static imageView on the map. It works fairly good, although it has an effect of - animating to next gps location, stoping for half of second and animating again to new gps location. I would like to remove that effect of stopping for short period of time by increasing animation lenght, unfortunatelly parameter 'animation lenght' in animateTo() doesnt do the trick. Seems like at some point current position is just stopping to move and loosing real position. I did animated marker which is moving on the map following next gps position and it works good, i could do the same with setCenter, setMapRotation but maybe i'm just doing something wrong with animateTo?
Thank you very much
See OsmDroid demo app's 10K race in Paris
under the Data
section at play.google.com/store/apps/details?id=org.osmdroid. The source code for the demo can be found here
https://github.com/osmdroid/osmdroid/blob/master/OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/data/SampleRace.java
https://www.youtube.com/shorts/nl3AB052_tE
This is great. thanks
See OsmDroid demo app's
10K race in Paris
under theData
section at play.google.com/store/apps/details?id=org.osmdroid. The source code for the demo can be found here https://github.com/osmdroid/osmdroid/blob/master/OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/data/SampleRace.javahttps://www.youtube.com/shorts/nl3AB052_tE
So I'm following examples in order to make border color around roadoverlay. I got it to work but since its two paints above each other if my roadOverlay is long (has many Geopoints) it's making app laggy. Is there any workaround available ? Thanks
you can simplify your route with the DouglasPeucker reducer (PointReducer class).
Thank you, it helped.
Another question. I'm using custom tiles generated in mobac (.sqlite). It's entire map of country - weight 27GB divided into 12 files. Although tiles are loading slower than the one using internet directly (from cache) from OSM tile server. Files are inside of device internal memory. When im using animate to from lower zoom to (10) to lower zoom (18) mostly after zoom i get white screen and tiles are slowly loading one by one (around 3 seconds loading time ). Is it normal ?
I'm using this for offline tiles.
map.setTileSource((new XYTileSource( "Ecuador", 6, 19, 256, ".png", new String[] {} )));
Is it possible to archive following effect: When using animateTo while zooming in - tiles from lower level stays on the screen and new tiles are beeing loaded on top of them ? This would atleast remove ugly effect of white squares
Hi! @Ostreey
Can you please tell me how you were able to animate/move the marker along the polyline generated between 2 geopoints? I have looked into the 10K Race in Paris example but I am not quite getting it.
Thanks!