cnmaps icon indicating copy to clipboard operation
cnmaps copied to clipboard

使用to_file报错。

Open mgs2-007 opened this issue 1 year ago • 1 comments

版本1.0.0

代码:

from cnmaps import get_adm_maps
china = get_adm_maps(level="国", record= "first", only_polygon=True, wgs84=True)
china.to_file('./china.geojson')  # 默认为 geojson 格式文件

问题: File "/Users/……/Downloads/……/map/cnampsTest.py", line 3, in china.to_file('./china.geojson') # 默认为 geojson 格式文件 AttributeError: 'MapPolygon' object has no attribute 'to_file'

另,我想把几个省的地图合并后导出轮廓的经纬度数据,可以做到吗?

mgs2-007 avatar Jul 09 '24 16:07 mgs2-007

@mgs2-007 可以,但是需要升级到最新版本。

Clarmy avatar Jul 10 '24 02:07 Clarmy