1
0
Fork 0
forked from 0x2620/oxjs

allow for editing lat/lng/s/w/n/e via map

This commit is contained in:
rolux 2011-05-30 09:21:11 +02:00
commit 7eb6f58312
4 changed files with 32 additions and 23 deletions

View file

@ -283,14 +283,13 @@ Ox.ListMap = function(options, self) {
that.triggerEvent('addplace', data);
},
*/
changeplace: function(event, data) {
// fixme: is there a changeplace event in Map???
self.$placeForm.values(Ox.map(data, function(val, key) {
// fixme: no size key anymore
return key == 'size' ? Ox.formatArea(val) : val;
})).show();
changeplace: function(data) {
self.$placeForm.values(data).show();
},
geocode: function(event, data) {
changeplaceend: function(data) {
editPlace(['lat', 'lng', 'south', 'west', 'north', 'east', 'area']);
},
geocode: function(data) {
that.triggerEvent('geocode', data);
},
resize: function() {
@ -581,6 +580,12 @@ Ox.ListMap = function(options, self) {
self.options.editPlace(values, function() {
if (keys.indexOf(self.$list.options('sort')[0].key) > -1) {
self.$list.reloadList();
} else {
Ox.forEach(values, function(value, key) {
if (key != 'id') {
self.$list.value(values.id, key, value);
}
});
}
});
}