Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
basic
Commits
6a6d2cc0
Commit
6a6d2cc0
authored
4 years ago
by
Johannes Goderbauer
Browse files
Options
Downloads
Patches
Plain Diff
Added MapViewTemplate disclaimer
parent
cef65746
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
entity/Organisation_entity/entityfields/map_config/valueProcess.js
+18
-5
18 additions, 5 deletions
...ganisation_entity/entityfields/map_config/valueProcess.js
with
18 additions
and
5 deletions
entity/Organisation_entity/entityfields/map_config/valueProcess.js
+
18
−
5
View file @
6a6d2cc0
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment