This commit is contained in:
rolux 2011-06-01 16:03:02 +02:00
parent 104c2e2b0b
commit 5f985fb22e
2 changed files with 5 additions and 10 deletions

View file

@ -1212,18 +1212,18 @@ Ox.Map = function(options, self) {
return key;
};
/*
that.editPlace = function() {
getPlaceById(self.options.selected).edit();
return that;
};
*/
/*
that.editPlace = function(data) {
var place = getPlaceById(self.options.selected);
place.$marker.options(data);
return that;
};
*/
that.findPlace = function(name, callback) {
getPlaceByName(name, function(place) {
@ -1297,14 +1297,7 @@ Ox.Map = function(options, self) {
that.value = function(id, key, value) {
// fixme: should be like the corresponding List/TextList/etc value function
Ox.print('Map.value', id, key, value)
var place = getPlaceById(id);
place[key] = value;
Ox.print('...', getPlaceById(id))
if ([
'type', 'lat', 'lng', 'south', 'west', 'north', 'east'
].indexOf(key) > -1) {
place.$marker.options(key, value);
}
getPlaceById(id).options(key, value);
}
that.zoomToPlace = function() {

View file

@ -82,6 +82,8 @@ Ox.MapPlace = function(options) {
map: that.map,
place: that
});
} else {
that.marker.update();
}
}