From 5f985fb22efe1da4e3a34ad4c64a824f121f1e9d Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 1 Jun 2011 16:03:02 +0200 Subject: [PATCH] fix map --- source/Ox.UI/js/Map/Ox.Map.js | 13 +++---------- source/Ox.UI/js/Map/Ox.MapPlace.js | 2 ++ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/source/Ox.UI/js/Map/Ox.Map.js b/source/Ox.UI/js/Map/Ox.Map.js index 0f1a26d3..48a0ddb6 100644 --- a/source/Ox.UI/js/Map/Ox.Map.js +++ b/source/Ox.UI/js/Map/Ox.Map.js @@ -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() { diff --git a/source/Ox.UI/js/Map/Ox.MapPlace.js b/source/Ox.UI/js/Map/Ox.MapPlace.js index 86537b7d..18fa7a7f 100644 --- a/source/Ox.UI/js/Map/Ox.MapPlace.js +++ b/source/Ox.UI/js/Map/Ox.MapPlace.js @@ -82,6 +82,8 @@ Ox.MapPlace = function(options) { map: that.map, place: that }); + } else { + that.marker.update(); } }