PHP5 PHP5 - 4 months ago 16x
Android Question

The best way to load markers which are only visible on the screen (Android)?

I have a Database wich stores a lot of markers and i am developping an application on android which includes Google Maps Android V2.

I have been searching a method to load not all markers wich are stored in this database but only those are visible on the screen but nothing found, how could i do it please ?


I don't think there will be a way to do this in bulk, you'll have to operate on each marker one at a time. Get the bounds of the map area on screen: Android Google Maps get Boundary Co-ordinates and then use that LatLngBounds to check the LatLng of each marker to see if you want to display it or not.