This is some kind of a hack-ish solution, but after the fitBounds
, you could zoom one level out, so you get enough padding for your markers.
Assume map
variable is your reference to the map object;
map.setZoom(map.getZoom() - 1);
More Related Contents:
- Google Maps Api v3 – find nearest markers
- Google Maps API: No ‘Access-Control-Allow-Origin’ header is present on the requested resource
- How to use SVG markers in Google Maps API v3
- Google Maps API OVER QUERY LIMIT per second limit
- Google Map API – Removing Markers
- Google Maps V3 – How to calculate the zoom level for a given bounds
- ERROR: Google Maps API error: MissingKeyMapError
- Google Map Infowindow not showing properly
- Google Maps API to get bus route
- This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console
- How to get the center of a polygon in google maps v3?
- Exceed 23 waypoint per request limit on Google Directions API (Business/Work level)
- Google maps Marker Label with multiple characters
- How can I change the color of a Google Maps marker?
- Decoding the Google Maps embedded parameters
- google.maps.Geocoder.geocode() geometry.location lat/lng property names change frequently
- Country specific zoom level in Google Maps API
- Google Maps API v3 | shows no map data
- How do I remove default markers?
- Is it possible to get an address from coordinates using google maps?
- Google Maps API Polygon with “Hole” In Center
- Google Maps Multiple markers with the exact same location Not working
- Google static maps with directions
- Do not change map center or zoom level when rendering directions
- Box/Rectangle Draw Selection in Google Maps
- An elegant way to find shortest and fastest route in Google Maps API v3?
- Is it possible to write custom text on Google Maps API v3?
- GoogleMaps v3 API Create only 1 marker on click
- Google Maps, open info window after click on a link
- Google map driving direction source code for their example?