Compare commits

..

4 Commits

Author SHA1 Message Date
DennisSchiefer 33035fccc0 pushed version 2012-04-16 19:43:57 +02:00
DennisSchiefer c14e461370 added onload_zoomlevel 2012-04-16 19:39:47 +02:00
DennisSchiefer 6f4e9a1d11 added explanation to driving instruction localization 2012-04-16 18:57:21 +02:00
DennisSchiefer 3610e21854 bugfix for zoomlevel in route links 2012-04-16 18:51:22 +02:00
6 changed files with 9 additions and 4 deletions
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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 = {};
+1
View File
@@ -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
View File
@@ -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(',');