Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
prushforth opened this issue Oct 1, 2024 · 1 comment · May be fixed by #996
Open

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

prushforth opened this issue Oct 1, 2024 · 1 comment · May be fixed by #996

Comments

@prushforth
Copy link
Member

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

@AliyanH
Copy link
Member

AliyanH commented Oct 1, 2024

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

yushan-mu added a commit to yushan-mu/MapML.js that referenced this issue Oct 10, 2024
@yushan-mu yushan-mu linked a pull request Oct 10, 2024 that will close this issue
yushan-mu added a commit to yushan-mu/MapML.js that referenced this issue Nov 7, 2024
@AliyanH AliyanH linked a pull request Nov 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants