|
|
@ -6,9 +6,12 @@ import org.osmdroid.bonuspack.routing.RoadManager
|
|
|
|
import org.osmdroid.util.GeoPoint
|
|
|
|
import org.osmdroid.util.GeoPoint
|
|
|
|
import org.osmdroid.views.MapView
|
|
|
|
import org.osmdroid.views.MapView
|
|
|
|
import org.osmdroid.views.overlay.Marker
|
|
|
|
import org.osmdroid.views.overlay.Marker
|
|
|
|
|
|
|
|
import org.osmdroid.views.overlay.infowindow.InfoWindow
|
|
|
|
|
|
|
|
|
|
|
|
class PlaceMarker(val mapView: MapView, val locations: MutableSet<GeoPoint>, val parent : AddMarkerOverlay) : Marker(mapView) {
|
|
|
|
class PlaceMarker(val mapView: MapView, val locations: MutableSet<GeoPoint>, val parent : AddMarkerOverlay) : Marker(mapView) {
|
|
|
|
|
|
|
|
override fun getTitle(): String {
|
|
|
|
|
|
|
|
return "Step " + (locations.indexOf(this.position)+1)
|
|
|
|
|
|
|
|
}
|
|
|
|
override fun onLongPress(e: MotionEvent?, mapView: MapView?): Boolean {
|
|
|
|
override fun onLongPress(e: MotionEvent?, mapView: MapView?): Boolean {
|
|
|
|
if(mapView!=null && this.hitTest(e, mapView)) {
|
|
|
|
if(mapView!=null && this.hitTest(e, mapView)) {
|
|
|
|
locations.remove(this.position)
|
|
|
|
locations.remove(this.position)
|
|
|
|