简体   繁体   English

iOS Pinch使用图像叠加功能放大地图吗?

[英]iOS Pinch Zoom on Map with Image Overlay?

Want to know if it is possible to Pinch Zoom on a map that has an image overlay on top of it? 是否想知道是否可以在其上有图像叠加层的地图上进行缩放? So for example, in the app is a map. 因此,例如,在应用程序中是一张地图。 I want to add an image on top of the map yet still retain the functionality of zooming in/out of the map using the uipinchgesturerecognizer. 我想在地图顶部添加图像,但仍保留使用uipinchgesturerecognizer放大/缩小地图的功能。 I can add buttons to programmatically zoom, but I would prefer to pinch zoom if I can. 我可以添加按钮以编程方式进行缩放,但如果可以的话,我希望捏一下缩放。 thanks! 谢谢!

You need to utilize hittest to check if a pinch gesture on overlay image intersects with mapView. 您需要利用hittest来检查覆盖图像上的捏合手势是否与mapView相交。 If it does, pass the gesture to mapView. 如果是这样,请将手势传递给mapView。

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

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