Change GIS library? #29

Open
opened 2024-09-27 08:09:35 +00:00 by ianrenton · 2 comments
ianrenton commented 2024-09-27 08:09:35 +00:00 (Migrated from github.com)

As discovered in #28, Field Spotter's display of spots doesn't work very well for users outside Europe. Leaflet.js handles longitude wrapping pretty badly, and there have been lots of ultimately fruitless discussions about this, e.g.:

There are suggestions online, however none are entirely satisfactory, e.g.:

  • worldCopyJump from Leaflet's options, but this still only shows one copy of the markers, it just jumps them all when the centre of the projection crosses 180 longitude.
  • The RepeatedMarkers plugin shows promise, but I have had to customise it and it still doesn't work well with Spiderfier or our band-panel query of which markers are shown in the current projection (see #28).
  • Manually adjusting longitudes by +-360 degree jumps keeps getting recommended, but this only works for a fixed view; we would have to regenerate the markers on every projection change.

All this leads me to wonder if Leaflet.js might not be the right library for us. Consider whether something like Cesium, which is inherently 3D, might be a better fit for Field Spotter's global scope. OpenLayers should also be considered as it is more mature.

As discovered in #28, Field Spotter's display of spots doesn't work very well for users outside Europe. Leaflet.js handles longitude wrapping pretty badly, and there have been lots of ultimately fruitless discussions about this, e.g.: - Leaflet/Leaflet#2333 (now 11 years old, closed without resolution) - Leaflet/Leaflet#1293 (also 11 years old, unmerged) There are suggestions online, however none are entirely satisfactory, e.g.: - `worldCopyJump` from [Leaflet's options](https://leafletjs.com/reference.html#map-option), but this still only shows one copy of the markers, it just jumps them all when the centre of the projection crosses 180 longitude. - The [RepeatedMarkers plugin](https://gitlab.com/IvanSanchez/Leaflet.RepeatedMarkers) shows promise, but I have had to customise it and it still doesn't work well with Spiderfier or our band-panel query of which markers are shown in the current projection (see #28). - [Manually adjusting longitudes by +-360 degree jumps](https://stackoverflow.com/questions/38820724/how-to-display-leaflet-markers-near-the-180-meridian/) keeps getting recommended, but this only works for a fixed view; we would have to regenerate the markers on every projection change. All this leads me to wonder if Leaflet.js might not be the right library for us. Consider whether something like Cesium, which is inherently 3D, might be a better fit for Field Spotter's global scope. OpenLayers should also be considered as it is more mature.
ianrenton commented 2024-09-27 08:23:25 +00:00 (Migrated from github.com)
Spiderfying/clustering might be an issue in Cesium: - https://groups.google.com/g/cesium-dev/c/L8EvEBNZb10/m/cxdOuJLylAMJ - https://community.cesium.com/t/clustering-feature/1256/5
ianrenton commented 2024-11-02 09:13:47 +00:00 (Migrated from github.com)

Consider MapLibre: https://maplibre.org/maplibre-gl-js/docs/
Definitely has a spiderfy plugin: https://github.com/nazka/map-gl-js-spiderfy
Need to determine if/how it solves the main problem

Consider MapLibre: https://maplibre.org/maplibre-gl-js/docs/ Definitely has a spiderfy plugin: https://github.com/nazka/map-gl-js-spiderfy Need to determine if/how it solves the main problem
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ian/field-spotter#29
No description provided.