diff --git a/src/util/ImageUtil.js b/src/util/ImageUtil.js index 234659dac..225128e05 100644 --- a/src/util/ImageUtil.js +++ b/src/util/ImageUtil.js @@ -1,12 +1,12 @@ L.ImageUtil = { - getCmPerPixel(overlay) { - var map = overlay._map; + getCmPerPixel:((overlay)=> { + let map = overlay._map; - var dist = map + let dist = map .latLngToLayerPoint(overlay.getCorner(0)) .distanceTo(map.latLngToLayerPoint(overlay.getCorner(1))); return (dist * 100) / overlay.getElement().width; - }, + }), };