Android Question MapView - Strange behavior

AlpVir

Well-Known Member
Licensed User
Longtime User
I use GNSS and OSMDroid libraries and Mapview in 2 separate activity.
In the first I use the event
Sub GNSS_LocationChanged (Location1 As Location)
but instead of taking into account the coordinates provided by the GPS, I read other coordinates relating to another place from a database and write them to a file TXT.
In the second I read the file TXT and draw the track on the MapView map (I use OSMDroid).
However, after the quick drawing of the track on the map, Mapview positions itself in the center of the place where I physically am and not where I would like with the instruction MapView1.SetCenter(LastLatitude, LastLongitude) as I would like.
Even if I move the map with my finger, I can go and view the track, but after a few seconds MapView1 returns to being centered on my house.
How to remedy this defect?
 
Top