fix map
This commit is contained in:
parent
862f097e24
commit
021d429398
2 changed files with 5 additions and 6 deletions
|
@ -156,7 +156,6 @@ Ox.MapMarker = function(options) {
|
||||||
// workaround to prevent marker from appearing twice
|
// workaround to prevent marker from appearing twice
|
||||||
// after setting draggable from true to false (google maps bug)
|
// after setting draggable from true to false (google maps bug)
|
||||||
var fix = that.marker.getDraggable() && !that.place.editing;
|
var fix = that.marker.getDraggable() && !that.place.editing;
|
||||||
//Ox.print('setOptions, that.color', that.color)
|
|
||||||
if (that.map.options('showTypes')) {
|
if (that.map.options('showTypes')) {
|
||||||
that.color = typeColor[that.place.type];
|
that.color = typeColor[that.place.type];
|
||||||
that.size = 8;
|
that.size = 8;
|
||||||
|
|
|
@ -45,7 +45,7 @@ Ox.MapPlace = function(options) {
|
||||||
|
|
||||||
update();
|
update();
|
||||||
|
|
||||||
function update() {
|
function update(updateMarker) {
|
||||||
that.points = {
|
that.points = {
|
||||||
ne: new google.maps.LatLng(that.north, that.east),
|
ne: new google.maps.LatLng(that.north, that.east),
|
||||||
sw: new google.maps.LatLng(that.south, that.west)
|
sw: new google.maps.LatLng(that.south, that.west)
|
||||||
|
@ -82,7 +82,7 @@ Ox.MapPlace = function(options) {
|
||||||
map: that.map,
|
map: that.map,
|
||||||
place: that
|
place: that
|
||||||
});
|
});
|
||||||
} else {
|
} else if (updateMarker) {
|
||||||
that.marker.update();
|
that.marker.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ Ox.MapPlace = function(options) {
|
||||||
Ox.forEach(options, function(value, key) {
|
Ox.forEach(options, function(value, key) {
|
||||||
that.key = value;
|
that.key = value;
|
||||||
});
|
});
|
||||||
update();
|
update(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
@ -195,8 +195,8 @@ Ox.MapPlace = function(options) {
|
||||||
/*@
|
/*@
|
||||||
update <f> update
|
update <f> update
|
||||||
@*/
|
@*/
|
||||||
that.update = function() {
|
that.update = function(updateMarker) {
|
||||||
update();
|
update(updateMarker);
|
||||||
that.map.triggerEvent('changeplace', that);
|
that.map.triggerEvent('changeplace', that);
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue