Added Capability for ImageOverlay
Bounds are a 2 Dimensional Array that define the top left and bottom right coordinates (lat lng) wher the Image should be placed
This commit is contained in:
parent
e71332dc15
commit
6d77caa0d2
@ -1042,6 +1042,11 @@ function doCommand(cmd) {
|
||||
overlays[cmd.map.name] = L.tileLayer.wms(cmd.map.url, cmd.map.opt);
|
||||
}
|
||||
}
|
||||
else if (cmd.map.hasOwnProperty("bounds")) { //Image Overlay in the bounds specified (2D Array)
|
||||
if (cmd.map.bounds.length === 2 && cmd.map.bounds[0].length === 2 && cmd.map.bounds[1].length === 2) {
|
||||
overlays[cmd.map.overlay] = new L.imageOverlay(cmd.map.url, L.latLngBounds(cmd.map.bounds));
|
||||
}
|
||||
}
|
||||
else {
|
||||
overlays[cmd.map.overlay] = L.tileLayer(cmd.map.url, cmd.map.opt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user