The autozoom currently sets the zoom so that all the points are within the area of the displayed map. But if there is a point located at the very top of the map, the marker extends above the top of the map and can't be seen.
Suggested solution is to add a margin around the points so the zoom is always set leaving enough room to show the markers.
So in gmap_marker.js replace:
obj.map.setCenter(obj.bounds.getCenter(),obj.map.getBoundsZoomLevel(obj.bounds));
with
var SW = obj.bounds.getSouthWest();
var NE = obj.bounds.getNorthEast();
var height = NE.lat() - SW.lat();
var width = NE.lng() - SW.lng();
// Set a 5% margin for left, right, and bottom, but 10% margin for top as markers are tall and need extra space
var marginBounds = new GLatLngBounds(new GLatLng(SW.lat() - 0.05*height, SW.lng() - 0.05*width), new GLatLng(NE.lat() + 0.10*height, NE.lng() + 0.05*width) );
obj.map.setCenter(marginBounds.getCenter(),obj.map.getBoundsZoomLevel(marginBounds));
Comments
Comment #1
tobiassjosten commentedThis also applies to the 6.x branch, but since it didn't seem any good to duplicate it, I'll add my input here. mrb's solution works great and so I have taken the liberty of rolling a patch of the changes.
Note that this patch is for the 6.x branch!
Comment #2
dpatte commentedwas looking for this. Thanks!
Comment #3
dustin bons commentedAlso works for 7.x branch
Comment #4
podarokrelease unsupported
feel free to open issue against latest 7.x dev