| 1 |
Description: Use local installation of leaflet or openlayers |
| 2 |
Author: Uwe Steinmann <[email protected]> |
| 3 |
Forwarded: not-needed |
| 4 |
|
| 5 |
--- a/web/www/routino/maploader.js |
| 6 |
+++ b/web/www/routino/maploader.js |
| 7 |
@@ -67,8 +67,8 @@ function map_load(callbacks) |
| 8 |
|
| 9 |
if(mapprops.library == "leaflet") |
| 10 |
{ |
| 11 |
- load_css("../leaflet/leaflet.css"); |
| 12 |
- load_js ("../leaflet/leaflet.js"); |
| 13 |
+ load_css("/javascript/leaflet/leaflet.css"); |
| 14 |
+ load_js ("/javascript/leaflet/leaflet.js"); |
| 15 |
|
| 16 |
load_js(location.pathname.replace(/\.html.*/,".leaflet.js")); |
| 17 |
} |
| 18 |
@@ -81,7 +81,7 @@ function map_load(callbacks) |
| 19 |
} |
| 20 |
else if(mapprops.library == "openlayers2") |
| 21 |
{ |
| 22 |
- load_js("../openlayers2/OpenLayers.js"); |
| 23 |
+ load_js("/javascript/openlayers/OpenLayers.js"); |
| 24 |
|
| 25 |
load_js(location.pathname.replace(/\.html.*/,".openlayers2.js")); |
| 26 |
} |
| 27 |
--- a/web/www/routino/router.leaflet.js |
| 28 |
+++ b/web/www/routino/router.leaflet.js |
| 29 |
@@ -852,6 +852,8 @@ function map_init() // calle |
| 30 |
maxBounds: L.latLngBounds(L.latLng(mapprops.southedge,mapprops.westedge),L.latLng(mapprops.northedge,mapprops.eastedge)) |
| 31 |
}); |
| 32 |
|
| 33 |
+ map.setView({lng: 0, lat: 0}, 2); |
| 34 |
+ |
| 35 |
// Add map tile layers |
| 36 |
|
| 37 |
var baselayers={}; |