Fix unsupported operation exception

pull/1365/head
Alex Baker 5 years ago
parent 474a07b5fd
commit 50193e2ce5

@ -63,7 +63,7 @@ class OsmMapFragment(private val context: Context) : MapFragment {
override fun setMarkers(places: List<Place>) { override fun setMarkers(places: List<Place>) {
val overlays = map.overlays val overlays = map.overlays
overlays.removeIf { it is Marker } overlays.removeAll(overlays.filterIsInstance<Marker>())
for (place in places) { for (place in places) {
overlays.add(Marker(map).apply { overlays.add(Marker(map).apply {
position = GeoPoint(place.latitude, place.longitude) position = GeoPoint(place.latitude, place.longitude)

Loading…
Cancel
Save