diff --git a/source/Ox.UI/js/Map/Map.js b/source/Ox.UI/js/Map/Map.js index 4797ac8f..839849da 100644 --- a/source/Ox.UI/js/Map/Map.js +++ b/source/Ox.UI/js/Map/Map.js @@ -577,12 +577,10 @@ Ox.Map = function(options, self) { } function addPlaceToPlaces(data) { - var place = getSelectedPlace(), + var place = Ox.extend(getSelectedPlace() || {}, data), country = place ? Ox.getCountryByGeoname(place.geoname) : {}; - Ox.extend(place, data); - self.options.selected = place.id; place.countryCode = country ? country.code : ''; - Ox.Log('Map', 'addP2P', data, place); + self.options.selected = place.id; setPlaceControls(place); place.marker.update(); place.rectangle.update();