mapbox / geojson.io

A quick, simple tool for creating, viewing, and sharing spatial data
http://geojson.io/
ISC License
1.91k stars 567 forks source link

Error when using API url #822

Closed PJHiggins closed 1 year ago

PJHiggins commented 1 year ago

I attempt to use the API url when zoomed in on the portion of the map I would like to se in a python kernel:

https://geojson.io/#map=3.45/49.24/8.31

Your website says this should be possible: "map Open the map at a specific location. The argument is numbers separated by / in the form zoom/latitude/longitude. Example: http://geojson.io/#map=2/20.0/0.0"

However, I get an error when trying to load into geopandas:

image

Error text: DriverError: '/vsimem/ced7ec438e5449cfbca10aec91d5b2eb' not recognized as a supported file format.

Is there a way around this? Or do I need to download and upload it from my computer? I would like to avoid doing this if at all possible.

Hope you can be of help,

Patrick

chriswhong commented 1 year ago

I'm not sure what you're trying to do, but readFile() on a geojson.io URL will just get you an HTML document, not data. If you're trying to load geojson data into python, you would need to download it to a file first.