Skip to content

Instantly share code, notes, and snippets.

@mousebird
Last active August 29, 2015 14:22
Show Gist options
  • Save mousebird/7af0003737e0246a0605 to your computer and use it in GitHub Desktop.
Save mousebird/7af0003737e0246a0605 to your computer and use it in GitHub Desktop.
NSData *styleData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"MapzenGLStyle" ofType:@"json"]];
thisCacheDir = [NSString stringWithFormat:@"%@/mapzen-vectiles",cacheDir];
MapzenSource *mzSource = [[MapzenSource alloc]
initWithBase:@"http://vector.mapzen.com/osm"
layers:@[@"all"]
// Note: Go get your own API key
apiKey:@"vector-tiles-05s8a-0"
sourceType:MapzenSourcePBF
styleData:styleData
styleType:MapnikMapboxGLStyle
viewC:baseViewC];
mzSource.minZoom = 0;
mzSource.maxZoom = 24;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment