I'm currently developing an app for Android which uses google map service. Because users will be able to see thousands of markers I would like to load only those which are currently within the map bounds (i.e. when user look at specific map tile). I know how to do it with javascript/html. However, Android doesn't seem to provide any similar methods such as containsLatLng(latlng) or getBounds (I only found getLatitudeSpan and getLongitudeSpan, but don't know how can I use them in order to achieve the similar effect).
Can anyone give me some hint on that? I would greatly appreciate any help or at least pointing myself in the right direction.
You could use getMapCenter and just add or subtract the latitude span or longitude span (divided by 2 of course) to find the bounds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With