This repository was archived by the owner on May 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Map rendering from mbtiles is very slow #644
Copy link
Copy link
Open
Description
I'm using 1.6.1. The drawing of the tiles is very slow. I'm using offline map because there is no network.
The mbtiles file is about 20 MB is size. When panning you have to wait and watch the tiles draw. Is there any way to speed this up? In 1.4 the performance seemed better. Would I be better served to go back to an older version?
Any help would be appreciated.
here is my map loading code;
- (void)viewDidLoad
{
[super viewDidLoad];
_minZoom = 12;
_maxZoom = 17;
_initialZoom = 13;
NSString* path = [[NSBundle mainBundle] pathForResource:@"cayman13-16regular" ofType:@"mbtiles"];
NSURL *url = [NSURL fileURLWithPath:path];
RMMBTilesSource *fileSource = [[RMMBTilesSource alloc] initWithTileSetURL:url];
_mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:fileSource];
RMSphericalTrapezium mapBoundingBox = fileSource.latitudeLongitudeBoundingBox;
[_mapView setConstraintsSouthWest:mapBoundingBox.southWest northEast:mapBoundingBox.northEast];
_mapView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
_mapView.adjustTilesForRetinaDisplay = YES; // these tiles aren't designed specifically for retina, so make them legible
[_mapView setDelegate:self];
// Add the map to the view
[self.view addSubview:_mapView];
_mapView.maxZoom = _maxZoom;
_mapView.minZoom = _minZoom;
_mapView.zoom = _initialZoom;
}Metadata
Metadata
Assignees
Labels
No labels