o Might fix #66 but might also introduce other problems
Showing
1 changed file
with
11 additions
and
10 deletions
@@ -962,6 +962,7 @@ | @@ -962,6 +962,7 @@ | ||
962 | 962 | ||
963 | [mapScrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:NULL]; | 963 | [mapScrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:NULL]; |
964 | [mapScrollView setZoomScale:exp2f([self zoom]) animated:NO]; | 964 | [mapScrollView setZoomScale:exp2f([self zoom]) animated:NO]; |
965 | + | ||
965 | [self setDecelerationMode:decelerationMode]; | 966 | [self setDecelerationMode:decelerationMode]; |
966 | 967 | ||
967 | _lastZoom = [self zoom]; | 968 | _lastZoom = [self zoom]; |
@@ -1245,7 +1246,7 @@ | @@ -1245,7 +1246,7 @@ | ||
1245 | if (tileSource == newTileSource) | 1246 | if (tileSource == newTileSource) |
1246 | return; | 1247 | return; |
1247 | 1248 | ||
1248 | - int previousTileSideLength = [tileSource tileSideLength]; | 1249 | +// int previousTileSideLength = [tileSource tileSideLength]; |
1249 | RMProjectedPoint centerPoint = [self centerProjectedPoint]; | 1250 | RMProjectedPoint centerPoint = [self centerProjectedPoint]; |
1250 | 1251 | ||
1251 | [tileSource cancelAllDownloads]; | 1252 | [tileSource cancelAllDownloads]; |
@@ -1271,17 +1272,17 @@ | @@ -1271,17 +1272,17 @@ | ||
1271 | [self setMaxZoom:newTileSource.maxZoom]; | 1272 | [self setMaxZoom:newTileSource.maxZoom]; |
1272 | [self setZoom:[self zoom]]; // setZoom clamps zoom level to min/max limits | 1273 | [self setZoom:[self zoom]]; // setZoom clamps zoom level to min/max limits |
1273 | 1274 | ||
1274 | - if (previousTileSideLength == 0 || previousTileSideLength == [tileSource tileSideLength]) | ||
1275 | - { | ||
1276 | - // Reload the map with the new tilesource | ||
1277 | - tiledLayerView.layer.contents = nil; | ||
1278 | - [tiledLayerView.layer setNeedsDisplay]; | ||
1279 | - } | ||
1280 | - else | ||
1281 | - { | 1275 | +// if (previousTileSideLength == 0 || previousTileSideLength == [tileSource tileSideLength]) |
1276 | +// { | ||
1277 | +// // Reload the map with the new tilesource | ||
1278 | +// tiledLayerView.layer.contents = nil; | ||
1279 | +// [tiledLayerView.layer setNeedsDisplay]; | ||
1280 | +// } | ||
1281 | +// else | ||
1282 | +// { | ||
1282 | // Recreate the map layer | 1283 | // Recreate the map layer |
1283 | [self createMapView]; | 1284 | [self createMapView]; |
1284 | - } | 1285 | +// } |
1285 | 1286 | ||
1286 | [self setCenterProjectedPoint:centerPoint animated:NO]; | 1287 | [self setCenterProjectedPoint:centerPoint animated:NO]; |
1287 | } | 1288 | } |
-
Please register or login to post a comment