You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a component built upon ipyleaflet to streamline the interactive exploration of geo-located data in xarray.
This worked on the assumption that an on_click event on a Marker would contain the exact geo-coordinates at which the Marker was created. However if some markers are geographically very close, and perhaps because MarkerCluster is used, this fails to work.
Example
I have ~1500 points with streamflow monitoring sites:
zoming in on to most area, markers "ungroup" as expected, and clicking on each marker triggers a successful action based on the click lat/lon information.
Zooming in on to a location (the Marne river in South Australia, not the one in Europe 😄 ...), a cluster persists even at maximum zoom:
clicking on the cluster "opens" it
but then clicking on one of the icon triggers a KeyError: (-34.67698205588844, 139.24381256103518) as coordinates are not exactly the same as expected: [((-34.6743, 139.2319), 'A4260529'), ((-34.6741, 139.2317), 'A4260605')]
One workaround may be to not use MarkerCluster as in ipyleaflet issue #498 . But I'd like to keep MarkerCluster and find another way to circumvent this issue.
The text was updated successfully, but these errors were encountered:
Context
I have a component built upon
ipyleaflet
to streamline the interactive exploration of geo-located data inxarray
.This worked on the assumption that an
on_click
event on aMarker
would contain the exact geo-coordinates at which the Marker was created. However if some markers are geographically very close, and perhaps becauseMarkerCluster
is used, this fails to work.Example
I have ~1500 points with streamflow monitoring sites:
zoming in on to most area, markers "ungroup" as expected, and clicking on each marker triggers a successful action based on the click lat/lon information.
Zooming in on to a location (the Marne river in South Australia, not the one in Europe 😄 ...), a cluster persists even at maximum zoom:
clicking on the cluster "opens" it
but then clicking on one of the icon triggers a
KeyError: (-34.67698205588844, 139.24381256103518)
as coordinates are not exactly the same as expected:[((-34.6743, 139.2319), 'A4260529'), ((-34.6741, 139.2317), 'A4260605')]
Related links
More details in jmp75/ipyleaflet-dashboard-tools#2
One workaround may be to not use MarkerCluster as in ipyleaflet issue #498 . But I'd like to keep MarkerCluster and find another way to circumvent this issue.
The text was updated successfully, but these errors were encountered: