forked from 0x2620/oxjs
make annotation map/calendar size/state sticky
This commit is contained in:
parent
36c1cda12a
commit
56cf323110
5 changed files with 162 additions and 111 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue