fixes #70: raster tile rendering as toggleable mode from vector

This commit is contained in:
Justin R. Miller
2014-03-18 16:57:17 -07:00
parent bdfa761c39
commit 00a3245ce8
24 changed files with 604 additions and 196 deletions

View File

@@ -121,6 +121,10 @@ class MBXMapView
threeFingerLongPress.numberOfTouchesRequired = 3;
[self.view addGestureRecognizer:threeFingerLongPress];
UILongPressGestureRecognizer *fourFingerLongPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleFourFingerLongPressGesture:)];
fourFingerLongPress.numberOfTouchesRequired = 4;
[self.view addGestureRecognizer:fourFingerLongPress];
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
{
UILongPressGestureRecognizer *quickZoom = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleQuickZoomGesture:)];
@@ -360,6 +364,16 @@ class MBXMapView
[self updateRender];
}
- (void)handleFourFingerLongPressGesture:(UILongPressGestureRecognizer *)fourFingerLongPress
{
mapView->map.cancelAnimations();
if (fourFingerLongPress.state == UIGestureRecognizerStateBegan)
mapView->map.toggleRaster();
[self updateRender];
}
- (void)handleQuickZoomGesture:(UILongPressGestureRecognizer *)quickZoom
{
mapView->map.cancelAnimations();