Inherits from RMAbstractWebMapSource : RMAbstractMercatorTileSource : NSObject
Declared in RMMapboxSource.h

Overview

An RMMapboxSource is used to display map tiles from a network-based map hosted on Mapbox or the open source TileStream software. Maps are referenced by their Mapbox map ID or by a file or URL containing TileJSON.

Properties

imageQuality

Image quality that is retrieved from the network. Useful for lower-bandwidth environments. The default is to provide full-quality imagery.

@property (nonatomic, assign) RMMapboxSourceQuality imageQuality

Discussion

Image quality that is retrieved from the network. Useful for lower-bandwidth environments. The default is to provide full-quality imagery.

Note that you may want to clear the tile cache after changing this value in order to provide a consistent experience.

Declared In

RMMapboxSource.h

infoDictionary

The TileJSON data in dictionary format. Useful for retrieving info about the layer without having to parse TileJSON.

@property (nonatomic, readonly, strong) NSDictionary *infoDictionary

Discussion

The TileJSON data in dictionary format. Useful for retrieving info about the layer without having to parse TileJSON.

Declared In

RMMapboxSource.h

tileJSON

The TileJSON for the map layer. Useful for saving locally to use in instantiating a tile source while offline.

@property (nonatomic, readonly, strong) NSString *tileJSON

Discussion

The TileJSON for the map layer. Useful for saving locally to use in instantiating a tile source while offline.

Declared In

RMMapboxSource.h

tileJSONURL

The TileJSON URL for the map layer. Useful for retrieving TileJSON to save locally to use in instantiating a tile source while offline.

@property (nonatomic, readonly, strong) NSURL *tileJSONURL

Discussion

The TileJSON URL for the map layer. Useful for retrieving TileJSON to save locally to use in instantiating a tile source while offline.

Declared In

RMMapboxSource.h

Instance Methods

centerCoordinate

A suggested starting center coordinate for the map layer.

- (CLLocationCoordinate2D)centerCoordinate

Discussion

A suggested starting center coordinate for the map layer.

Declared In

RMMapboxSource.h

centerZoom

A suggested starting center zoom level for the map layer.

- (float)centerZoom

Discussion

A suggested starting center zoom level for the map layer.

Declared In

RMMapboxSource.h

coversFullWorld

Returns YES if the tile source provides full-world coverage; otherwise, returns NO.

- (BOOL)coversFullWorld

Discussion

Returns YES if the tile source provides full-world coverage; otherwise, returns NO.

Declared In

RMMapboxSource.h

initWithMapID:

Initialize a tile source using the Mapbox map ID.

- (id)initWithMapID:(NSString *)mapID

Parameters

mapID

The Mapbox map ID string, typically in the format <username>.map-<random characters>.

Return Value

An initialized Mapbox tile source.

Discussion

Initialize a tile source using the Mapbox map ID.

This method requires a network connection in order to download the TileJSON used to define the tile source.

Declared In

RMMapboxSource.h

initWithMapID:enablingDataOnMapView:

For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from simplestyle data.

- (id)initWithMapID:(NSString *)mapID enablingDataOnMapView:(RMMapView *)mapView

Parameters

mapID

The Mapbox map ID string, typically in the format <username>.map-<random characters>.

mapView

A map view on which to display the annotations.

Return Value

An initialized Mapbox tile source.

Discussion

For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from simplestyle data.

This method requires a network connection in order to download the TileJSON used to define the tile source.

Declared In

RMMapboxSource.h

initWithReferenceURL:

Initialize a tile source with either a remote or local TileJSON structure.

- (id)initWithReferenceURL:(NSURL *)referenceURL

Parameters

referenceURL

A remote or file path URL pointing to a TileJSON structure.

Return Value

An initialized Mapbox tile source.

Discussion

Initialize a tile source with either a remote or local TileJSON structure.

Passing a remote URL requires a network connection. If offline functionality is desired, you should cache the TileJSON locally at a prior date, then pass a file path URL to this method.

Declared In

RMMapboxSource.h

initWithReferenceURL:enablingDataOnMapView:

For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from simplestyle data.

- (id)initWithReferenceURL:(NSURL *)referenceURL enablingDataOnMapView:(RMMapView *)mapView

Parameters

referenceURL

A remote or file path URL pointing to a TileJSON structure.

mapView

A map view on which to display the annotations.

Return Value

An initialized Mapbox tile source.

Discussion

For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from simplestyle data.

Passing a remote URL requires a network connection. If offline functionality is desired, you should cache the TileJSON locally at a prior date, then pass a file path URL to this method.

Declared In

RMMapboxSource.h

initWithTileJSON:

Initialize a tile source with TileJSON.

- (id)initWithTileJSON:(NSString *)tileJSON

Parameters

tileJSON

A string containing TileJSON.

Return Value

An initialized Mapbox tile source.

Discussion

Initialize a tile source with TileJSON.

Declared In

RMMapboxSource.h

initWithTileJSON:enablingDataOnMapView:

For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from simplestyle data.

- (id)initWithTileJSON:(NSString *)tileJSON enablingDataOnMapView:(RMMapView *)mapView

Parameters

tileJSON

A string containing TileJSON.

mapView

A map view on which to display the annotations.

Return Value

An initialized Mapbox tile source.

Discussion

For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from simplestyle data.

Declared In

RMMapboxSource.h

legend

Any available HTML-formatted map legend data for the tile source, suitable for display in a UIWebView.

- (NSString *)legend

Discussion

Any available HTML-formatted map legend data for the tile source, suitable for display in a UIWebView.

Declared In

RMMapboxSource.h