diff --git a/source/Ox.UI/js/Map/Map.js b/source/Ox.UI/js/Map/Map.js index 72b8fcaf..185fd7de 100644 --- a/source/Ox.UI/js/Map/Map.js +++ b/source/Ox.UI/js/Map/Map.js @@ -509,7 +509,8 @@ Ox.Map = function(options, self) { }); if (window.google) { - initMap(); + // timeout needed so that the map is in the DOM + setTimeout(initMap); } else if (window.googleCallback) { (function interval() { window.google ? initMap() : setTimeout(interval, 100); @@ -874,14 +875,7 @@ Ox.Map = function(options, self) { google.maps.event.addListener(self.map, 'idle', mapChanged); google.maps.event.addListener(self.map, 'zoom_changed', zoomChanged); google.maps.event.addListenerOnce(self.map, 'tilesloaded', tilesLoaded); - - // Google seems to sometimes set position to 'relative' - if (self.$map.css('position') == 'absolute') { - google.maps.event.trigger(self.map, 'resize'); - } else { - self.$map.css({position: 'absolute'}); - that.resizeMap(); - } + google.maps.event.trigger(self.map, 'resize'); // needed to get mouse x/y coordinates on marker mouseover, // see http://code.google.com/p/gmaps-api-issues/issues/detail?id=2342