简体   繁体   English

在iOS上手动缩放MapKit

[英]manual zooming in MapKit on iOS

In my iOS application using MapKit I would like to use only pinch (not double tap) for zooming. 在我使用MapKit的iOS应用程序中,我只想使用捏(而不是双击)进行缩放。 I set zoomEnabled=NO, add pinch gesture recognizer and try to manually set map region coresponding to current pinch size. 我设置zoomEnabled = NO,添加捏手势识别器,并尝试根据当前捏尺寸手动设置地图区域核心。 The problem is that map only displays some zoom levels so I'm unable to achive proper zoom effect. 问题在于地图仅显示某些缩放级别,因此我无法获得适当的缩放效果。 I would appreciate any idea. 我将不胜感激。 Thank you. 谢谢。

I'd go the other way. 我会走另一条路。 Rather than disabling zoom and then rewriting it, why not add a double tap gesture recogniser and make it do nothing. 为什么不添加双击手势识别器并使它什么也不做,而不是先禁用缩放然后再重写它。 But then again, why would you take that feature away from users? 但是话又说回来,为什么要让用户放弃该功能? If someone doesn't have the manual dexterity to pinch but they can double-tap, you'll have broken the map for them. 如果某人没有手动技巧但可以轻按两次,则可能会损坏他们的地图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM