0

i've tried to send touch events from an another UIScrollView subclass to the Mapbox SDK, but i've discovered that the UIPanGestures from the RMMapview aren't the one used on the scrollview.

So, how can I modify the RMMapview and RMMapScrollView to recognize the UIPangestures? As far As I see, the _RMMapScrollView has it's own gestures and RMMapScrollView.contentOffset is the values that are used.

my subclass > UIScrollview myScrollview

mapbox > RMMapview > _mapscrollview > _tiledLayersSuperview > tiledLayerView

used value: _mapscrollview.contentoffset

https://github.com/mapbox/mapbox-ios-sdk/blob/develop/MapView/Map/RMMapScrollView.m

https://github.com/mapbox/mapbox-ios-sdk/blob/develop/MapView/Map/RMMapView.m

I've tried adding @property (nonatomic,assign) RMMapScrollView* _RMMapScrollView; to RMMapview, but when sending values, it crashes. I've allready looked into: #import . Could somebody give me some advice on modifying this library?

1 Answers1

1

I'm the developer behind the MapBox iOS SDK.

The reason RMMapView has its own gesture recognizers is for panning the "overlay view", which is where markers and vector paths go, in order to recognize marker drags and the like.

What you may want to do to simplify things, as well as not have a need for working inside the SDK, is to use the public API moveBy: in response to your other touch events. That method takes a CGPoint and allows you to incrementally and programmatically move the map view in a way that will take care of the other parts such as composited tile layers, the overlay view, etc.

incanus
  • 5,100
  • 1
  • 13
  • 20