Add pbf layer support

to close #123
This commit is contained in:
Dave Conway-Jones 2021-10-29 11:30:03 +01:00
parent 0faebaa83c
commit 374f7002d2
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
4 changed files with 8 additions and 1 deletions

View File

@ -70,6 +70,7 @@
<script src="leaflet/leaflet-omnivore.min.js"></script>
<script src="leaflet/Leaflet.Coordinates.js"></script>
<script src="leaflet/leaflet.latlng-graticule.js"></script>
<script src="leaflet/VectorTileLayer.umd.min.js"></script>
<script src="leaflet/Semicircle.js"></script>
<script src="leaflet/dialog-polyfill.js"></script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2362,6 +2362,9 @@ function doCommand(cmd) {
overlays[cmd.map.overlay] = new L.imageOverlay(cmd.map.url, L.latLngBounds(cmd.map.bounds), cmd.map.opt);
}
}
else if (cmd.map.url.slice(-4).toLowerCase() === ".pbf") {
overlays[cmd.map.overlay] = VectorTileLayer(cmd.map.url, cmd.map.opt);
}
else {
overlays[cmd.map.overlay] = L.tileLayer(cmd.map.url, cmd.map.opt);
}