Description
Is your feature request related to a problem? Please describe.
pygeoapi currently uses Leaflet in all of it's default HTML templates to produce web maps. pygeoapi also supports multiple CRSs as implementations of OGC API. The lack of support for different HTML map CRSs that pygeoapi implements, introduces some misleading HTML behaviors and views. This is an issue because the maps appear to look wrong even if everything is working as intended.
As noted in #2010 (which appears to also affect QGIS), changing the CRS of a geoJSON response can have confusing behaviors on the map. Requesting for the demo pygeoapi windmills collection, the HTML of ESPG:4326 appears to be in the ocean and ESPG:3857 to not appear on the map at all. Although some of this has to do with OGC API expanding the GeoJSON spec as far as I understand
As noted in #2042 tile layers projected in OGC:CRS84
do not appear at all in the HTML map. #2022 stretches the TileLayer to align with the CRS:84 OGC API Tiles, but it still is projecting ORC:CRS84
geometry on top of a ESPG:3857
base-map. It is possible to make this look correct by using a WMSTileLayer instead, but this would override the configuration file's map options.
and then here is the visual distortion between OGC:CRS84
and EPSG:3857
Describe the solution you'd like
There are a couple of ways to go about this.
- A first pass could be an implementation of an additional HTML Template theme that replaces the leaflet functionality with openlayers.
- We could expand the configuration section to better enumerate and configure the mapping engine used in the default templates.
- We could replace leaflet in the default templates
Describe alternatives you've considered
If there is a public OSM TileLayer that supports additional projections I would be interested in seeing how to incorporate this (cc: @IvanSanchez not sure if you have any wisdom here). I can't tell if the issue is just that there is no real public endpoint for OSM tiles in a different projection or because of something else.
Additional context
Add any other context or screenshots about the feature request here.