1
0
Fork 0
forked from 0x2620/oxjs

make annotation map/calendar size/state sticky

This commit is contained in:
rlx 2012-01-14 17:09:55 +05:30
commit 56cf323110
5 changed files with 162 additions and 111 deletions

View file

@ -441,7 +441,13 @@ Ox.Map = function(options, self) {
});
}
if (!window.googleCallback) {
if (window.google) {
initMap();
} else if (window.googleCallback) {
(function interval() {
window.google ? initMap() : setTimeout(interval, 100);
}());
} else {
window.googleCallback = function() {
delete window.googleCallback;
initMap();
@ -450,10 +456,6 @@ Ox.Map = function(options, self) {
document.location.protocol
+ '//maps.google.com/maps/api/js?callback=googleCallback&sensor=false'
);
} else {
(function interval() {
window.google ? initMap() : setTimeout(interval, 100);
}());
}
function addPlaceToMap(place) {
@ -1360,6 +1362,7 @@ Ox.Map = function(options, self) {
self.setOption = function(key, value) {
if (key == 'height' || key == 'width') {
that.$element.css(key, value + 'px');
that.resizeMap();
} else if (key == 'places') {
Ox.print('MAP SET OPTIONS PLACES', value);