properly remove markers when removing a place

This commit is contained in:
rolux 2011-05-24 18:46:46 +02:00
parent a48113684d
commit ca905a54bb
2 changed files with 6 additions and 4 deletions

View file

@ -217,15 +217,16 @@ Ox.ListMap = function(options, self) {
items: [
{id: 'all', title: 'Find: All'},
{id: 'name', title: 'Find: Name'},
{id: 'geoname', title: 'Find: Geoname'},
{id: 'country', title: 'Find: Country'}
{id: 'alternativeNames', title: 'Find: Alternative Names'},
{id: 'geoname', title: 'Find: Geoname'}
],
overlap: 'right',
width: 128
type: 'image'
}),
self.$findInput = Ox.Input({
clear: true,
width: 192
placeholder: 'Find in List',
width: 234
})
]
})

View file

@ -828,6 +828,7 @@ Ox.Map = function(options, self) {
self.options.selected = place.id;
//Ox.print('removePlace', Ox.getObjectById(self.places, place.id))
self.places.splice(Ox.getPositionById(self.places, place.id), 1);
self.resultPlace && self.resultPlace.remove();
self.resultPlace = place;
place.marker.update();
}