rwblinn Well-Known Member Licensed User Longtime User Jan 11, 2016 #1 Hi, when building a google map first time, with two markers, the markers are displayed multiple times (see picture). By clicking on zoom, the map gets refreshed and the two markers are displayed correctly. When rebuilding the map again with different markers, the markers are build correctly. Have tried to init the cameraposition twice with different zoomlevels, but that did not solve the issue. Any ideas?
Hi, when building a google map first time, with two markers, the markers are displayed multiple times (see picture). By clicking on zoom, the map gets refreshed and the two markers are displayed correctly. When rebuilding the map again with different markers, the markers are build correctly. Have tried to init the cameraposition twice with different zoomlevels, but that did not solve the issue. Any ideas?
eurojam Well-Known Member Licensed User Longtime User Jan 11, 2016 #2 Hi Rob, do you have a code fraqment to reproduce that? best stefan Upvote 0
rwblinn Well-Known Member Licensed User Longtime User Jan 12, 2016 #3 Hi, Via trial-and-error solved by setting the cameraposition twice with different zoom levels. Code: Copy ... Utils.SetCameraPostion(MapTrack, llStart.Latitude, llStart.Longitude, ZoomLevel / 4) Utils.SetCameraPostion(MapTrack, llStart.Latitude, llStart.Longitude, ZoomLevel) ... Defined in a Utils Module Code: Copy #If B4J Sub SetCameraPostion(mMap As GoogleMap, mLat As Double, mLon As Double, mZoomLevel As Float) Log("SetCameraposition: Zoomlevel=" & mZoomLevel) Dim cp As CameraPosition cp.Initialize(mLat, mLon, mZoomLevel) mMap.MoveCamera(cp) End Sub #End If Upvote 0
Hi, Via trial-and-error solved by setting the cameraposition twice with different zoom levels. Code: Copy ... Utils.SetCameraPostion(MapTrack, llStart.Latitude, llStart.Longitude, ZoomLevel / 4) Utils.SetCameraPostion(MapTrack, llStart.Latitude, llStart.Longitude, ZoomLevel) ... Defined in a Utils Module Code: Copy #If B4J Sub SetCameraPostion(mMap As GoogleMap, mLat As Double, mLon As Double, mZoomLevel As Float) Log("SetCameraposition: Zoomlevel=" & mZoomLevel) Dim cp As CameraPosition cp.Initialize(mLat, mLon, mZoomLevel) mMap.MoveCamera(cp) End Sub #End If
jmon Well-Known Member Licensed User Longtime User Jan 14, 2016 #4 Yes I think that's a Web view refresh bug. There is the same bug if you delete the markers they still appear until you zoom out. Upvote 0
Yes I think that's a Web view refresh bug. There is the same bug if you delete the markers they still appear until you zoom out.
Magma Expert Licensed User Longtime User Jul 28, 2017 #5 Just found a better solution !!!!! USE .visible /// first false / then change position / then make it visible again!!!! Code: Copy Sub bam_tick boom.Enabled=False mark(hr).Visible=false Dim NewPosition As LatLng NewPosition.Initialize(ooo,15) ooo=10+NewPosition.Latitude+0.0001 m(1).Position=NewPosition Sleep(50) mark(hr).Visible=True boom.Enabled=True End Sub YES! Upvote 0
Just found a better solution !!!!! USE .visible /// first false / then change position / then make it visible again!!!! Code: Copy Sub bam_tick boom.Enabled=False mark(hr).Visible=false Dim NewPosition As LatLng NewPosition.Initialize(ooo,15) ooo=10+NewPosition.Latitude+0.0001 m(1).Position=NewPosition Sleep(50) mark(hr).Visible=True boom.Enabled=True End Sub YES!