Search code examples
phpjsonshapefilejvectormap

How to convert Shapefile to jVectormap?


I am trying to make something for my term project.

I need to take a country from the list below: http://www.gadm.org/country here.

Then I must convert this file to jvectormap map file. But how? Here is example how jvectormap wants coordinates for map: http://jvectormap.com/js/jquery-jvectormap-ch-mill-en.js

then, what should I do to convert shapefile from gadm.org to jvectormap?


Solution

  • It looks like the jvectormap project has a converter script available for you to use. It should be able to convert shapefiles (.shp). You can find the python converter script on their github repository: https://github.com/bjornd/jvectormap/blob/master/converter/converter.py

    The docs at the jvectormap site explain in detail how to use this converter: http://jvectormap.com/documentation/gis-converter/

    I haven't tried this myself but it looks like it's well documented.