Create new geo shape and append it

Take Tianjin city as an example. Jizhou district was merged into Tianjin city in June, 2016. Hence, echarts-maps needs to update Tianjin map.

Tutorial

  1. Please download Tianjin map and save as: tianjin.geojson
  2. Open geojson.io in your browser. Drag and drop tianjin.geojson into it:

    geojson

  3. Draw Jizhou district using Polygon tool:

    Please remember that to close the polygon, you need to click the first point jizhouqu

  4. After the polygon is complete, the helping shapes disappears but the polygon. Please save the right hand side geojson as:jizhouqu.geojson

    jizhouqu-done

  5. It is time to use echarts-mapmaker.

    $ npm install -g echarts-mapmaker $ merge tianjin.geojson jizhouqu.geojson $ ls merged_tianjin.geojson

  6. merged_tianjin.geojson is then the final geojson

    merged-tianjin

Make a js file

This needs echarts-mapmaker.

$ makejs tianjin.geojson tianjin.js 天津

Please note that the last name is a map registry name so you will need to use the same name inside echarts.