简体   繁体   中英

How to load GeoJson file properly?

I have a geojson file of Moscow districts that is avaliable at

http://gis-lab.info/data/mos-adm/mo.geojson

So, I can't load it properly.

These ideas does not help:

I tried to create a map and then add a layer on it.

 import folium

m = folium.Map(location = [55.7522200,37.6156000], zoom_start_13)

folium.GeoJson(open('mo.geojson')).add_to(m)'

this does not work

Try folium.GeoJson(open('mo.geojson').read()).add_to(m)

This reads the contents of the file and passes the string to folium.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM