Closed santilland closed 4 months ago
GeoJSON that don't come in 4326 are not really following the standard, but sometimes I guess we have to deal with that...
It was probably foreseeable that we need that feature at some point. I think this is a good idea, especially since we already are flexible via the eoxMapAdvancedOlFormats
. Also, the options
of our base formats GeoJSON
and MVT
are quite simple.
I have no real preference between setting the projection on the format vs on the source
It might be more understandable to have the projection on the source level, because this is how the other layer types do it, i imagine there were some good reasons in OL to do it on format level, so i guess it is also fine (or maybe even more robust?) to keep the same approach for eox-map definitions
Were you (or will you be) able to work on this @RobertOrthofer ?
i will try to make a PR today, I'm also trying to use the types of the new ol while being at it
Turn out that registering the projections is a bit of a complication in some places, as we instantiate eox-maps quite dynamically based on content, so we are looking into solving that, but in general for now the solution looks good
Currently we can only pass the format type as string, eg.g. "format": "GeoJSON". Some GeoJSON data soruces do not use expected 4326 projection, we need a way to pass a projection. After some discussion with @silvester-pari we think allowing to pass also an object might be the best approach, e.g.:
It would be good to understand if we can do this for other potential formats (GML, GPX, IGC, KML, MVT, WFS, WKB, WKT, XML, GPX, IGC, KML, WFS, WKT, GML2, GML3, GML32, OSMXML)?
VectorTiles "layer" have their own projection attribute, so there we can already pass a projection?
The example we would have is: