Skip to content
This repository was archived by the owner on May 9, 2018. It is now read-only.
This repository was archived by the owner on May 9, 2018. It is now read-only.

Map rendering from mbtiles is very slow #644

@wasatchtechnology

Description

@wasatchtechnology

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions