0

I got a simple map with 2 markers and 2 infowindows open.

How can i ensure the map will fit to show entire markers and infowindows?

This is the proof of concept.

http://jsfiddle.net/hBeX3/

Depending on the height of the screen (please move up and down the right vertical separator and run again) i could get one infowindow cutted like this:

enter image description here

In this example i used 2 fixed points but i want to ensure everything will be visible after a map.fitBounds call and with any set of markers/infowindows.

How can avoid this?

Davide Berra
  • 6,387
  • 2
  • 29
  • 50

1 Answers1

0
On the basis of Screen size or Marker u can give ZOOM value.

For example

function initialize() {

var map_options = {
            center: new google.maps.LatLng(22.9169800,80.9631799),
            **zoom: 5,**
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
}
Tabish
  • 1,592
  • 16
  • 13