标记国家边界 - iPad(带或不带 MapKit)
我想对国家边界(边界)进行着色(填充和/或描边),假设您有一张世界地图并且用户选择了意大利,则意大利的边界将被描边,并且意大利的区域将被填充颜色。
如果用户可以缩放和移动全局地图,那就太好了,但不是必须的。 我正在寻找一些干净、动态、iOS5 友好且易于集成的东西,可以基于或不基于mapKit。
我知道这可以通过 KML 文件来完成,但我相当确定已经有一个库 - 所以我不需要再次重新发明火。
I would like to color (fill and/or stroke) a country boundaries (boarders), say you have a world map and the user picked Italy, the boarders of italy will be stroked and the area of Italy will be filled with a color.
It would be very nice if the user can zoom and move the global map, but not a must.
I am looking for something clean, dynamic , iOS5 friendly and easy to integrate, can be mapKit based or not.
I am aware that this can be done by KML files, but I am rather sure there is a library already out there - so there is no need of me reinventing fire, again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经做到了这一点,但这有点棘手。您必须获取边界的所有坐标:我使用此工具来获取所有边界我的边界的坐标,您必须使用折线工具,每次单击地图时,此工具都会生成右侧的所有坐标。获得所有坐标后,将它们保存在某个 txt 或 klm 文件中,然后使用 MKOverlay 类根据文件的坐标绘制叠加层。
希望它很清楚,如果您想要该片段,请告诉我(我现在没有机器)。
I've done this, but it's a little tricky. You have to get all the coordinates for the boundary: i used this tool to get all the coordinates of my boudary, you have to use the polyline tool and each time you click on the map this tool generates all the coordinates on the right. Once you have all the coordinates, save them in some txt or klm file, then use
MKOverlay
class to draw the overlay based on the file's coordinates.Hope it's clear, let me know if you want the snippet(i don't have my machine now).