fix map
This commit is contained in:
parent
104c2e2b0b
commit
5f985fb22e
2 changed files with 5 additions and 10 deletions
|
@ -1212,18 +1212,18 @@ Ox.Map = function(options, self) {
|
||||||
return key;
|
return key;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
that.editPlace = function() {
|
that.editPlace = function() {
|
||||||
getPlaceById(self.options.selected).edit();
|
getPlaceById(self.options.selected).edit();
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
|
/*
|
||||||
that.editPlace = function(data) {
|
that.editPlace = function(data) {
|
||||||
var place = getPlaceById(self.options.selected);
|
var place = getPlaceById(self.options.selected);
|
||||||
place.$marker.options(data);
|
place.$marker.options(data);
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
that.findPlace = function(name, callback) {
|
that.findPlace = function(name, callback) {
|
||||||
getPlaceByName(name, function(place) {
|
getPlaceByName(name, function(place) {
|
||||||
|
@ -1297,14 +1297,7 @@ Ox.Map = function(options, self) {
|
||||||
that.value = function(id, key, value) {
|
that.value = function(id, key, value) {
|
||||||
// fixme: should be like the corresponding List/TextList/etc value function
|
// fixme: should be like the corresponding List/TextList/etc value function
|
||||||
Ox.print('Map.value', id, key, value)
|
Ox.print('Map.value', id, key, value)
|
||||||
var place = getPlaceById(id);
|
getPlaceById(id).options(key, value);
|
||||||
place[key] = value;
|
|
||||||
Ox.print('...', getPlaceById(id))
|
|
||||||
if ([
|
|
||||||
'type', 'lat', 'lng', 'south', 'west', 'north', 'east'
|
|
||||||
].indexOf(key) > -1) {
|
|
||||||
place.$marker.options(key, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
that.zoomToPlace = function() {
|
that.zoomToPlace = function() {
|
||||||
|
|
|
@ -82,6 +82,8 @@ Ox.MapPlace = function(options) {
|
||||||
map: that.map,
|
map: that.map,
|
||||||
place: that
|
place: that
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
that.marker.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue