0

I have a GMSMapView inside a SWTableViewCell, i've disabled the scrolling but apparently it doesn't inherit the scrolling (or other gestures) of the table/cell. Scrolling and swiping the cell works in all the other parts of the cell but not on the GMSMapView.

GMSMapView *map = [GMSMapView mapWithFrame: CGRectMake(0, 0, self.view.bounds.size.width, cell.mapView.bounds.size.height) camera:camera]; 

map.settings.compassButton = NO;
map.settings.myLocationButton = NO;
map.myLocationEnabled = NO;
map.settings.scrollGestures = NO;
map.settings.zoomGestures = YES;

[cell.mapView addSubview:map];

How can i inherit on the map the table's scrolling and swiping gestures?

3 Answers3

0

Don't use live map view on table view, it will reload the map on every scrolling use snapshot of map, which will create an image and store it on cache so that it will not create image every time and you can show the image on a image view. For how to take a snapshot of a map view you can use this link

Community
  • 1
  • 1
souvickcse
  • 7,742
  • 5
  • 37
  • 64
0

just use this method

googlemap.settings.setAllGesturesEnabled(false)
Alex Sed
  • 13
  • 4
0

Instead of disabling all gestures I think by disabling scroll and consumes gestures in view will do the trick.

mapView.settings.scrollGestures = false
mapView.settings.consumesGesturesInView = false
Mohammad Faisal
  • 1,977
  • 1
  • 18
  • 15