From 901ce1439412152e83a14ae7048efeeeb4c01127 Mon Sep 17 00:00:00 2001 From: kappu Date: Tue, 8 Aug 2017 10:57:20 +0200 Subject: [PATCH] Fixed Leaflet GET_COORDINATES_FROM_PIXEL_HOOK and GET_PIXEL_FROM_COORDINATES_HOOK hooks --- web/client/components/map/leaflet/Map.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/components/map/leaflet/Map.jsx b/web/client/components/map/leaflet/Map.jsx index 9cd38eff66..4180b546aa 100644 --- a/web/client/components/map/leaflet/Map.jsx +++ b/web/client/components/map/leaflet/Map.jsx @@ -336,7 +336,7 @@ class LeafletMap extends React.Component { }); mapUtils.registerHook(mapUtils.GET_PIXEL_FROM_COORDINATES_HOOK, (pos) => { let latLng = CoordinatesUtils.reproject(pos, this.props.projection, 'EPSG:4326'); - let pixel = this.map.latLngToContainerPoint([latLng.x, latLng.y]); + let pixel = this.map.latLngToContainerPoint([latLng.y, latLng.x]); return [pixel.x, pixel.y]; }); mapUtils.registerHook(mapUtils.GET_COORDINATES_FROM_PIXEL_HOOK, (pixel) => {