移动地图叠加层
我正在尝试创建一个应用程序,用户可以在其中标记地图上的区域。我希望他能够移动他标记的区域。
我发现有一个用于在地图上添加叠加层的 api,但是一旦将它们放在地图上,我就无法移动这些叠加层。我尝试用我自己的视图子类化 MKCircleView 并实现 TouchBegan:withEvent: 方法,但它似乎从未被调用。
有什么想法可以实现这一点以及为什么它不能以这种方式工作吗?
谢谢。
I am trying to create an app where the user can mark an area on a map. I want him to be able to move the area he marked.
I found that there is an api for adding overlays on a map, but I cannot get to move those overlays once I put them on the map. I tried to subclass the MKCircleView with my own view and implement the touchesBegan:withEvent: method but it never seems to get called.
Any ideas how this can be implemented and why it doesn't work this way?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试查看苹果开发人员代码中名为“区域”的示例。
它有可以拖动和移动的圆圈。
Try looking through the apple developer code for sample called Regions.
It has circles which can be dragged and moved around.