Open hxboxy-xh opened 2 years ago
使用http://gaohr.win/site/blogs/2017/2017-04-18-GIS-basic-data-of-China.html#County_pl 上面的主要铁路shp文件,铁路名称属性NAME的时候汉字显示为问号, PINYIN显示正常
中文乱码了呗,shp等文件的编码可能是gbk,但是shpjs默认用utf8解析文本。可以通过增加与shp文件同名的cpg文件,内容为编码的名称,比如:gbk。
使用http://gaohr.win/site/blogs/2017/2017-04-18-GIS-basic-data-of-China.html#County_pl 上面的主要铁路shp文件,铁路名称属性NAME的时候汉字显示为问号, PINYIN显示正常