Skip to content
Snippets Groups Projects
Commit 6a6d2cc0 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Added MapViewTemplate disclaimer

parent cef65746
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,21 @@ import("system.util");
import("system.fileIO");
import("system.result");
/* !WARNING! This openstreetmap TileLayer Server is only used for demonstration purposes and to show how this map template configuration works.
* From the tile-usage-policy:
* "Heavy use (e.g. distributing an app that uses tiles from openstreetmap.org) is forbidden without prior permission"
* See more about the openstreetmap policy here:
* https://operations.osmfoundation.org/policies/tiles/
*
* This means you have to change the following tile source for using the MapViewTemplate in any real scenario (Dev-Serers, Test-Servers,
* Production-Servers and so on).
*/
var selectedTile = {
title: "Open Street Map",
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
attribution: "Map data © <a href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors"
};
var config = {
startingCenterPosition : {
lat: parseFloat(vars.get("$param.MapViewCenterLat_param")),
......@@ -16,11 +31,7 @@ var config = {
maxZoom: 20
},
tiles: [
{
title: "Open Street Map",
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
attribution: "Map data © <a href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors"
}
/*add more tile layer sources here*/
]
};
......@@ -32,5 +43,7 @@ if (vars.get("$param.MapViewAdditionalFeatures_param"))
config.startingCenterPosition.autoLocate = false;
}
config.tiles.push(selectedTile);//the last tile layer will be always selected by leaflet, so let's push it here
var res = JSON.stringify(config);
result.string(res);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment