iOS Question googleMap camera change ondrag

cloner7801

Active Member
Licensed User
Longtime User
Hi ,
I get markers with GetVisibleBounds and send NE and SW to my url to get markers
But camera change sub update NE and SW with every change
How can I get bounds when on drag the map and send request to my url
 

cloner7801

Active Member
Licensed User
Longtime User
Handle the CameraChange event and do whatever you need to do. It is probably not a good idea to send a request with every change. I would have instead waited for the movement to complete and only then make the update.
How can I know movement is completed?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. Add a global int variable named CameraChangedIndex.

2.
B4X:
Sub gmap_CameraChange (Position As CameraPosition)
   CameraChangedIndex = CameraChangedIndex + 1
   Dim MyIndex As Int = CameraChangedIndex
   Sleep(200)
   If MyIndex = CameraChangedIndex Then
       Log("Finished moving for now!")
   End If
End Sub
 
Upvote 0
Top