forked from 0x2620/oxjs
improve listmap editing functionality
This commit is contained in:
parent
02442a24f7
commit
b17e8a783b
6 changed files with 48 additions and 35 deletions
|
|
@ -407,13 +407,14 @@ Ox.Map = function(options, self) {
|
|||
}
|
||||
|
||||
function addPlaceToPlaces(data) {
|
||||
var place = getSelectedPlace();
|
||||
var place = getSelectedPlace(),
|
||||
country = Ox.getCountryByGeoname(place.geoname);
|
||||
if (self.options.selected == place.id) {
|
||||
self.options.selected = place.id.substr(1);
|
||||
}
|
||||
place.id = place.id.substr(1); // fixme: NOT SAFE!
|
||||
Ox.extend(place, data);
|
||||
place.countryCode = Ox.getCountryByGeoname(place.geoname).code;
|
||||
place.countryCode = country ? country.code : '';
|
||||
place.marker.update();
|
||||
self.places.push(place);
|
||||
self.resultPlace = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue