properly remove markers when removing a place
This commit is contained in:
parent
a48113684d
commit
ca905a54bb
2 changed files with 6 additions and 4 deletions
|
@ -217,15 +217,16 @@ Ox.ListMap = function(options, self) {
|
||||||
items: [
|
items: [
|
||||||
{id: 'all', title: 'Find: All'},
|
{id: 'all', title: 'Find: All'},
|
||||||
{id: 'name', title: 'Find: Name'},
|
{id: 'name', title: 'Find: Name'},
|
||||||
{id: 'geoname', title: 'Find: Geoname'},
|
{id: 'alternativeNames', title: 'Find: Alternative Names'},
|
||||||
{id: 'country', title: 'Find: Country'}
|
{id: 'geoname', title: 'Find: Geoname'}
|
||||||
],
|
],
|
||||||
overlap: 'right',
|
overlap: 'right',
|
||||||
width: 128
|
type: 'image'
|
||||||
}),
|
}),
|
||||||
self.$findInput = Ox.Input({
|
self.$findInput = Ox.Input({
|
||||||
clear: true,
|
clear: true,
|
||||||
width: 192
|
placeholder: 'Find in List',
|
||||||
|
width: 234
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -828,6 +828,7 @@ Ox.Map = function(options, self) {
|
||||||
self.options.selected = place.id;
|
self.options.selected = place.id;
|
||||||
//Ox.print('removePlace', Ox.getObjectById(self.places, place.id))
|
//Ox.print('removePlace', Ox.getObjectById(self.places, place.id))
|
||||||
self.places.splice(Ox.getPositionById(self.places, place.id), 1);
|
self.places.splice(Ox.getPositionById(self.places, place.id), 1);
|
||||||
|
self.resultPlace && self.resultPlace.remove();
|
||||||
self.resultPlace = place;
|
self.resultPlace = place;
|
||||||
place.marker.update();
|
place.marker.update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue