Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Update OSRM.RoutingGUI.js #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions WebContent/gui/OSRM.RoutingGUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,15 @@ inputChanged: function(marker_id) {
OSRM.Geocoder.call(OSRM.C.TARGET_LABEL, document.getElementById('gui-input-target').value);
},

// click: button "open JOSM"
// click: button "open JOSM", actually opens user's default editor (Potlatch2, ID...)
openJOSM: function() {
var zoom = OSRM.G.map.getZoom();
if( zoom < OSRM.DEFAULTS.EDITOR_MIN_ZOOM_LEVEL ) {
window.alert( OSRM.loc("OPEN_JOSM_FAILED") );
} else {
var position = OSRM.G.map.getCenterUI();
var pr = OSRM.C.PRECISION;
window.open( "http://www.openstreetmap.org/edit?lat="+position.lat.toFixed(pr)+"&lon="+position.lng.toFixed(pr)+"&zoom="+zoom );
}
},
var zoom = OSRM.G.map.getZoom();
if( zoom < OSRM.DEFAULTS.EDITOR_MIN_ZOOM_LEVEL )
zoom = OSRM.DEFAULTS.EDITOR_MIN_ZOOM_LEVEL;
var position = OSRM.G.map.getCenterUI();
var pr = OSRM.C.PRECISION;
window.open( "http://www.openstreetmap.org/edit?lat="+position.lat.toFixed(pr)+"&lon="+position.lng.toFixed(pr)+"&zoom="+zoom );
}},

//click: button "open OSM Bugs"
openOSMBugs: function() {
Expand Down