Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

画中国地图或者省份地图时,能不能只显示它自己不要多余部分? #10

Closed
hutaohutc opened this issue May 11, 2019 · 1 comment

Comments

@hutaohutc
Copy link

大为,你好,问个小问题:在画中国地图或者省份地图时,能不能只显示它自己不要多余部分?我好像没找到这个参数,原理的话我觉得是将地图数据与要显示的数据先连接一下,然后把没连接上的都去掉就可以了,类似下面这样,然后画出来就可以了

mapdata = merge(地图数据,数据框数据,by='id',all.x = T)
mapdata2 =mapdata[ ia.na(value),]

平时在leaflet上都是这么操作的,但是每次画中国地图都要去找一遍地图数据比较麻烦,leafletCN自带数据很方便,希望有空看到回答下~

@hutaohutc
Copy link
Author

Same as #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant