Web-Map-Custom-Element icon indicating copy to clipboard operation
Web-Map-Custom-Element copied to clipboard

Link to GeoJSON resource should not give a parser error

Open prushforth opened this issue 1 year ago • 1 comments

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 <map-feature>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

prushforth avatar Oct 01 '24 15:10 prushforth

+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.

AliyanH avatar Oct 01 '24 19:10 AliyanH