Merge pull request #17 from andreasIBM/Image-Overlay

Added Capability for ImageOverlay
This commit is contained in:
Dave Conway-Jones 2017-06-25 11:02:26 +01:00 committed by GitHub
commit fb3efc020f

View File

@ -1054,6 +1054,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);
}