diff --git a/WebContent/OSRM.Markers.js b/WebContent/OSRM.Markers.js index 529bf80b2..bc8ff1bd8 100644 --- a/WebContent/OSRM.Markers.js +++ b/WebContent/OSRM.Markers.js @@ -174,6 +174,8 @@ removeAll: function() { for(var i=0; i Start: - +
+ +
Zeigen Ende: - +
+ +
Zeigen diff --git a/WebContent/routing/OSRM.RoutingGUI.js b/WebContent/routing/OSRM.RoutingGUI.js index 4d23a0e54..da0f20289 100644 --- a/WebContent/routing/OSRM.RoutingGUI.js +++ b/WebContent/routing/OSRM.RoutingGUI.js @@ -109,6 +109,21 @@ openJOSM: function() { openOSMBugs: function() { var position = OSRM.G.map.getCenterUI(); window.open( "http://osmbugs.org/?lat="+position.lat.toFixed(6)+"&lon="+position.lng.toFixed(6)+"&zoom="+OSRM.G.map.getZoom() ); +}, + +//click: button "delete marker" +deleteMarker: function(marker_id) { + var id = null; + if(marker_id == 'source' && OSRM.G.markers.hasSource() ) + id = 0; + else if(marker_id == 'target' && OSRM.G.markers.hasTarget() ) + id = OSRM.G.markers.route.length-1; + if( id == null) + return; + + OSRM.G.markers.removeMarker( id ); + OSRM.Routing.getRoute(); + OSRM.G.markers.highlight.hide(); } }; \ No newline at end of file