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
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.
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.
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