Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 33035fccc0 | |||
| c14e461370 | |||
| 6f4e9a1d11 | |||
| 3610e21854 |
@@ -82,7 +82,7 @@ init: function() {
|
||||
// setup map
|
||||
OSRM.G.map = new OSRM.MapView('map', {
|
||||
center: new L.LatLng(OSRM.DEFAULTS.ONLOAD_LATITUDE, OSRM.DEFAULTS.ONLOAD_LONGITUDE),
|
||||
zoom: OSRM.DEFAULTS.ZOOM_LEVEL,
|
||||
zoom: OSRM.DEFAULTS.ONLOAD_ZOOM_LEVEL,
|
||||
layers: [base_maps[tile_servers[0].display_name]],
|
||||
zoomAnimation: false, // remove animations -> routes are not hidden during zoom
|
||||
fadeAnimation: false
|
||||
@@ -98,7 +98,7 @@ init: function() {
|
||||
|
||||
// initial correct map position and zoom (respect UI visibility, use browser position)
|
||||
var position = new L.LatLng( OSRM.DEFAULTS.ONLOAD_LATITUDE, OSRM.DEFAULTS.ONLOAD_LONGITUDE);
|
||||
OSRM.G.map.setViewUI( position, OSRM.DEFAULTS.ZOOM_LEVEL);
|
||||
OSRM.G.map.setViewUI( position, OSRM.DEFAULTS.ONLOAD_ZOOM_LEVEL);
|
||||
if (navigator.geolocation && document.URL.indexOf("file://") == -1) // convenience during development, as FF doesn't save rights for local files
|
||||
navigator.geolocation.getCurrentPosition(OSRM.Map.geolocationResponse);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
||||
// [has to be loaded before all other OSRM classes]
|
||||
|
||||
var OSRM = {};
|
||||
OSRM.VERSION = '0.1.4';
|
||||
OSRM.VERSION = '0.1.4x';
|
||||
OSRM.DATE = '120416';
|
||||
OSRM.CONSTANTS = {};
|
||||
OSRM.DEFAULTS = {};
|
||||
|
||||
@@ -26,6 +26,7 @@ OSRM.DEFAULTS = {
|
||||
WEBSITE_URL: document.URL.replace(/#*(\?.*|$)/i,""), // truncates URL before first ?, and removes tailing #
|
||||
JSONP_TIMEOUT: 10000,
|
||||
ZOOM_LEVEL: 14,
|
||||
ONLOAD_ZOOM_LEVEL: 5,
|
||||
ONLOAD_LATITUDE: 48.84,
|
||||
ONLOAD_LONGITUDE: 10.10,
|
||||
ONLOAD_SOURCE: "",
|
||||
|
||||
@@ -60,6 +60,8 @@ OSRM.Localization["de"] = {
|
||||
"SW": "Südwest",
|
||||
"NW": "Nordwest",
|
||||
// driving directions
|
||||
// %s: road name
|
||||
// [*]: will only be printed when there actually is a road name
|
||||
"DIRECTION_0":"Unbekannte Anweisung[ auf <b>%s</b>]",
|
||||
"DIRECTION_1":"Geradeaus weiterfahren[ auf <b>%s</b>]",
|
||||
"DIRECTION_2":"Leicht rechts abbiegen[ auf <b>%s</b>]",
|
||||
|
||||
@@ -60,6 +60,8 @@ OSRM.Localization["en"] = {
|
||||
"SW": "southwest",
|
||||
"NW": "northwest",
|
||||
// driving directions
|
||||
// %s: road name
|
||||
// [*]: will only be printed when there actually is a road name
|
||||
"DIRECTION_0":"Unknown instruction[ on <b>%s</b>]",
|
||||
"DIRECTION_1":"Continue[ on <b>%s</b>]",
|
||||
"DIRECTION_2":"Turn slight right[ on <b>%s</b>]",
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ OSRM.parseParameters = function(){
|
||||
var zoom_level = Number(name_val[1]);
|
||||
if( zoom_level<0 || zoom_level > 18)
|
||||
return;
|
||||
params.zoom = zoom;
|
||||
params.zoom = zoom_level;
|
||||
}
|
||||
else if(name_val[0] == 'center') {
|
||||
var coordinates = unescape(name_val[1]).split(',');
|
||||
|
||||
Reference in New Issue
Block a user