update map
This commit is contained in:
parent
408280e741
commit
a369d0170d
3 changed files with 11 additions and 4 deletions
|
@ -1111,8 +1111,8 @@ Ox.List = function(options, self) {
|
||||||
self.options.items({
|
self.options.items({
|
||||||
positions: [id],
|
positions: [id],
|
||||||
sort: self.options.sort
|
sort: self.options.sort
|
||||||
}, function(results) {
|
}, function(result) {
|
||||||
pos = results.data.positions[id];
|
pos = result.data.positions[id];
|
||||||
select(pos, i);
|
select(pos, i);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1297,8 +1297,14 @@ 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)
|
||||||
getPlaceById(id)[key] = value;
|
var place = getPlaceById(id);
|
||||||
|
place[key] = value;
|
||||||
Ox.print('...', getPlaceById(id))
|
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() {
|
||||||
|
|
|
@ -149,7 +149,8 @@ Ox.MapPlace = function(options) {
|
||||||
|
|
||||||
// fixme: make this an Ox.Element to get options handling for free?
|
// fixme: make this an Ox.Element to get options handling for free?
|
||||||
that.options = function(options) {
|
that.options = function(options) {
|
||||||
Ox.forEach(function(value, key) {
|
options = Ox.makeOptions(arguments);
|
||||||
|
Ox.forEach(options, function(value, key) {
|
||||||
that.key = value;
|
that.key = value;
|
||||||
});
|
});
|
||||||
update();
|
update();
|
||||||
|
|
Loading…
Reference in a new issue