缩放MapBox标记大小(ios sdk)

时间:2023-02-04 19:39:21

I'm trying to change the size of the marker image during a zoom event, so the image scales nicely while pinching/zooming.

我正在尝试在缩放事件期间更改标记图像的大小,因此图像在缩放/缩放时可以很好地缩放。

I can't find anywhere how to do this, the closest I have come is to resize the marker image after the zoom event is completed (when the zoom level changes)

我无法在任何地方找到如何做到这一点,我最接近的是在缩放事件完成后(当缩放级别改变时)调整标记图像的大小

It would look a lot nicer if it would resize during the zoom event instead of after.

如果在缩放事件期间而不是之后调整大小,它看起来会更好。

Any ideas?

1 个解决方案

#1


0  

Look into using RMMapLayer directly (RMMarker's superclass) which should scale when zoomed. RMShape and RMCircle are also a good, albeit not directly related, models for this since they represent shapes that "stick" to the map instead of points that don't scale. But the short answer is there is not built-in functionality for this.

直接使用RMMapLayer(RMMarker的超类),它应该在缩放时进行缩放。 RMShape和RMCircle也是一个很好的,尽管不是直接相关的模型,因为它们代表的形状“贴”到地图而不是不能缩放的点。但简短的回答是没有内置功能。

#1


0  

Look into using RMMapLayer directly (RMMarker's superclass) which should scale when zoomed. RMShape and RMCircle are also a good, albeit not directly related, models for this since they represent shapes that "stick" to the map instead of points that don't scale. But the short answer is there is not built-in functionality for this.

直接使用RMMapLayer(RMMarker的超类),它应该在缩放时进行缩放。 RMShape和RMCircle也是一个很好的,尽管不是直接相关的模型,因为它们代表的形状“贴”到地图而不是不能缩放的点。但简短的回答是没有内置功能。