[AGSLocalTiledLayer localTiledLayerWithName:fileName]
[AGSLocalTiledLayer localTiledLayerWithPath:filePath]
-(AGSLocalTiledLayer *)retrieveOfflineBasemap{ NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSArray *files = [[NSFileManager defaultManager]contentsOfDirectoryAtPath:rootPath error:nil]; AGSLocalTiledLayer *localBasemap; for (NSString *file in files){ if ([file hasSuffix:@basemap.tpk]){ NSString *bmpPath = [rootPath stringByAppendingPathComponent:file]; localBasemap = [AGSLocalTiledLayer localTiledLayerWithPath:bmpPath]; break; } } return localBasemap; }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.