Here are some points:
So, how to get the list of all visible markers on the current zoom level? I've searched over the internet and didn't find something useful. Some kind of what I'm trying to achieve could be found here
The Google Maps API provides map tiles at various zoom levels for map type imagery. Most roadmap imagery is available from zoom levels 0 to 18, for example. Satellite imagery varies more widely as this imagery is not generated, but directly photographed.
The app does this because you're not in navigation mode, you're browsing the route. It zooms out to fit the entire route on your screen when you reorient the device. If you don't want it to zoom, press the navigation button in the lower right corner and optionally switch off voice navigation.
In Google Maps JavaScript API V3 we can use something like this:
let markers let map let bounds = map.getBounds() markers.filter(m => m.isAdded).forEach(m => { if (bounds.contains(m.getPosition())) { // code for showing your object, associated with current marker } })
Use GMap2.getBounds()
to find the bounding box. The use GLatLngBounds.containsLatLng()
to check each marker to see if it is visible.
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