chasing a map positioning bug...
This commit is contained in:
parent
a4fedfd924
commit
f9dd2661f8
1 changed files with 12 additions and 6 deletions
|
@ -874,7 +874,14 @@ 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') {
|
||||
self.$map.css({position: 'absolute'});
|
||||
that.resizeMap();
|
||||
} else {
|
||||
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
|
||||
|
@ -918,14 +925,9 @@ Ox.Map = function(options, self) {
|
|||
}
|
||||
updateFormElements();
|
||||
|
||||
//that.gainFocus();
|
||||
self.loaded = true;
|
||||
that.triggerEvent('load');
|
||||
|
||||
function tilesLoaded() {
|
||||
setTimeout(formatTerms, 250);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -1335,6 +1337,10 @@ Ox.Map = function(options, self) {
|
|||
}
|
||||
}
|
||||
|
||||
function tilesLoaded() {
|
||||
setTimeout(formatTerms, 250);
|
||||
}
|
||||
|
||||
function toggleControls() {
|
||||
var $controls = that.find('.OxMapControl');
|
||||
self.options.showControls = !self.options.showControls;
|
||||
|
|
Loading…
Reference in a new issue