本文介绍了如何为jvectormap jquery插件生成新地图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我想知道如何为jquery插件创建或生成地图jvectormap http://jvectormap.com/I want to know how to create or generate a map for jquery plugin jvectormap http://jvectormap.com/该项目有几张地图: http:/ /jvectormap.com/maps/但是我需要我映射澳大利亚和新的Zeland除以州。在github https://github.com/bjornd/jvectormap 的文档中,它说任何人都可以生成使用此命令的地图: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但我认为已经过时,因为我下载了 http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-states-provinces/ 正如文档所述,但是当然没有用。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.谁能告诉我如何用澳大利亚和新的zeland生成地图除以jvectormap的状态?Can anyone tell me how to generate a map with australia and new zeland divided by states for jvectormap??谢谢推荐答案万一有人会需要相同的。 要运行转换器,您需要(此指令适用于Windows环境):Just in case anyone will need the same.To run converter, you need (this instruction is valid for Windows environment): 下载并安装 OSGeo4W (使用快速桌面安装) 下载所需的形状文件(此自然数据文件正常工作)。 将 anyjson 放入转换器目录 在转换器目录中创建 makemap.bat ,如下所示:download and install OSGeo4W (use Express Desktop Install)download desired shape file (this natural data file works fine).put anyjson to converter directorycreate makemap.bat in converter directory, like this: python ^     converter.py ^     ../../ ne_10m_admin_1_states_provinces_shp.shp ^     test-map.js ^     - width 400 ^      - 其中ISO_3166_2 = 'RU-'和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 运行OSGeo4W shell(它将被添加到开始菜单) 运行makemap.bat 享受生成的地图作为一个示例输出附加俄罗斯地图使用上面提到的步骤生成的小提琴 http://jsfiddle.net/dyP4c/3/As a sample output attaching this fiddle with russian map generated using steps mentioned above http://jsfiddle.net/dyP4c/3/关于参数(我所知道) 其中条件用于使用shapefile属性过滤掉shapefile中的形状 simplify_tolerance 会影响地图质量和尺寸 如果使用codes_file,则shapefile中的REGION NAME属性或制表符分隔文件中的列的REGION NAME属性会影响地图质量和大小 country_name_index 索引 country_code_index 如果使用codes_file,则shapefile中的REGION CODE属性或制表符分隔文件中的列的索引 codes_file 是制表符分隔文件(如果您想使用不是来自shapefile的名称/代码) longitude0 是区域的经度(使用此) 名称是地图名称where condition is used to filter out shapes from shapefile using shapefile attributessimplify_tolerance will affect map quality and sizecountry_name_index index of REGION NAME attribute in shapefile or column in tab separated file if codes_file is usedcountry_code_index index of REGION CODE attribute in shapefile or column in tab separated file if codes_file is usedcodes_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 PS:OSGeo4W包很不错 Quantium GIS浏览器浏览shapefile属性。您可以尝试在网络上搜索其他shapefile(不仅是自然数据)以转换为jvectormapP.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 这篇关于如何为jvectormap jquery插件生成新地图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-11 03:53