Maps4HTML / MapML.js

A custom <mapml-viewer> and <layer-> element suite
https://maps4html.org/MapML.js/
Other
57 stars 16 forks source link

Link to GeoJSON resource should not give a parser error #992

Open prushforth opened 1 month ago

prushforth commented 1 month ago

It might be nice to have the ability, not only to paste actual GeoJSON but also to paste a link to a GeoJSON resource and have it automagically transform to a layer full of \s. Currently I think it tries to evaluate the geojson text as if it was a link to a MapML document. GeoJSON is going to be actually more common use case, so it would be nice to support that, where possible i.e. maybe not yet in ff or safari.

e.g. https://api.weather.gc.ca/collections/climate-normals/items?f=json&limit=10&lang=en

AliyanH commented 1 month ago

+1 currently, all links are treated as MapML documents, I think we should check the URL and content type of the link and treat it accordingly, GeoJSON links (even GeoJSON files) are definitely more common then GeoJSON text.