Integrate with pyecharts
Dependencies
node.js
is required and can be installed from its website.
I would recommend nvm,because switching in between different versions are made effortless.
With node.js installed, you will need to install echarts-mapmaker
Prepare a js file
makejs
comes from echarts-mapmaker
. It can do UTF-8 encoding on the geojson
and write out to a js file. It is expected that UTF-8 encoding will reduce
file size.
makejs The-Forbidden-City.geojson The-Forbidden-City.js "The Forbidden City"
Create a custom registry
Please copy the following content and save as "registry.json" in your current working folder.
{ "JS_FOLDER": "/", "PINYIN_MAP": {}, "FILE_MAP": { "The Forbidden City": "The-Forbidden-City" } }
Host it locally
$ python -m http.server Serving HTTP on 0.0.0.0 port 8000 ...
You should be able to access http://127.0.0.1:8000/registry.json