I want to know how to create or generate a map for jquery plugin jvectormap http://jvectormap.com/
The project has several maps: http://jvectormap.com/maps/
but I need I map with Australia and new Zeland divided by states. In the documentation in github https://github.com/bjornd/jvectormap, it says that anyone can generate a map with this command:
python \
path/to/converter.py \
path/to/geo-data.shp \
path/to/resulting-map.js \
--width 900 \
--country_name_index 4 \
--where "ISO = 'USA'" \
--codes_file path/to/codes-en.tsv \
--insets '[{"codes": ["US-AK"], "width": 200, "left": 10, "top": 370}, {"codes": ["US-HI"], "width": 100, "left": 220, "top": 400}]' \
--minimal_area 4000000 \
--buffer_distance -3000 \
--simplify_tolerance 1000 \
--longtitude0 10w \
--name us
but I think is outdates, cause I downloaded http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/ as the documentation says, but of course didn't work.
Can anyone tell me how to generate a map with australia and new zeland divided by states for jvectormap??
thanks
Just in case anyone will need the same. To run converter, you need (this instruction is valid for Windows environment):
python ^
converter.py ^
../../ne_10m_admin_1_states_provinces_shp.shp ^
test-map.js ^
--width 400 ^
--where "ISO_3166_2 = 'RU-' and code_hasc!=''" ^
--country_name_index 12 ^
--country_code_index 18 ^
--minimal_area 4000000 ^
--buffer_distance -0.5 ^
--simplify_tolerance 10000 ^
--longitude0 54.8270 ^
--name russia
As a sample output attaching this fiddle with russian map generated using steps mentioned above http://jsfiddle.net/dyP4c/3/
About parameters (what I know)
where condition is used to filter out shapes from shapefile using shapefile attributes
simplify_tolerance will affect map quality and size
country_name_index index of REGION NAME attribute in shapefile or column in tab separated file if codes_file is used
country_code_index index of REGION CODE attribute in shapefile or column in tab separated file if codes_file is used
codes_file is tab separated file (if you want to use names/codes not from shapefile)
longitude0 is longitude of area (used this)
name is map name
P.S.: OSGeo4W package has nice Quantium GIS Browser to browse shapefile attributes. You can try to search other shapefiles on the web (not only natural data) to convert to jvectormap
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With