forked from rikgale/VRSCustomLayers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScale.html
More file actions
24 lines (18 loc) · 753 Bytes
/
Copy pathScale.html
File metadata and controls
24 lines (18 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<script src="https://unpkg.com/leaflet.fullscreen@latest/Control.FullScreen.js"></script>
<script type="text/javascript">
if(VRS && VRS.globalDispatch && VRS.serverConfig) {
VRS.globalDispatch.hook(VRS.globalEvent.bootstrapCreated, function (bootStrap) {
if (bootStrap.hookMapInitialised) {
bootStrap.hookMapInitialised(function (pageSettings) {
if (pageSettings.mapPlugin && pageSettings.mapPlugin.getNativeType() === 'OpenStreetMap') {
var map = pageSettings.mapPlugin.getNative();
L.control.scale({
position: 'topleft',
maxWidth: '250',
}).addTo(map);
}
})
}
})
}
</script>