How to create a custom geojson shape and get it displayed with pyecharts
The source files of this tutorial is on github
Draw your first polygon: the Forbidden City in Beijing
-
Open geojson.io in Chrome
-
Centre the map on Beijing and zoom out
-
Click on polygon tool and start drawing
-
Remember to finish a polygon, you must click the first point which you started from.
-
Highlight the text area on the right. Please insert one key value pair as underlined:
```"name": "The Forbidden City"
- Then save the geojson into a local file, for example "The-Forbidden-City.geojson"
Preview geojson
Open geojson.io in another window. Drag and drop the new file into it. You should see the Forbidden City polygon.
Coming up
We are going to integrate it with pyecharts