From 784f4178571f58e5d30af6015d4f44e58ec0d6e5 Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Tue, 13 Mar 2012 14:31:23 +0100 Subject: [PATCH] changed geocoder to official OSM geocoder, switched default map style to osm.org --- WebContent/OSRM.Localization.js | 4 ++-- WebContent/geocoder.js | 2 +- WebContent/main.html | 2 +- WebContent/main.js | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/WebContent/OSRM.Localization.js b/WebContent/OSRM.Localization.js index 0c0e49135..bddd726c9 100644 --- a/WebContent/OSRM.Localization.js +++ b/WebContent/OSRM.Localization.js @@ -26,7 +26,7 @@ OSRM.Localization["de"] = { "GUI_HIGHLIGHT_UNNAMED_ROADS": "Unbenannte Stra�en hervorheben", "GUI_START_TOOLTIP": "Startposition eingeben", "GUI_END_TOOLTIP": "Zielposition eingeben", -"GUI_LEGAL_NOTICE": "GUI2 v0.1 120313 - OSRM hosting by KIT - Geocoder by MapQuest", +"GUI_LEGAL_NOTICE": "GUI2 v0.1 120313 - OSRM hosting by KIT - Geocoder by OSM", // geocoder "SEARCH_RESULTS": "Suchergebnisse", "TIMED_OUT": "Zeit�berschreitung", @@ -55,7 +55,7 @@ OSRM.Localization["en"] = { "GUI_HIGHLIGHT_UNNAMED_ROADS": "Highlight unnamed streets", "GUI_START_TOOLTIP": "Enter start", "GUI_END_TOOLTIP": "Enter destination", -"GUI_LEGAL_NOTICE": "GUI2 v0.1 120313 - OSRM hosting by KIT - Geocoder by MapQuest", +"GUI_LEGAL_NOTICE": "GUI2 v0.1 120313 - OSRM hosting by KIT - Geocoder by OSM", // geocoder "SEARCH_RESULTS": "Search Results", "TIMED_OUT": "Timed Out", diff --git a/WebContent/geocoder.js b/WebContent/geocoder.js index 11edc6952..b7bd9a617 100644 --- a/WebContent/geocoder.js +++ b/WebContent/geocoder.js @@ -1,5 +1,5 @@ // some constants -OSRM.GEOCODE_POST = 'http://open.mapquestapi.com/nominatim/v1/search?format=json'; +OSRM.GEOCODE_POST = 'http://nominatim.openstreetmap.org/search?format=json'; OSRM.SOURCE_MARKER_LABEL = "source"; OSRM.TARGET_MARKER_LABEL = "target"; diff --git a/WebContent/main.html b/WebContent/main.html index 45eda9bde..60b9cfd5c 100644 --- a/WebContent/main.html +++ b/WebContent/main.html @@ -102,7 +102,7 @@
- +
diff --git a/WebContent/main.js b/WebContent/main.js index 6a06aaa22..58e0eb9c6 100644 --- a/WebContent/main.js +++ b/WebContent/main.js @@ -76,10 +76,6 @@ function centerOnGeolocation() { // init map function initMap() { - var mapquestURL = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', - mapquestAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 MapQuest', - mapquestOptions = {maxZoom: 18, attribution: mapquestAttribution, subdomains: '1234'}; - var osmorgURL = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmorgAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 Mapnik', osmorgOptions = {maxZoom: 18, attribution: osmorgAttribution}; @@ -88,13 +84,17 @@ function initMap() { osmdeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 Mapnik', osmdeOptions = {maxZoom: 18, attribution: osmdeAttribution}; + var mapquestURL = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', + mapquestAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 MapQuest', + mapquestOptions = {maxZoom: 18, attribution: mapquestAttribution, subdomains: '1234'}; + var cloudmadeURL = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png', cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade', cloudmadeOptions = {maxZoom: 18, attribution: cloudmadeAttribution}; - var mapquest = new L.TileLayer(mapquestURL, mapquestOptions), - osmorg = new L.TileLayer(osmorgURL, osmorgOptions), + var osmorg = new L.TileLayer(osmorgURL, osmorgOptions), osmde = new L.TileLayer(osmdeURL, osmdeOptions), + mapquest = new L.TileLayer(mapquestURL, mapquestOptions), cloudmade = new L.TileLayer(cloudmadeURL, cloudmadeOptions); map = new L.Map('map', { @@ -102,7 +102,7 @@ function initMap() { zoom: 13, zoomAnimation: false, // uncomment to remove animations and hiding of routes during zoom fadeAnimation: false, - layers: [mapquest] + layers: [osmorg] }); var baseMaps = {