Skip to content

Commit

Permalink
Copy coordinates instead of storing leaflet objects
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Nov 15, 2016
1 parent 2ff0ba2 commit 21fe12f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions web/client/components/map/leaflet/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,14 @@ let LeafletMap = React.createClass({
this.map.on('singleclick', (event) => {
if (this.props.onClick) {
this.props.onClick({
pixel: event.containerPoint,
latlng: event.latlng
pixel: {
x: event.containerPoint.x,
y: event.containerPoint.y
},
latlng: {
lat: event.latlng.lat,
lng: event.latlng.lng
}
});
}
});
Expand Down Expand Up @@ -269,7 +275,10 @@ let LeafletMap = React.createClass({
x: pos.lng,
y: pos.lat,
crs: "EPSG:4326",
pixel: event.containerPoint
pixel: {
x: event.containerPoint.x,
y: event.containerPoint.x
}
});
},
registerHooks() {
Expand Down

0 comments on commit 21fe12f

Please sign in to comment.