Open source alternative to MapKit
Welcome to the iOS SDK API documentation. Here you can find details on the classes, protocols, and other parts of the SDK. You might also be interested in the Atom feed, which allows direct embedding of the documentation into Xcode.

| Inherits from | NSObject |
| Conforms to | RMTileSource |
| Declared in | RMAbstractMercatorTileSource.h |
Abstract class representing a Mercator projection for the display of map tiles. Developers wanting to provide custom network-based tiles should subclass RMAbstractWebMapSource.
| Inherits from | RMAbstractMercatorTileSource : NSObject |
| Declared in | RMAbstractWebMapSource.h |
Abstract class representing a network-based location for retrieving map tiles for display. Developers can create subclasses in order to provide custom web addresses for tile downloads.
retryCount
The number of times to retry downloads of a given tile image.
property requestTimeoutSeconds
The network timeout for each attempt to download a tile image.
property– URLForTile:
Provide the URL for a given tile.
– URLsForTile:
Provide multiple URLs for a given tile. Each URL is fetched in turn and composited together before placement on the map. URLs are ordered from the bottom layer to the top layer.
The network timeout for each attempt to download a tile image.
@property (nonatomic, assign) NSTimeInterval requestTimeoutSecondsThe network timeout for each attempt to download a tile image.
Provide the URL for a given tile.
- (NSURL *)URLForTile:(RMTile)tileA specific map tile.
A URL to a tile image to download.
Provide the URL for a given tile.
Provide multiple URLs for a given tile. Each URL is fetched in turn and composited together before placement on the map. URLs are ordered from the bottom layer to the top layer.
- (NSArray *)URLsForTile:(RMTile)tileA specific map tile.
An array of tile URLs to download, listed bottom to top.
Provide multiple URLs for a given tile. Each URL is fetched in turn and composited together before placement on the map. URLs are ordered from the bottom layer to the top layer.
| Inherits from | NSObject |
| Declared in | RMAnnotation.h |
An RMAnnotation defines a container for annotation data to be placed on a map. At a future point in time, depending on map use, a visible layer may be requested and displayed for the annotation. The layer can be set ahead of time using the annotation’s layer property, or, in the recommended approach, can be provided by an RMMapView’s delegate when first needed for display.
Subclasses of RMAnnotation such as RMPointAnnotation, RMPolylineAnnotation, and RMPolygonAnnotation are useful for simple needs such as easily putting points and shapes onto a map view. They manage their own layer and don’t require configuration in the map view delegate in order to be displayed.
coordinate
The annotation’s location on the map.
property title
The annotation’s title.
property subtitle
The annotation’s subtitle.
property userInfo
Storage for arbitrary data.
property annotationType
An arbitrary string representing the type of annotation. Useful for determining which layer to draw for the annotation when requested in the delegate. Cluster annotations, which are automatically created by a map view, will automatically have an annotationType of RMClusterAnnotation.
annotationIcon
An arbitrary icon image for the annotation. Useful to pass an image at annotation creation time for use in the layer at a later time.
property position
The annotation’s current location on screen. Do not set this directly unless during temporary operations like annotation drags, but rather use the coordinate property to permanently change the annotation’s location on the map.
property enabled
Whether touch events for the annotation’s layer are recognized. Defaults to YES.
layer
An object representing the annotation’s visual appearance.
property clusteringEnabled
Whether the annotation should be clustered when map view clustering is enabled. Defaults to YES.
isClusterAnnotation
Whether an annotation is an automatically-managed cluster annotation.
property clusteredAnnotations
If the annotation is a cluster annotation, returns an array containing the annotations in the cluster. Returns nil if the annotation is not a cluster annotation.
isUserLocationAnnotation
Whether the annotation is related to display of the user’s location. Useful for filtering purposes when providing annotation layers in the delegate.
property+ annotationWithMapView:coordinate:andTitle:
Create and initialize an annotation.
– initWithMapView:coordinate:andTitle:
Initialize an annotation.
isAnnotationOnScreen
Whether the annotation is currently on the screen, regardless if clustered or not.
property– isAnnotationWithinBounds:
Whether the annotation is within a certain screen bounds.
isAnnotationVisibleOnScreen
Whether the annotation is currently visible on the screen. An annotation is not visible if it is either offscreen or currently in a cluster.
propertyAn arbitrary icon image for the annotation. Useful to pass an image at annotation creation time for use in the layer at a later time.
@property (nonatomic, strong) UIImage *annotationIconAn arbitrary icon image for the annotation. Useful to pass an image at annotation creation time for use in the layer at a later time.
An arbitrary string representing the type of annotation. Useful for determining which layer to draw for the annotation when requested in the delegate. Cluster annotations, which are automatically created by a map view, will automatically have an annotationType of RMClusterAnnotation.
@property (nonatomic, strong) NSString *annotationTypeAn arbitrary string representing the type of annotation. Useful for determining which layer to draw for the annotation when requested in the delegate. Cluster annotations, which are automatically created by a map view, will automatically have an annotationType of RMClusterAnnotation.
If the annotation is a cluster annotation, returns an array containing the annotations in the cluster. Returns nil if the annotation is not a cluster annotation.
@property (nonatomic, readonly, assign) NSArray *clusteredAnnotationsIf the annotation is a cluster annotation, returns an array containing the annotations in the cluster. Returns nil if the annotation is not a cluster annotation.
Whether the annotation should be clustered when map view clustering is enabled. Defaults to YES.
@property (nonatomic, assign) BOOL clusteringEnabledWhether the annotation should be clustered when map view clustering is enabled. Defaults to YES.
The annotation’s location on the map.
@property (nonatomic, assign) CLLocationCoordinate2D coordinateThe annotation’s location on the map.
Whether touch events for the annotation’s layer are recognized. Defaults to YES.
@property (nonatomic, assign, getter=isEnabled) BOOL enabledWhether touch events for the annotation’s layer are recognized. Defaults to YES.
Whether the annotation is currently on the screen, regardless if clustered or not.
@property (nonatomic, readonly) BOOL isAnnotationOnScreenWhether the annotation is currently on the screen, regardless if clustered or not.
Whether the annotation is currently visible on the screen. An annotation is not visible if it is either offscreen or currently in a cluster.
@property (nonatomic, readonly) BOOL isAnnotationVisibleOnScreenWhether the annotation is currently visible on the screen. An annotation is not visible if it is either offscreen or currently in a cluster.
Whether an annotation is an automatically-managed cluster annotation.
@property (nonatomic, readonly, assign) BOOL isClusterAnnotationWhether an annotation is an automatically-managed cluster annotation.
Whether the annotation is related to display of the user’s location. Useful for filtering purposes when providing annotation layers in the delegate.
@property (nonatomic, readonly) BOOL isUserLocationAnnotationWhether the annotation is related to display of the user’s location. Useful for filtering purposes when providing annotation layers in the delegate.
An object representing the annotation’s visual appearance.
@property (nonatomic, strong) RMMapLayer *layerAn object representing the annotation’s visual appearance.
The annotation’s current location on screen. Do not set this directly unless during temporary operations like annotation drags, but rather use the coordinate property to permanently change the annotation’s location on the map.
@property (nonatomic, assign) CGPoint positionThe annotation’s current location on screen. Do not set this directly unless during temporary operations like annotation drags, but rather use the coordinate property to permanently change the annotation’s location on the map.
The annotation’s subtitle.
@property (nonatomic, strong) NSString *subtitleThe annotation’s subtitle.
The annotation’s title.
@property (nonatomic, strong) NSString *titleThe annotation’s title.
Create and initialize an annotation.
+ (id)annotationWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)aCoordinate andTitle:(NSString *)aTitleThe map view on which to place the annotation.
The location for the annotation.
The annotation’s title.
An annotation object, or nil if an annotation was unable to be created.
Create and initialize an annotation.
Initialize an annotation.
- (id)initWithMapView:(RMMapView *)aMapView coordinate:(CLLocationCoordinate2D)aCoordinate andTitle:(NSString *)aTitleThe map view on which to place the annotation.
The location for the annotation.
The annotation’s title.
An initialized annotation object, or nil if an annotation was unable to be initialized.
Initialize an annotation.
| Inherits from | NSObject |
| Declared in | RMCacheObject.h |
An RMCacheObject is a representation of a tile cache for use with the RMMemoryCache in-memory cache storage. While RMDatabaseCache uses a disk-based database backing store, RMMemoryCache maintains first-class objects in memory for use later.
cachedObject
The object to be cached, typically a UIImage.
property cacheKey
The unique identifier for the cache.
property tile
The tile key for the cache object.
property timestamp
The freshness timestamp for the cache object.
property+ cacheObject:forTile:withCacheKey:
Creates and returns a cache object for a given key and object to store in a given cache.
– initWithObject:forTile:withCacheKey:
Initializes and returns a newly allocated cache object for a given key and object to store in a given cache.
– touch
Updates the timestamp on a cache object to indicate freshness. Objects with older timestamps get deleted first when space is needed.
The unique identifier for the cache.
@property (nonatomic, readonly) NSString *cacheKeyThe unique identifier for the cache.
The object to be cached, typically a UIImage.
@property (nonatomic, readonly) id cachedObjectThe object to be cached, typically a UIImage.
The tile key for the cache object.
@property (nonatomic, readonly) RMTile tileThe tile key for the cache object.
Creates and returns a cache object for a given key and object to store in a given cache.
+ (id)cacheObject:(id)anObject forTile:(RMTile)aTile withCacheKey:(NSString *)aCacheKeyThe object to cache, typically a UIImage.
The tile key for the object.
The unique identifier for the cache.
A newly created cache object.
Creates and returns a cache object for a given key and object to store in a given cache.
Initializes and returns a newly allocated cache object for a given key and object to store in a given cache.
- (id)initWithObject:(id)anObject forTile:(RMTile)tile withCacheKey:(NSString *)aCacheKeyThe object to cache, typically a UIImage.
The tile key for the object.
The unique identifier for the cache.
An initialized cache object.
Initializes and returns a newly allocated cache object for a given key and object to store in a given cache.
| Inherits from | RMMapLayer : CAScrollLayer |
| Declared in | RMCircle.h |
An RMCircle is used to represent a perfect circle shape on a map view. An RMCircle changes visible size in response to map zooms in order to consistently represent coverage of the same geographic area.
shapeLayer
The circle’s underlying shape layer.
property lineColor
The circle’s line color. Defaults to black.
property fillColor
The circle’s fill color. Defaults to blue.
property fillPatternImage
The fill pattern image of the circle. If set, the fillColor is set to nil.
radiusInMeters
The radius of the circle in projected meters. Regardless of map zoom, the circle will change visible size to continously represent this radius on the map.
property lineWidthInPixels
The circle’s line width. Defaults to 10.0.
property– initWithView:radiusInMeters:
Initializes and returns a newly allocated RMCircle for the specified map view.
The circle’s fill color. Defaults to blue.
@property (nonatomic, strong) UIColor *fillColorThe circle’s fill color. Defaults to blue.
The fill pattern image of the circle. If set, the fillColor is set to nil.
@property (nonatomic, strong) UIImage *fillPatternImageThe fill pattern image of the circle. If set, the fillColor is set to nil.
The circle’s line color. Defaults to black.
@property (nonatomic, strong) UIColor *lineColorThe circle’s line color. Defaults to black.
The circle’s line width. Defaults to 10.0.
@property (nonatomic, assign) CGFloat lineWidthInPixelsThe circle’s line width. Defaults to 10.0.
The radius of the circle in projected meters. Regardless of map zoom, the circle will change visible size to continously represent this radius on the map.
@property (nonatomic, assign) CGFloat radiusInMetersThe radius of the circle in projected meters. Regardless of map zoom, the circle will change visible size to continously represent this radius on the map.
Initializes and returns a newly allocated RMCircle for the specified map view.
- (id)initWithView:(RMMapView *)aMapView radiusInMeters:(CGFloat)newRadiusInMetersThe map view the shape should be drawn on.
The radius of the circle object in projected meters. Regardless of map zoom, the circle will change visible size to continously represent this radius on the map.
Initializes and returns a newly allocated RMCircle for the specified map view.
| Inherits from | NSObject |
| Declared in | RMConfiguration.h |
+ configuration
Access the shared instance of the configuration.
– cacheConfiguration
Access the disk- and memory-based cache configuration.
userAgent
Access and change the global user agent for HTTP requests using the library.
propertyAccess and change the global user agent for HTTP requests using the library.
@property (nonatomic, retain) NSString *userAgentAccess and change the global user agent for HTTP requests using the library.
If unset, defaults to MapBox iOS SDK followed by generic hardware model and software version information.
Example: MyMapApp/1.2
Access the disk- and memory-based cache configuration.
- (NSDictionary *)cacheConfigurationA dictionary containing the cache configuration.
Access the disk- and memory-based cache configuration.
| Inherits from | NSObject |
| Conforms to | RMTileCache |
| Declared in | RMDatabaseCache.h |
An RMDatabaseCache object represents disk-based caching of map tile images. This cache is meant for longer-term storage than RMMemoryCache, potentially for long periods of time, allowing completely offline use of map view.
Warning: The database cache is currently based on SQLite, a lightweight, cross-platform, file-based relational database system. The schema is indepenendent of and unrelated to the MBTiles file format or the RMMBTilesSource tile source.
databasePath
The path to the SQLite database on disk that backs the cache.
property– initWithDatabase:
Initializes and returns a newly allocated database cache object at the given disk path.
– initUsingCacheDir:
Initializes and returns a newly allocated database cache object.
– setPurgeStrategy:
Set the cache purge strategy to use for the database.
– setCapacity:
Set the maximum tile count allowed in the database.
capacity
The capacity, in number of tiles, that the database cache can hold.
property– setMinimalPurge:
Set the minimum number of tiles to purge when clearing space in the cache.
– setExpiryPeriod:
Set the expiry period for cache purging.
The capacity, in number of tiles, that the database cache can hold.
@property (nonatomic, readonly, assign) NSUInteger capacityThe capacity, in number of tiles, that the database cache can hold.
Initializes and returns a newly allocated database cache object.
- (id)initUsingCacheDir:(BOOL)useCacheDirIf YES, use the temporary cache space for the application, meaning that the cache files can be removed when the system deems it necessary to free up space. If NO, use the application’s document storage space, meaning that the cache will not be automatically removed and will be backed up during device backups. The default value is NO.
An initialized cache object or nil if the object couldn’t be created.
Initializes and returns a newly allocated database cache object.
Initializes and returns a newly allocated database cache object at the given disk path.
- (id)initWithDatabase:(NSString *)pathThe path to use for the database backing.
An initialized cache object or nil if the object couldn’t be created.
Initializes and returns a newly allocated database cache object at the given disk path.
Set the maximum tile count allowed in the database.
- (void)setCapacity:(NSUInteger)theCapacityThe number of tiles to allow to accumulate in the database before purging begins.
Set the maximum tile count allowed in the database.
Set the expiry period for cache purging.
- (void)setExpiryPeriod:(NSTimeInterval)theExpiryPeriodThe amount of time to elapse before a tile should be removed from the cache. If set to zero, tile count-based purging will be used instead of time-based.
Set the expiry period for cache purging.
Set the minimum number of tiles to purge when clearing space in the cache.
- (void)setMinimalPurge:(NSUInteger)thePurgeMinimumThe number of tiles to delete at the time the cache is purged.
Set the minimum number of tiles to purge when clearing space in the cache.
| Inherits from | NSObject |
| Conforms to | RMTileSource |
| Declared in | RMMBTilesSource.h |
An RMMBTilesSource provides for a fast, offline-capable set of map tile images served from a local database. MBTiles is an open standard for map tile image transport.
– initWithTileSetResource:ofType:
Initialize and return a newly allocated MBTiles tile source based on a given bundle resource.
– initWithTileSetURL:
Initialize and return a newly allocated MBTiles tile source based on a given local database URL.
– legend
Any available HTML-formatted map legend data for the tile source, suitable for display in a UIWebView.
– centerCoordinate
A suggested starting center coordinate for the map layer.
– centerZoom
A suggested starting center zoom level for the map layer.
– coversFullWorld
Returns YES if the tile source provides full-world coverage; otherwise, returns NO.
A suggested starting center coordinate for the map layer.
- (CLLocationCoordinate2D)centerCoordinateA suggested starting center coordinate for the map layer.
A suggested starting center zoom level for the map layer.
- (float)centerZoomA suggested starting center zoom level for the map layer.
Returns YES if the tile source provides full-world coverage; otherwise, returns NO.
- (BOOL)coversFullWorldReturns YES if the tile source provides full-world coverage; otherwise, returns NO.
Initialize and return a newly allocated MBTiles tile source based on a given bundle resource.
- (id)initWithTileSetResource:(NSString *)name ofType:(NSString *)extensionThe name of the resource file. If name is an empty string or nil, uses the first file encountered of the supplied type.
If extension is an empty string or nil, the extension is assumed not to exist and the file is the first file encountered that exactly matches name.
Initialize and return a newly allocated MBTiles tile source based on a given bundle resource.
Initialize and return a newly allocated MBTiles tile source based on a given local database URL.
- (id)initWithTileSetURL:(NSURL *)tileSetURLLocal file path URL to an MBTiles file.
An initialized MBTiles tile source.
Initialize and return a newly allocated MBTiles tile source based on a given local database URL.
| Inherits from | RMAbstractWebMapSource : RMAbstractMercatorTileSource : NSObject |
| Declared in | RMMapBoxSource.h |
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.
– initWithMapID:
Initialize a tile source using the MapBox map ID.
– initWithReferenceURL:
Initialize a tile source with either a remote or local TileJSON structure.
– initWithTileJSON:
Initialize a tile source with TileJSON.
– initWithMapID:enablingDataOnMapView:
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
– initWithTileJSON:enablingDataOnMapView:
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
– initWithReferenceURL:enablingDataOnMapView:
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
– legend
Any available HTML-formatted map legend data for the tile source, suitable for display in a UIWebView.
– centerCoordinate
A suggested starting center coordinate for the map layer.
– centerZoom
A suggested starting center zoom level for the map layer.
– coversFullWorld
Returns YES if the tile source provides full-world coverage; otherwise, returns NO.
tileJSON
The TileJSON for the map layer. Useful for saving locally to use in instantiating a tile source while offline.
property 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 infoDictionary
The TileJSON data in dictionary format. Useful for retrieving info about the layer without having to parse TileJSON.
property imageQuality
Image quality that is retrieved from the network. Useful for lower-bandwidth environments. The default is to provide full-quality imagery.
propertyImage quality that is retrieved from the network. Useful for lower-bandwidth environments. The default is to provide full-quality imagery.
@property (nonatomic, assign) RMMapBoxSourceQuality imageQualityImage 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.
The TileJSON data in dictionary format. Useful for retrieving info about the layer without having to parse TileJSON.
@property (nonatomic, readonly, strong) NSDictionary *infoDictionaryThe TileJSON data in dictionary format. Useful for retrieving info about the layer without having to parse 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 *tileJSONThe TileJSON for the map layer. Useful for saving locally to use in instantiating a tile source while offline.
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 *tileJSONURLThe TileJSON URL for the map layer. Useful for retrieving TileJSON to save locally to use in instantiating a tile source while offline.
A suggested starting center coordinate for the map layer.
- (CLLocationCoordinate2D)centerCoordinateA suggested starting center coordinate for the map layer.
A suggested starting center zoom level for the map layer.
- (float)centerZoomA suggested starting center zoom level for the map layer.
Returns YES if the tile source provides full-world coverage; otherwise, returns NO.
- (BOOL)coversFullWorldReturns YES if the tile source provides full-world coverage; otherwise, returns NO.
Initialize a tile source using the MapBox map ID.
- (id)initWithMapID:(NSString *)mapIDThe MapBox map ID string, typically in the format <username>.map-<random characters>.
An initialized MapBox tile source.
Initialize a tile source using the MapBox map ID.
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
- (id)initWithMapID:(NSString *)mapID enablingDataOnMapView:(RMMapView *)mapViewThe MapBox map ID string, typically in the format <username>.map-<random characters>.
A map view on which to display the annotations.
An initialized MapBox tile source.
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
Initialize a tile source with either a remote or local TileJSON structure.
- (id)initWithReferenceURL:(NSURL *)referenceURLA remote or local URL pointing to a TileJSON structure.
An initialized MapBox tile source.
Initialize a tile source with either a remote or local TileJSON structure.
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
- (id)initWithReferenceURL:(NSURL *)referenceURL enablingDataOnMapView:(RMMapView *)mapViewA remote or local URL pointing to a TileJSON structure.
A map view on which to display the annotations.
An initialized MapBox tile source.
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
Initialize a tile source with TileJSON.
- (id)initWithTileJSON:(NSString *)tileJSONA string containing TileJSON.
An initialized MapBox tile source.
Initialize a tile source with TileJSON.
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
- (id)initWithTileJSON:(NSString *)tileJSON enablingDataOnMapView:(RMMapView *)mapViewA string containing TileJSON.
A map view on which to display the annotations.
An initialized MapBox tile source.
For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from simplestyle data.
| Inherits from | CAScrollLayer |
| Declared in | RMMapLayer.h |
RMMapLayer is a generic class for displaying scrollable vector layers on a map view. Generally, a more specialized subclass such as RMMarker will be used for a specific purpose, but RMMapLayer can also be used directly for special purposes.
annotation
The annotation associated with the layer. This can be useful to inspect the annotation’s userInfo in order to customize the visual representation.
property projectedLocation
The current projected location of the layer on the map.
property draggingEnabled
When set to YES, the layer can be dragged by the user.
property userInfo
Storage for arbitrary data.
property canShowCallout
A Boolean value indicating whether the annotation layer is able to display extra information in a callout bubble.
property calloutOffset
The offset (in pixels) at which to place the callout bubble.
property leftCalloutAccessoryView
The view to display on the left side of the standard callout bubble.
property rightCalloutAccessoryView
The view to display on the right side of the standard callout bubble.
property– setPosition:animated:
Set the screen position of the layer.
The annotation associated with the layer. This can be useful to inspect the annotation’s userInfo in order to customize the visual representation.
@property (nonatomic, weak) RMAnnotation *annotationThe annotation associated with the layer. This can be useful to inspect the annotation’s userInfo in order to customize the visual representation.
The offset (in pixels) at which to place the callout bubble.
@property (nonatomic, assign) CGPoint calloutOffsetThe offset (in pixels) at which to place the callout bubble.
This property determines the additional distance by which to move the callout bubble. When this property is set to (0, 0), the anchor point of the callout bubble is placed on the top-center point of the annotation view’s frame. Specifying positive offset values moves the callout bubble down and to the right, while specifying negative values moves it up and to the left.
A Boolean value indicating whether the annotation layer is able to display extra information in a callout bubble.
@property (nonatomic, assign) BOOL canShowCalloutA Boolean value indicating whether the annotation layer is able to display extra information in a callout bubble.
If the value of this property is YES, a standard callout bubble is shown when the user taps the layer. The callout uses the title text from the associated annotation object. If there is no title text, though, the annotation is treated as if its enabled property is set to NO. The callout also displays any custom callout views stored in the leftCalloutAccessoryView and rightCalloutAccessoryView properties.
If the value of this property is NO, the value of the title string is ignored and the annotation remains enabled by default. You can still disable the annotation explicitly using the enabled property.
Note that callouts are not supported on cluster annotation layers. These annotations can be interacted with, but do not remain consistent visually during map pan and zoom events; thus, callout behavior would be inconsistent.
When set to YES, the layer can be dragged by the user.
@property (nonatomic, assign) BOOL draggingEnabledWhen set to YES, the layer can be dragged by the user.
The view to display on the left side of the standard callout bubble.
@property (nonatomic, strong) UIView *leftCalloutAccessoryViewThe view to display on the left side of the standard callout bubble.
The default value of this property is nil. The left callout view is typically used to display information about the annotation or to link to custom information provided by your application. The height of your view should be 32 pixels or less.
If the view you specify is also a descendant of the UIControl class, you can use the map view’s delegate to receive notifications when your control is tapped. If it does not descend from UIControl, your view is responsible for handling any touch events within its bounds.
The current projected location of the layer on the map.
@property (nonatomic, assign) RMProjectedPoint projectedLocationThe current projected location of the layer on the map.
The view to display on the right side of the standard callout bubble.
@property (nonatomic, strong) UIView *rightCalloutAccessoryViewThe view to display on the right side of the standard callout bubble.
This property is set to nil by default. The right callout view is typically used to link to more detailed information about the annotation. The height of your view should be 32 pixels or less. A common view to specify for this property is UIButton object whose type is set to UIButtonTypeDetailDisclosure.
If the view you specify is also a descendant of the UIControl class, you can use the map view’s delegate to receive notifications when your control is tapped. If it does not descend from UIControl, your view is responsible for handling any touch events within its bounds.
| Inherits from | UIView |
| Declared in | RMMapView.h |
An RMMapView object provides an embeddable map interface, similar to the one provided by Apple’s MapKit. You use this class to display map information and to manipulate the map contents from your application. You can center the map on a given coordinate, specify the size of the area you want to display, and annotate the map with custom information.
Warning: Please note that you are responsible for getting permission to use the map data, and for ensuring your use adheres to the relevant terms of use.
delegate
The receiver’s delegate.
property draggingEnabled
A Boolean value that determines whether the user may scroll around the map.
property bouncingEnabled
A Boolean value that determines whether the map view bounces past the edge of content and back again and whether it animates the content scaling when the scaling exceeds the maximum or minimum limits.
property zoomingInPivotsAroundCenter
A Boolean value that determines whether double-tap zooms of the map always zoom on the center of the map, or whether they zoom on the center of the double-tap gesture. The default value is NO, which zooms on the gesture.
decelerationMode
A custom deceleration mode for the map view for drag operations. Set to RMMapDecelerationOff to disable map drag deceleration. The default value is RMMapDecelerationFast.
adjustTilesForRetinaDisplay
A Boolean value that adjusts the display of map tile images for retina-capable screens.
property hideAttribution
Whether to hide map data attribution for the map view.
property missingTilesDepth
Take missing tiles from lower-numbered zoom levels, up to a given number of zoom levels. This can be used in order to increase perceived tile load performance or to allow zooming in beyond levels supported natively by a given tile source. Defaults to 1.
property backgroundView
A custom, static view to use behind the map tiles. The default behavior is to use grid imagery that moves with map panning like MapKit.
property– setBackgroundImage:
A custom image to use behind the map tiles. The default behavior is to show the default backgroundView and not a static image.
debugTiles
A Boolean value indicating whether to draw tile borders and z/x/y numbers on tile images for debugging purposes. Defaults to NO.
showLogoBug
A Boolean value indicating whether to show a small logo in the corner of the map view. Defaults to YES.
– initWithFrame:
Initialize a map view with a given frame. A default watermarked MapBox map tile source will be used.
– initWithFrame:andTilesource:
Initialize a map view with a given frame and tile source.
– initWithFrame:andTilesource:centerCoordinate:zoomLevel:maxZoomLevel:minZoomLevel:backgroundImage:
Designated initializer. Initialize a map view.
centerCoordinate
The center coordinate of the map view.
property centerProjectedPoint
The center point of the map represented as a projected point.
property– setCenterCoordinate:animated:
Set the map center to a given coordinate.
– setCenterProjectedPoint:animated:
Set the map center to a given projected point.
– moveBy:
Move the map center by a given delta.
zoom
The current zoom level of the map.
property minZoom
The minimum zoom level of the map, clamped to the range supported by the tile source(s).
property maxZoom
The maximum zoom level of the map, clamped to the range supported by the tile source(s).
property– setZoom:animated:
Set zoom level, optionally with an animation.
– setZoom:atCoordinate:animated:
Set both zoom level and center coordinate at the same time, optionally with an animation.
– zoomByFactor:near:animated:
Zoom the map by a given factor near a certain point.
– zoomInToNextNativeZoomAt:animated:
Zoom the map in at the next integral zoom level near a certain point.
– zoomOutToNextNativeZoomAt:animated:
Zoom the map out at the next integral zoom level near a certain point.
– zoomWithLatitudeLongitudeBoundsSouthWest:northEast:animated:
Zoom the map to a given latitude and longitude bounds.
– latitudeLongitudeBoundingBox
The smallest bounding box containing the entire map view.
– latitudeLongitudeBoundingBoxFor:
The smallest bounding box containing a rectangular region of the map view.
– setConstraintsSouthWest:northEast:
Contrain zooming and panning of the map view to a given coordinate boundary.
– takeSnapshot
Take a snapshot of the map view.
– takeSnapshotAndIncludeOverlay:
Take a snapshot of the map view.
annotations
The annotations currently added to the map. Includes user location annotations, if any.
property visibleAnnotations
The annotations currently visible on the map. May include annotations currently shown in clusters.
property– addAnnotation:
Add an annotation to the map.
– addAnnotations:
Add one or more annotations to the map.
– removeAnnotation:
Remove an annotation from the map.
– removeAnnotations:
Remove one or more annotations from the map.
– removeAllAnnotations
Remove all annotations from the map. This does not remove user location annotations, if any.
– mapPositionForAnnotation:
The screen position for a given annotation.
– selectAnnotation:animated:
Selects the specified annotation and displays a callout view for it.
– deselectAnnotation:animated:
Deselects the specified annotation and hides its callout view.
selectedAnnotation
The annotation that is currently selected.
property clusteringEnabled
Whether to enable clustering of map point annotations. Defaults to NO.
orderMarkersByYPosition
Whether to order markers on the z-axis according to increasing y-position. Defaults to YES.
positionClusterMarkersAtTheGravityCenter
Whether to position cluster markers at the weighted center of the points they represent. If YES, position clusters in weighted fashion. If NO, position them on a rectangular grid. Defaults to YES.
orderClusterMarkersAboveOthers
Whether to order cluster markers above non-clustered markers. Defaults to NO.
tileSource
The first tile source of a map view, ordered from bottom to top.
property tileSources
All of the tile sources for a map view, ordered bottom to top.
property– addTileSource:
Add a tile source to a map view above the current tile sources.
– addTileSource:atIndex:
Add a tile source to a map view at a given index.
– removeTileSource:
Remove a tile source from the map view.
– removeTileSourceAtIndex:
Remove the tile source at a given index from the map view.
– moveTileSourceAtIndex:toIndex:
Move the tile source at one index to another index.
– setHidden:forTileSource:
Hide or show a tile source.
– setHidden:forTileSourceAtIndex:
Hide or show a tile source at a given index.
– reloadTileSource:
Reload the tiles for a given tile source.
– reloadTileSourceAtIndex:
Reload the tiles for a tile source at a given index.
tileCache
The tile cache for the map view, typically composed of both an in-memory RMMemoryCache and a disk-based RMDatabaseCache.
property– removeAllCachedImages
Clear all tile images from the caching system.
– projectedPointToPixel:
Convert a projected point to a screen location.
– coordinateToPixel:
Convert a coordinate to a screen location.
– pixelToProjectedPoint:
Convert a screen location to a projected point.
– pixelToCoordinate:
Convert a screen location to a coordinate.
– coordinateToProjectedPoint:
Convert a coordiante to a projected point.
– projectedPointToCoordinate:
Convert a projected point to a coordinate.
– latitudeLongitudeBoundingBoxForTile:
Return the bounding box for a given map tile.
showsUserLocation
A Boolean value indicating whether the map may display the user location.
property userLocation
The annotation object representing the user’s current location. (read-only)
property userLocationVisible
A Boolean value indicating whether the device’s current location is visible in the map view. (read-only)
property userTrackingMode
The mode used to track the user location.
property displayHeadingCalibration
Whether the map view should display a heading calibration alert when necessary. The default value is YES.
– setUserTrackingMode:animated:
Set the mode used to track the user location.
A Boolean value that adjusts the display of map tile images for retina-capable screens.
@property (nonatomic, assign) BOOL adjustTilesForRetinaDisplayA Boolean value that adjusts the display of map tile images for retina-capable screens.
If set to YES, the map tiles are drawn at double size, typically 512 pixels square instead of 256 pixels, in order to compensate for smaller features and to make them more legible. If tiles designed for retina devices are used, this value should be set to NO in order to display these tiles at the proper size. The default value is NO.
The annotations currently added to the map. Includes user location annotations, if any.
@property (nonatomic, weak, readonly) NSArray *annotationsThe annotations currently added to the map. Includes user location annotations, if any.
A custom, static view to use behind the map tiles. The default behavior is to use grid imagery that moves with map panning like MapKit.
@property (nonatomic, strong) UIView *backgroundViewA custom, static view to use behind the map tiles. The default behavior is to use grid imagery that moves with map panning like MapKit.
A Boolean value that determines whether the map view bounces past the edge of content and back again and whether it animates the content scaling when the scaling exceeds the maximum or minimum limits.
@property (nonatomic, assign) BOOL bouncingEnabledA Boolean value that determines whether the map view bounces past the edge of content and back again and whether it animates the content scaling when the scaling exceeds the maximum or minimum limits.
If the value of this property is YES, the map view bounces when it encounters a boundary of the content or when zooming exceeds either the maximum or minimum limits for scaling. Bouncing visually indicates that scrolling or zooming has reached an edge of the content. If the value is NO, scrolling and zooming stop immediately at the content boundary without bouncing.
The default value is NO.
The center coordinate of the map view.
@property (nonatomic, assign) CLLocationCoordinate2D centerCoordinateThe center coordinate of the map view.
The center point of the map represented as a projected point.
@property (nonatomic, assign) RMProjectedPoint centerProjectedPointThe center point of the map represented as a projected point.
Whether to enable clustering of map point annotations. Defaults to NO.
@property (nonatomic, assign) BOOL clusteringEnabledWhether to enable clustering of map point annotations. Defaults to NO.
A Boolean value indicating whether to draw tile borders and z/x/y numbers on tile images for debugging purposes. Defaults to NO.
@property (nonatomic, assign) BOOL debugTilesA Boolean value indicating whether to draw tile borders and z/x/y numbers on tile images for debugging purposes. Defaults to NO.
A custom deceleration mode for the map view for drag operations. Set to RMMapDecelerationOff to disable map drag deceleration. The default value is RMMapDecelerationFast.
@property (nonatomic, assign) RMMapDecelerationMode decelerationModeA custom deceleration mode for the map view for drag operations. Set to RMMapDecelerationOff to disable map drag deceleration. The default value is RMMapDecelerationFast.
The receiver’s delegate.
@property (nonatomic, weak) IBOutlet id<RMMapViewDelegate> delegateThe receiver’s delegate.
A map view sends messages to its delegate regarding the loading of map data and changes in the portion of the map being displayed. The delegate also manages the annotation layers used to highlight points of interest on the map.
The delegate should implement the methods of the RMMapViewDelegate protocol.
Whether the map view should display a heading calibration alert when necessary. The default value is YES.
@property (nonatomic, assign) BOOL displayHeadingCalibrationWhether the map view should display a heading calibration alert when necessary. The default value is YES.
A Boolean value that determines whether the user may scroll around the map.
@property (nonatomic, assign) BOOL draggingEnabledA Boolean value that determines whether the user may scroll around the map.
This property controls only user interactions with the map. If you set the value of this property to NO, you may still change the map location programmatically.
The default value of this property is YES.
Whether to hide map data attribution for the map view.
@property (nonatomic, assign) BOOL hideAttributionWhether to hide map data attribution for the map view.
If this is set to NO, a small disclosure button will be added to the lower-right of the map view, allowing the user to tap it to display a modal view showing map data attribution info. The modal presentation uses a page curl animation to reveal the attribution info under the map view.
The default value is NO, meaning that attribution info will be shown. Please ensure that the terms & conditions of any map data used in your application are satisfied before setting this value to YES.
The maximum zoom level of the map, clamped to the range supported by the tile source(s).
@property (nonatomic, assign) float maxZoomThe maximum zoom level of the map, clamped to the range supported by the tile source(s).
The minimum zoom level of the map, clamped to the range supported by the tile source(s).
@property (nonatomic, assign) float minZoomThe minimum zoom level of the map, clamped to the range supported by the tile source(s).
Take missing tiles from lower-numbered zoom levels, up to a given number of zoom levels. This can be used in order to increase perceived tile load performance or to allow zooming in beyond levels supported natively by a given tile source. Defaults to 1.
@property (nonatomic, assign) NSUInteger missingTilesDepthWhether to order cluster markers above non-clustered markers. Defaults to NO.
@property (nonatomic, assign) BOOL orderClusterMarkersAboveOthersWhether to order cluster markers above non-clustered markers. Defaults to NO.
Whether to order markers on the z-axis according to increasing y-position. Defaults to YES.
@property (nonatomic, assign) BOOL orderMarkersByYPositionWhether to order markers on the z-axis according to increasing y-position. Defaults to YES.
Whether to position cluster markers at the weighted center of the points they represent. If YES, position clusters in weighted fashion. If NO, position them on a rectangular grid. Defaults to YES.
@property (nonatomic, assign) BOOL positionClusterMarkersAtTheGravityCenterWhether to position cluster markers at the weighted center of the points they represent. If YES, position clusters in weighted fashion. If NO, position them on a rectangular grid. Defaults to YES.
The annotation that is currently selected.
@property (nonatomic, strong) RMAnnotation *selectedAnnotationThe annotation that is currently selected.
A Boolean value indicating whether to show a small logo in the corner of the map view. Defaults to YES.
@property (nonatomic, assign) BOOL showLogoBugA Boolean value indicating whether to show a small logo in the corner of the map view. Defaults to YES.
A Boolean value indicating whether the map may display the user location.
@property (nonatomic, assign) BOOL showsUserLocationA Boolean value indicating whether the map may display the user location.
This property does not indicate whether the user’s position is actually visible on the map, only whether the map view is allowed to display it. To determine whether the user’s position is visible, use the userLocationVisible property. The default value of this property is NO.
Setting this property to YES causes the map view to use the Core Location framework to find the current location. As long as this property is YES, the map view continues to track the user’s location and update it periodically.
The tile cache for the map view, typically composed of both an in-memory RMMemoryCache and a disk-based RMDatabaseCache.
@property (nonatomic, strong) RMTileCache *tileCacheThe tile cache for the map view, typically composed of both an in-memory RMMemoryCache and a disk-based RMDatabaseCache.
The first tile source of a map view, ordered from bottom to top.
@property (nonatomic, strong) id<RMTileSource> tileSourceThe first tile source of a map view, ordered from bottom to top.
All of the tile sources for a map view, ordered bottom to top.
@property (nonatomic, strong) NSArray *tileSourcesAll of the tile sources for a map view, ordered bottom to top.
The annotation object representing the user’s current location. (read-only)
@property (nonatomic, readonly) RMUserLocation *userLocationThe annotation object representing the user’s current location. (read-only)
A Boolean value indicating whether the device’s current location is visible in the map view. (read-only)
@property (nonatomic, readonly, getter=isUserLocationVisible) BOOL userLocationVisibleA Boolean value indicating whether the device’s current location is visible in the map view. (read-only)
This property uses the horizontal accuracy of the current location to determine whether the user’s location is visible. Thus, this property is YES if the specific coordinate is offscreen but the rectangle surrounding that coordinate (and defined by the horizontal accuracy value) is partially onscreen.
If the user’s location cannot be determined, this property contains the value NO.
The mode used to track the user location.
@property (nonatomic, assign) RMUserTrackingMode userTrackingModeThe mode used to track the user location.
The annotations currently visible on the map. May include annotations currently shown in clusters.
@property (nonatomic, weak, readonly) NSArray *visibleAnnotationsThe annotations currently visible on the map. May include annotations currently shown in clusters.
The current zoom level of the map.
@property (nonatomic, assign) float zoomThe current zoom level of the map.
A Boolean value that determines whether double-tap zooms of the map always zoom on the center of the map, or whether they zoom on the center of the double-tap gesture. The default value is NO, which zooms on the gesture.
@property (nonatomic, assign) BOOL zoomingInPivotsAroundCenterAdd an annotation to the map.
- (void)addAnnotation:(RMAnnotation *)annotationThe annotation to add.
Add an annotation to the map.
Add one or more annotations to the map.
- (void)addAnnotations:(NSArray *)annotationsAn array containing the annotations to add to the map.
Add one or more annotations to the map.
Add a tile source to a map view above the current tile sources.
- (void)addTileSource:(id<RMTileSource>)tileSourceThe tile source to add.
Add a tile source to a map view above the current tile sources.
Add a tile source to a map view at a given index.
- (void)addTileSource:(id<RMTileSource>)tileSource atIndex:(NSUInteger)indexThe tile source to add.
The index at which to add the tile source. A value of zero adds the tile source below all other tile sources.
Add a tile source to a map view at a given index.
Convert a coordinate to a screen location.
- (CGPoint)coordinateToPixel:(CLLocationCoordinate2D)coordinateThe coordinate to convert.
The equivalent screen location.
Convert a coordinate to a screen location.
Convert a coordiante to a projected point.
- (RMProjectedPoint)coordinateToProjectedPoint:(CLLocationCoordinate2D)coordinateA coordinate to convert.
The equivalent projected point.
Convert a coordiante to a projected point.
Deselects the specified annotation and hides its callout view.
- (void)deselectAnnotation:(RMAnnotation *)annotation animated:(BOOL)animatedThe annotation object to deselect.
If YES, the callout view is animated offscreen.
Deselects the specified annotation and hides its callout view.
Initialize a map view with a given frame. A default watermarked MapBox map tile source will be used.
- (id)initWithFrame:(CGRect)frameInitialize a map view with a given frame. A default watermarked MapBox map tile source will be used.
Initialize a map view with a given frame and tile source.
- (id)initWithFrame:(CGRect)frame andTilesource:(id<RMTileSource>)newTilesourceThe frame with which to initialize the map view.
The tile source to use for the map tiles.
An initialized map view, or nil if the map view was unable to be initialized.
Initialize a map view with a given frame and tile source.
Designated initializer. Initialize a map view.
- (id)initWithFrame:(CGRect)frame andTilesource:(id<RMTileSource>)newTilesource centerCoordinate:(CLLocationCoordinate2D)initialCenterCoordinate zoomLevel:(float)initialTileSourceZoomLevel maxZoomLevel:(float)initialTileSourceMaxZoomLevel minZoomLevel:(float)initialTileSourceMinZoomLevel backgroundImage:(UIImage *)backgroundImageThe map view’s frame.
A tile source to use for the map tiles.
The starting map center coordinate.
The starting map zoom level, clamped to the zoom levels supported by the tile source(s).
The maximum zoom level allowed by the map view, clamped to the zoom levels supported by the tile source(s).
The minimum zoom level allowed by the map view, clamped to the zoom levels supported by the tile source(s).
A custom background image to use behind the map instead of the default gridded tile background that moves with the map.
An initialized map view, or nil if a map view was unable to be initialized.
Designated initializer. Initialize a map view.
The smallest bounding box containing the entire map view.
- (RMSphericalTrapezium)latitudeLongitudeBoundingBoxThe smallest bounding box containing the entire map view.
The smallest bounding box containing a rectangular region of the map view.
- (RMSphericalTrapezium)latitudeLongitudeBoundingBoxFor:(CGRect)rectA rectangular region.
The smallest bounding box containing a rectangular region of the map view.
Return the bounding box for a given map tile.
- (RMSphericalTrapezium)latitudeLongitudeBoundingBoxForTile:(RMTile)aTileA map tile.
The bounding box for the tile in the current projection.
Return the bounding box for a given map tile.
The screen position for a given annotation.
- (CGPoint)mapPositionForAnnotation:(RMAnnotation *)annotationThe annotation for which to return the current screen position.
The screen position of the annotation.
The screen position for a given annotation.
Move the map center by a given delta.
- (void)moveBy:(CGSize)deltaA CGSize by which to move the map center.
Move the map center by a given delta.
Move the tile source at one index to another index.
- (void)moveTileSourceAtIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndexThe index of the tile source to move.
The destination index for the tile source.
Move the tile source at one index to another index.
Convert a screen location to a coordinate.
- (CLLocationCoordinate2D)pixelToCoordinate:(CGPoint)pixelCoordinateA screen location to convert.
The equivalent coordinate.
Convert a screen location to a coordinate.
Convert a screen location to a projected point.
- (RMProjectedPoint)pixelToProjectedPoint:(CGPoint)pixelCoordinateA screen location to convert.
The equivalent projected point.
Convert a screen location to a projected point.
Convert a projected point to a coordinate.
- (CLLocationCoordinate2D)projectedPointToCoordinate:(RMProjectedPoint)projectedPointA projected point to convert.
The equivalent coordinate.
Convert a projected point to a coordinate.
Convert a projected point to a screen location.
- (CGPoint)projectedPointToPixel:(RMProjectedPoint)projectedPointThe projected point to convert.
The equivalent screen location.
Convert a projected point to a screen location.
Reload the tiles for a given tile source.
- (void)reloadTileSource:(id<RMTileSource>)tileSourceThe tile source to reload.
Reload the tiles for a given tile source.
Reload the tiles for a tile source at a given index.
- (void)reloadTileSourceAtIndex:(NSUInteger)indexThe index of the tile source to reload.
Reload the tiles for a tile source at a given index.
Remove all annotations from the map. This does not remove user location annotations, if any.
- (void)removeAllAnnotationsRemove all annotations from the map. This does not remove user location annotations, if any.
Clear all tile images from the caching system.
- (void)removeAllCachedImagesClear all tile images from the caching system.
Remove an annotation from the map.
- (void)removeAnnotation:(RMAnnotation *)annotationThe annotation to remove.
Remove an annotation from the map.
Remove one or more annotations from the map.
- (void)removeAnnotations:(NSArray *)annotationsAn array containing the annotations to remove from the map.
Remove one or more annotations from the map.
Remove a tile source from the map view.
- (void)removeTileSource:(id<RMTileSource>)tileSourceThe tile source to remove.
Remove a tile source from the map view.
Remove the tile source at a given index from the map view.
- (void)removeTileSourceAtIndex:(NSUInteger)indexThe index of the tile source to remove.
Remove the tile source at a given index from the map view.
Selects the specified annotation and displays a callout view for it.
- (void)selectAnnotation:(RMAnnotation *)annotation animated:(BOOL)animatedThe annotation object to select.
If YES, the callout view is animated into position.
Selects the specified annotation and displays a callout view for it.
If the specified annotation is not onscreen, and therefore does not have an associated annotation layer, this method has no effect.
A custom image to use behind the map tiles. The default behavior is to show the default backgroundView and not a static image.
- (void)setBackgroundImage:(UIImage *)backgroundImageA custom image to use behind the map tiles. The default behavior is to show the default backgroundView and not a static image.
Set the map center to a given coordinate.
- (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animatedA coordinate to set as the map center.
Whether to animate the change to the map center.
Set the map center to a given coordinate.
Set the map center to a given projected point.
- (void)setCenterProjectedPoint:(RMProjectedPoint)aPoint animated:(BOOL)animatedA projected point to set as the map center.
Whether to animate the change to the map center.
Set the map center to a given projected point.
Contrain zooming and panning of the map view to a given coordinate boundary.
- (void)setConstraintsSouthWest:(CLLocationCoordinate2D)southWest northEast:(CLLocationCoordinate2D)northEastThe southwest point to constrain to.
The northeast point to constrain to.
Contrain zooming and panning of the map view to a given coordinate boundary.
Hide or show a tile source.
- (void)setHidden:(BOOL)isHidden forTileSource:(id<RMTileSource>)tileSourceA Boolean indicating whether to hide the tile source or not.
The tile source to hide or show.
Hide or show a tile source.
Hide or show a tile source at a given index.
- (void)setHidden:(BOOL)isHidden forTileSourceAtIndex:(NSUInteger)indexA Boolean indicating whether to hide the tile source or not.
The index of the tile source to hide or show.
Hide or show a tile source at a given index.
Set the mode used to track the user location.
- (void)setUserTrackingMode:(RMUserTrackingMode)mode animated:(BOOL)animatedThe mode used to track the user location.
Whether changes to the map center or rotation should be animated when the mode is changed.
Set the mode used to track the user location.
Set zoom level, optionally with an animation.
- (void)setZoom:(float)newZoom animated:(BOOL)animatedSet zoom level, optionally with an animation.
Set both zoom level and center coordinate at the same time, optionally with an animation.
- (void)setZoom:(float)newZoom atCoordinate:(CLLocationCoordinate2D)newCenter animated:(BOOL)animatedThe desired zoom level.
The desired center coordinate.
Whether to animate the map change.
Set both zoom level and center coordinate at the same time, optionally with an animation.
Take a snapshot of the map view.
- (UIImage *)takeSnapshotAn image depicting the map view.
Take a snapshot of the map view.
By default, the overlay containing any visible annotations is also captured.
Take a snapshot of the map view.
- (UIImage *)takeSnapshotAndIncludeOverlay:(BOOL)includeOverlayWhether to include the overlay containing any visible annotations.
An image depicting the map view.
Take a snapshot of the map view.
Zoom the map by a given factor near a certain point.
- (void)zoomByFactor:(float)zoomFactor near:(CGPoint)center animated:(BOOL)animatedThe factor by which to zoom the map.
The point at which to zoom the map.
Whether to animate the zoom.
Zoom the map by a given factor near a certain point.
Zoom the map in at the next integral zoom level near a certain point.
- (void)zoomInToNextNativeZoomAt:(CGPoint)pivot animated:(BOOL)animatedZoom the map in at the next integral zoom level near a certain point.
Zoom the map out at the next integral zoom level near a certain point.
- (void)zoomOutToNextNativeZoomAt:(CGPoint)pivot animated:(BOOL)animatedZoom the map out at the next integral zoom level near a certain point.
Zoom the map to a given latitude and longitude bounds.
- (void)zoomWithLatitudeLongitudeBoundsSouthWest:(CLLocationCoordinate2D)southWest northEast:(CLLocationCoordinate2D)northEast animated:(BOOL)animatedThe southwest point to zoom to.
The northeast point to zoom to.
Whether to animate the zoom.
Zoom the map to a given latitude and longitude bounds.
| Inherits from | RMMapLayer : CAScrollLayer |
| Declared in | RMMarker.h |
An RMMarker object is used for simple point annotations on a map view, represented as a single image. RMMarker objects do not change in size when the map view zooms in or out, but instead stay the same size to consistently represent a point on the map view.
label
A custom label for the marker. The label is shown when first set.
property textForegroundColor
The marker object’s label text foreground color. Defaults to black.
property textBackgroundColor
The marker object’s label text background color. Defaults to clear.
property+ defaultFont
The font used for labels when another font is not explicitly requested. The default is the system font with size 15.
– initWithUIImage:
Initializes and returns a newly allocated marker object using the specified image.
– initWithUIImage:anchorPoint:
Initializes and returns a newly allocated marker object using the specified image and anchor point.
– initWithMapBoxMarkerImage
Initializes and returns a newly allocated marker object using a red, medium-sized star pin image.
– initWithMapBoxMarkerImage:
Initializes and returns a newly allocated marker object using a red, medium-sized pin image and a given symbol name, e.g., bus.
– initWithMapBoxMarkerImage:tintColor:
Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., bus, and a given color.
– initWithMapBoxMarkerImage:tintColor:size:
Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., bus, a given color, and a given size.
– initWithMapBoxMarkerImage:tintColorHex:
Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., bus, and a given HTML hex color, e.g., ff0000.
– initWithMapBoxMarkerImage:tintColorHex:sizeString:
Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., bus, a given HTML hex color, e.g., ff0000, and a given size, e.g., large.
+ clearCachedMapBoxMarkers
Clears the local cache of Mapbox Marker images. Images are cached locally upon first use so that if the application goes offline, markers can still be used.
– changeLabelUsingText:
Changes the label to a UILabel with the supplied text and default marker font and using the existing text foreground and background colors.
– changeLabelUsingText:font:foregroundColor:backgroundColor:
Changes the label to a UILabel with the supplied text and font and using the given text foreground and background colors.
– toggleLabel
Toggle the display of the marker’s label, if any. If hidden, show and if shown, hide.
– showLabel
Show the marker’s label, if any.
– hideLabel
Hide the marker’s label, if any.
– replaceUIImage:
Replace the image for a marker.
– replaceUIImage:anchorPoint:
Replace the image for a marker using a custom anchor point.
A custom label for the marker. The label is shown when first set.
@property (nonatomic, strong) UIView *labelA custom label for the marker. The label is shown when first set.
The marker object’s label text background color. Defaults to clear.
@property (nonatomic, strong) UIColor *textBackgroundColorThe marker object’s label text background color. Defaults to clear.
Clears the local cache of Mapbox Marker images. Images are cached locally upon first use so that if the application goes offline, markers can still be used.
+ (void)clearCachedMapBoxMarkersClears the local cache of Mapbox Marker images. Images are cached locally upon first use so that if the application goes offline, markers can still be used.
Changes the label to a UILabel with the supplied text and default marker font and using the existing text foreground and background colors.
- (void)changeLabelUsingText:(NSString *)textThe text for the label.
Changes the label to a UILabel with the supplied text and default marker font and using the existing text foreground and background colors.
Changes the label to a UILabel with the supplied text and font and using the given text foreground and background colors.
- (void)changeLabelUsingText:(NSString *)text font:(UIFont *)font foregroundColor:(UIColor *)textColor backgroundColor:(UIColor *)backgroundColorThe text for the label.
A font to use for the label text.
The color for the label text.
The color for the label background.
Changes the label to a UILabel with the supplied text and font and using the given text foreground and background colors.
Hide the marker’s label, if any.
- (void)hideLabelHide the marker’s label, if any.
Initializes and returns a newly allocated marker object using a red, medium-sized star pin image.
- (id)initWithMapBoxMarkerImageInitializes and returns a newly allocated marker object using a red, medium-sized star pin image.
Initializes and returns a newly allocated marker object using a red, medium-sized pin image and a given symbol name, e.g., bus.
- (id)initWithMapBoxMarkerImage:(NSString *)symbolNameA symbol name from the Maki icon set.
An initialized RMMarker layer.
Initializes and returns a newly allocated marker object using a red, medium-sized pin image and a given symbol name, e.g., bus.
Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., bus, and a given color.
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName tintColor:(UIColor *)colorAn initialized RMMarker layer.
Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., bus, and a given color.
Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., bus, a given color, and a given size.
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName tintColor:(UIColor *)color size:(RMMarkerMapBoxImageSize)sizeA symbol name from the Maki icon set.
A color for the marker.
A size for the marker.
An initialized RMMarker layer.
Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., bus, a given color, and a given size.
Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., bus, and a given HTML hex color, e.g., ff0000.
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName tintColorHex:(NSString *)colorHexA symbol name from the Maki icon set.
A color for the marker specified as an HTML hex code.
An initialized RMMarker layer.
Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., bus, and a given HTML hex color, e.g., ff0000.
Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., bus, a given HTML hex color, e.g., ff0000, and a given size, e.g., large.
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName tintColorHex:(NSString *)colorHex sizeString:(NSString *)sizeStringA symbol name from the Maki icon set.
A color for the marker specified as an HTML hex code.
A size such as small, medium, or large.
An initialized RMMarker layer.
Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., bus, a given HTML hex color, e.g., ff0000, and a given size, e.g., large.
Initializes and returns a newly allocated marker object using the specified image.
- (id)initWithUIImage:(UIImage *)imageAn image to use for the marker.
Initializes and returns a newly allocated marker object using the specified image.
Initializes and returns a newly allocated marker object using the specified image and anchor point.
- (id)initWithUIImage:(UIImage *)image anchorPoint:(CGPoint)anchorPointAn image to use for the marker.
A point representing a range from 0 to 1 in each of the height and width coordinate space, normalized to the size of the image, at which to place the image.
An initialized marker object.
Initializes and returns a newly allocated marker object using the specified image and anchor point.
Replace the image for a marker.
- (void)replaceUIImage:(UIImage *)imageAn image to use for the marker.
Replace the image for a marker.
Replace the image for a marker using a custom anchor point.
- (void)replaceUIImage:(UIImage *)image anchorPoint:(CGPoint)anchorPointAn image to use for the marker.
A point representing a range from 0 to 1 in each of the height and width coordinate space, normalized to the size of the image, at which to place the image.
Replace the image for a marker using a custom anchor point.
Show the marker’s label, if any.
- (void)showLabelShow the marker’s label, if any.
| Inherits from | NSObject |
| Conforms to | RMTileCache |
| Declared in | RMMemoryCache.h |
An RMMemoryCache object represents memory-based caching of map tile images. Since memory is constrained in the iOS environment, this cache is relatively small, but useful for increasing performance.
– initWithCapacity:
Initializes and returns a newly allocated memory cache object with the specified tile count capacity.
capacity
The capacity, in number of tiles, that the memory cache can hold.
property– makeSpaceInCache
Remove the least-recently used image from the cache if the cache is at or over capacity. This removes a single image from the cache.
Initializes and returns a newly allocated memory cache object with the specified tile count capacity.
- (id)initWithCapacity:(NSUInteger)aCapacityThe maximum number of tiles to be held in the cache.
An initialized memory cache object or nil if the object couldn’t be created.
Initializes and returns a newly allocated memory cache object with the specified tile count capacity.
Remove the least-recently used image from the cache if the cache is at or over capacity. This removes a single image from the cache.
- (void)makeSpaceInCacheRemove the least-recently used image from the cache if the cache is at or over capacity. This removes a single image from the cache.
| Inherits from | RMAnnotation : NSObject |
| Declared in | RMPointAnnotation.h |
An RMPointAnnotation is used to represent a single point on a map. The annotation will automatically have a layer created when needed that displays an RMMarker with a default point icon.
If you wish to customize the appearance, you should instead create an RMAnnotation and configure its layer directly. Providing a layer manually for instances of RMPointAnnotation will not have any effect.
| Inherits from | RMShapeAnnotation : RMAnnotation : NSObject |
| Declared in | RMPolygonAnnotation.h |
An RMPolygonAnnotation is a concrete subclass of RMShapeAnnotation that is used to represent a shape consisting of one or more points that define a closed polygon. The points are connected end-to-end in the order they are provided. The first and last points are connected to each other to create the closed shape. The annotation will automatically have a layer created when needed that displays an RMShape.
When creating a polygon, you can mask out portions of the polygon by specifying one or more interior polygons. Areas that are masked by an interior polygon are not considered part of the polygon’s occupied area.
If you wish to customize the appearance, you should instead create an RMAnnotation and configure its layer directly. Providing a layer manually for instances of RMPolygonAnnotation will not have any effect.
– initWithMapView:points:interiorPolygons:
Initialize a polygon annotation.
interiorPolygons
The array of polygons nested inside the receiver. (read-only)
propertyThe array of polygons nested inside the receiver. (read-only)
@property (nonatomic, readonly, strong) NSArray *interiorPolygonsThe array of polygons nested inside the receiver. (read-only)
When a polygon is rendered on screen, the area occupied by any interior polygons is masked out and not considered part of the polygon.
Initialize a polygon annotation.
- (id)initWithMapView:(RMMapView *)aMapView points:(NSArray *)points interiorPolygons:(NSArray *)interiorPolygonsThe map view on which to place the annotation.
An array of CLLocation points defining the shape. The data in this array is copied to the new object.
An array of RMPolygonAnnotation objects that define one or more cutout regions for the receiver’s polygon.
An initialized shape annotation object, or nil if an annotation was unable to be initialized.
Initialize a polygon annotation.
| Inherits from | RMShapeAnnotation : RMAnnotation : NSObject |
| Declared in | RMPolylineAnnotation.h |
An RMPolylineAnnotation is a concrete subclass of RMShapeAnnotation that is used to represent a shape consisting of one or more points that define connecting line segments. The points are connected end-to-end in the order they are provided. The first and last points are not connected to each other. The annotation will automatically have a layer created when needed that displays an RMShape.
If you wish to customize the appearance, you should instead create an RMAnnotation and configure its layer directly. Providing a layer manually for instances of RMPolylineAnnotation will not have any effect.
| Inherits from | RMMapLayer : CAScrollLayer |
| Declared in | RMShape.h |
An RMShape object is used to represent a line, polygon, or other shape composed of two or more points connected by lines. An RMShape object changes visible size in response to map zooms in order to consistently represent coverage of the same geographic area.
– initWithView:
Initializes and returns a newly allocated shape object for the specified map view.
lineColor
The line color of the shape. Defaults to black.
property fillColor
The fill color of the shape. Defaults to clear.
property fillPatternImage
The fill pattern image of the shape. If set, the fillColor is set to nil.
lineWidth
The line width of the shape. Defaults to 2.0.
property pathBoundingBox
The bounding box of the shape in the current viewport.
property– moveToProjectedPoint:
Move the drawing pen to a projected point.
– moveToScreenPoint:
Move the drawing pen to a screen point.
– moveToCoordinate:
Move the drawing pen to a coordinate.
– addLineToProjectedPoint:
Draw a line from the current pen location to a projected point.
– addLineToScreenPoint:
Draw a line from the current pen location to a screen point.
– addLineToCoordinate:
Draw a line from the current pen location to a coordinate.
– addCurveToCoordinate:controlCoordinate1:controlCoordinate2:
Draw a curve from the current pen location to a coordinate.
– addQuadCurveToCoordinate:controlCoordinate:
Draw a quad curve from the current pen location to a coordinate.
– addCurveToProjectedPoint:controlProjectedPoint1:controlProjectedPoint2:
Draw a curve from the current pen location to a projected point.
– addQuadCurveToProjectedPoint:controlProjectedPoint:
Draw a quad curve from the current pen location to a projected point.
– performBatchOperations:
Alter the path without rerecalculating the geometry. Recommended for many operations in order to increase performance.
– closePath
Closes the path, connecting the last point to the first. After this action, no further points can be added to the path.
The fill color of the shape. Defaults to clear.
@property (nonatomic, strong) UIColor *fillColorThe fill color of the shape. Defaults to clear.
The fill pattern image of the shape. If set, the fillColor is set to nil.
@property (nonatomic, strong) UIImage *fillPatternImageThe fill pattern image of the shape. If set, the fillColor is set to nil.
The line color of the shape. Defaults to black.
@property (nonatomic, strong) UIColor *lineColorThe line color of the shape. Defaults to black.
The line width of the shape. Defaults to 2.0.
@property (nonatomic, assign) float lineWidthThe line width of the shape. Defaults to 2.0.
Draw a curve from the current pen location to a coordinate.
- (void)addCurveToCoordinate:(CLLocationCoordinate2D)coordinate controlCoordinate1:(CLLocationCoordinate2D)controlCoordinate1 controlCoordinate2:(CLLocationCoordinate2D)controlCoordinate2The coordinate to draw to.
The first control coordinate.
The second control coordinate.
Draw a curve from the current pen location to a coordinate.
Draw a curve from the current pen location to a projected point.
- (void)addCurveToProjectedPoint:(RMProjectedPoint)projectedPoint controlProjectedPoint1:(RMProjectedPoint)controlProjectedPoint1 controlProjectedPoint2:(RMProjectedPoint)controlProjectedPoint2The projected point to draw to.
The first control projected point.
The second control projected point.
Draw a curve from the current pen location to a projected point.
Draw a line from the current pen location to a coordinate.
- (void)addLineToCoordinate:(CLLocationCoordinate2D)coordinateThe coordinate to draw to.
Draw a line from the current pen location to a coordinate.
Draw a line from the current pen location to a projected point.
- (void)addLineToProjectedPoint:(RMProjectedPoint)projectedPointThe projected point to draw to.
Draw a line from the current pen location to a projected point.
Draw a line from the current pen location to a screen point.
- (void)addLineToScreenPoint:(CGPoint)pointThe screen point to draw to.
Draw a line from the current pen location to a screen point.
Draw a quad curve from the current pen location to a coordinate.
- (void)addQuadCurveToCoordinate:(CLLocationCoordinate2D)coordinate controlCoordinate:(CLLocationCoordinate2D)controlCoordinateThe coordinate to draw to.
The control coordinate.
Draw a quad curve from the current pen location to a coordinate.
Draw a quad curve from the current pen location to a projected point.
- (void)addQuadCurveToProjectedPoint:(RMProjectedPoint)projectedPoint controlProjectedPoint:(RMProjectedPoint)controlProjectedPointThe projected point to draw to.
The control projected point.
Draw a quad curve from the current pen location to a projected point.
Closes the path, connecting the last point to the first. After this action, no further points can be added to the path.
- (void)closePathCloses the path, connecting the last point to the first. After this action, no further points can be added to the path.
There is no requirement that a path be closed.
Initializes and returns a newly allocated shape object for the specified map view.
- (id)initWithView:(RMMapView *)aMapViewThe map view the shape should be drawn on.
Initializes and returns a newly allocated shape object for the specified map view.
Move the drawing pen to a coordinate.
- (void)moveToCoordinate:(CLLocationCoordinate2D)coordinateThe coordinate to move to.
Move the drawing pen to a coordinate.
Move the drawing pen to a projected point.
- (void)moveToProjectedPoint:(RMProjectedPoint)projectedPointThe projected point to move to.
Move the drawing pen to a projected point.
Move the drawing pen to a screen point.
- (void)moveToScreenPoint:(CGPoint)pointThe screen point to move to.
Move the drawing pen to a screen point.
Alter the path without rerecalculating the geometry. Recommended for many operations in order to increase performance.
- (void)performBatchOperations:(void ( ^ ) ( RMShape *aShape ))blockA block containing the operations to perform.
Alter the path without rerecalculating the geometry. Recommended for many operations in order to increase performance.
| Inherits from | RMAnnotation : NSObject |
| Declared in | RMShapeAnnotation.h |
An RMShapeAnnotation is an abstract subclass of RMAnnotation that is used to represent a shape consisting of one or more points. You should not create instances of this class directly. Instead, you should create instances of the RMPolylineAnnotation or RMPolygonAnnotation classes. However, you can use the properties of this class to access information about the specific points associated with the line or polygon.
Providing a layer manually for instances of RMShapeAnnotation subclasses will not have any effect.
– initWithMapView:points:
Initialize a shape annotation.
points
The array of points associated with the shape. (read-only)
propertyInitialize a shape annotation.
- (id)initWithMapView:(RMMapView *)aMapView points:(NSArray *)pointsThe map view on which to place the annotation.
An array of CLLocation points defining the shape. The data in this array is copied to the new object.
An initialized shape annotation object, or nil if an annotation was unable to be initialized.
Initialize a shape annotation.
| Inherits from | RMMapView : UIView |
| Declared in | RMStaticMapView.h |
An RMStaticMapView object provides an embeddable, static map image view. You use this class to display map information in your application that does not need to change or provide user interaction. You can center the map on a given coordinate and zoom level, specify the size of the area you want to display, and optionally provide a completion handler that can be performed upon map load. The map can also automatically have markers added to it if they were provided as simplestyle data when the map was created.
Warning: Please note that you are responsible for getting permission to use the map data, and for ensuring your use adheres to the relevant terms of use. You are also responsible for displaying attribution details for the data elsewhere in your application, if applicable.
– initWithFrame:mapID:
Initialize a static map view with a given frame and mapID.
– initWithFrame:mapID:completionHandler:
Initialize a static map view with a given frame and mapID, performing a block upon completion of the map load.
– initWithFrame:mapID:centerCoordinate:zoomLevel:
Initialize a static map view with a given frame, mapID, center coordinate, and zoom level.
– initWithFrame:mapID:centerCoordinate:zoomLevel:completionHandler:
Designated initializer. Initialize a static map view with a given frame, mapID, center coordinate, and zoom level, performing a block upon completion of the map load.
Initialize a static map view with a given frame and mapID.
- (id)initWithFrame:(CGRect)frame mapID:(NSString *)mapIDThe frame with which to initialize the map view.
The MapBox map ID string, typically in the format <username>.map-<mapname>.
An initialized map view, or nil if the map view was unable to be initialized.
Initialize a static map view with a given frame and mapID.
The map ID is expected to provide initial center coordinate and zoom level information, and may optionally also include simplestyle marker data, which will automatically be added to the map view.
Initialize a static map view with a given frame, mapID, center coordinate, and zoom level.
- (id)initWithFrame:(CGRect)frame mapID:(NSString *)mapID centerCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(CGFloat)zoomLevelThe frame with which to initialize the map view.
The MapBox map ID string, typically in the format <username>.map-<mapname>.
The map center coordinate.
The map zoom level.
An initialized map view, or nil if the map view was unable to be initialized.
Initialize a static map view with a given frame, mapID, center coordinate, and zoom level.
The map ID may optionally also include simplestyle marker data, which will automatically be added to the map view.
Designated initializer. Initialize a static map view with a given frame, mapID, center coordinate, and zoom level, performing a block upon completion of the map load.
- (id)initWithFrame:(CGRect)frame mapID:(NSString *)mapID centerCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(CGFloat)zoomLevel completionHandler:(void ( ^ ) ( UIImage *))handlerThe frame with which to initialize the map view.
The MapBox map ID string, typically in the format <username>.map-<mapname>.
The map center coordinate.
The map zoom level.
A block to be performed upon map load completion. An image of the map, including markers, is passed as an argument to the block in the event that you wish to use it elsewhere. The handler will be called on the main dispatch queue.
An initialized map view, or nil if the map view was unable to be initialized.
Designated initializer. Initialize a static map view with a given frame, mapID, center coordinate, and zoom level, performing a block upon completion of the map load.
The map ID may optionally also include simplestyle marker data, which will automatically be added to the map view. The block will be performed upon completion of the load of both the map and of any simplestyle markers included with the map ID.
Initialize a static map view with a given frame and mapID, performing a block upon completion of the map load.
- (id)initWithFrame:(CGRect)frame mapID:(NSString *)mapID completionHandler:(void ( ^ ) ( UIImage *))handlerThe frame with which to initialize the map view.
The MapBox map ID string, typically in the format <username>.map-<mapname>.
A block to be performed upon map and marker load completion. An image of the map, including markers, is passed as an argument to the block in the event that you wish to use it elsewhere. The handler will be called on the main dispatch queue.
An initialized map view, or nil if the map view was unable to be initialized.
Initialize a static map view with a given frame and mapID, performing a block upon completion of the map load.
The map ID is expected to provide initial center coordinate and zoom level information, and may optionally also include simplestyle marker data, which will automatically be added to the map view. The block will be performed upon completion of the load of both the map and of any simplestyle markers included with the map ID.
| Inherits from | NSObject |
| Conforms to | RMTileCache |
| Declared in | RMTileCache.h |
An RMTileCache object manages memory-based and disk-based caches for map tiles that have been retrieved from the network.
An RMMapView has one RMTileCache across all tile sources, which is further divided according to each tile source’s uniqueTilecacheKey property in order to keep tiles separate in the cache.
An RMTileCache is a key component of offline map use. All tile requests pass through the tile cache and are served from cache if available, avoiding network operation. If tiles exist in cache already, a tile source that is instantiated when offline will still be able to serve tile imagery to the map renderer for areas that have been previously cached. This can occur either from normal map use, since all tiles are cached after being retrieved, or from proactive caching ahead of time using the beginBackgroundCacheForTileSource:southWest:northEast:minZoom:maxZoom: method.
– initWithExpiryPeriod:
Initializes and returns a newly allocated cache object with specified expiry period.
+ tileHash:
Return an identifying hash number for the specified tile.
– addCache:
Adds a given cache to the cache management system.
tileCaches
The list of caches managed by a cache manager. This could include memory-based, disk-based, or other types of caches.
property backgroundCacheDelegate
A delegate to notify of background tile cache download operations.
property isBackgroundCaching
Whether or not the tile cache is currently background caching.
property– beginBackgroundCacheForTileSource:southWest:northEast:minZoom:maxZoom:
Tells the tile cache to begin background caching. Progress during the caching operation can be observed by implementing the RMTileCacheBackgroundDelegate protocol.
– cancelBackgroundCache
Cancel any background caching.
A delegate to notify of background tile cache download operations.
@property (nonatomic, weak) id<RMTileCacheBackgroundDelegate> backgroundCacheDelegateA delegate to notify of background tile cache download operations.
Whether or not the tile cache is currently background caching.
@property (nonatomic, readonly, assign) BOOL isBackgroundCachingWhether or not the tile cache is currently background caching.
The list of caches managed by a cache manager. This could include memory-based, disk-based, or other types of caches.
@property (nonatomic, readonly, strong) NSArray *tileCachesThe list of caches managed by a cache manager. This could include memory-based, disk-based, or other types of caches.
Adds a given cache to the cache management system.
- (void)addCache:(id<RMTileCache>)cacheA memory-based or disk-based cache.
Adds a given cache to the cache management system.
Tells the tile cache to begin background caching. Progress during the caching operation can be observed by implementing the RMTileCacheBackgroundDelegate protocol.
- (void)beginBackgroundCacheForTileSource:(id<RMTileSource>)tileSource southWest:(CLLocationCoordinate2D)southWest northEast:(CLLocationCoordinate2D)northEast minZoom:(float)minZoom maxZoom:(float)maxZoomThe tile source from which to retrieve tiles.
The southwest corner of the geographic area to cache.
The northeast corner of the geographic area to cache.
The minimum zoom level to cache.
The maximum zoom level to cache.
Tells the tile cache to begin background caching. Progress during the caching operation can be observed by implementing the RMTileCacheBackgroundDelegate protocol.
Cancel any background caching.
- (void)cancelBackgroundCacheCancel any background caching.
This method returns immediately so as to not block the calling thread. If you wish to be notified of the actual cancellation completion, implement the tileCacheDidCancelBackgroundCache: delegate method.
Initializes and returns a newly allocated cache object with specified expiry period.
- (id)initWithExpiryPeriod:(NSTimeInterval)periodA period of time after which tiles should be expunged from the cache.
An initialized cache object or nil if the object couldn’t be created.
Initializes and returns a newly allocated cache object with specified expiry period.
If the init method is used to initialize a cache instead, a period of 0 is used. In that case, time-based expiration of tiles is not performed, but rather the cached tile count is used instead.
| Inherits from | RMGenericMapSource |
| Declared in | RMTileMillSource.h |
An RMTileMillSource is used to display map tiles from a live, running instance of TileMill. All instances of TileMill automatically include an HTTP server, allowing network access outside of the application. This tile source allows for an easier development cycle between map editing and testing in an iOS application.
– initWithMapName:tileCacheKey:minZoom:maxZoom:
Initialize and return a newly allocated TileMill tile source based on a given map name. This assumes that TileMill is running on the local development computer (e.g., localhost), which will not work from an iOS device but will work in the iOS Simulator.
– initWithHost:mapName:tileCacheKey:minZoom:maxZoom:
Initialize and return a newly allocated TileMill tile source based on a given host and map name. This is ideal for testing on an actual iOS device if the network name or address of the computer running TileMill is passed as the host parameter.
Initialize and return a newly allocated TileMill tile source based on a given host and map name. This is ideal for testing on an actual iOS device if the network name or address of the computer running TileMill is passed as the host parameter.
- (id)initWithHost:(NSString *)host mapName:(NSString *)mapName tileCacheKey:(NSString *)tileCacheKey minZoom:(float)minZoom maxZoom:(float)maxZoomThe hostname or IP address of the computer running TileMill.
The name of the map in TileMill, substituting dashes for spaces.
A unique cache string to use for this tile source’s tiles in the tile cache.
The minimum zoom level supported by the map.
The maximum zoom level supported by the map.
An initialized TileMill tile source.
Initialize and return a newly allocated TileMill tile source based on a given host and map name. This is ideal for testing on an actual iOS device if the network name or address of the computer running TileMill is passed as the host parameter.
Initialize and return a newly allocated TileMill tile source based on a given map name. This assumes that TileMill is running on the local development computer (e.g., localhost), which will not work from an iOS device but will work in the iOS Simulator.
- (id)initWithMapName:(NSString *)mapName tileCacheKey:(NSString *)tileCacheKey minZoom:(float)minZoom maxZoom:(float)maxZoomThe name of the map in TileMill, substituting dashes for spaces.
A unique cache string to use for this tile source’s tiles in the tile cache.
The minimum zoom level supported by the map.
The maximum zoom level supported by the map.
An initialized TileMill tile source.
Initialize and return a newly allocated TileMill tile source based on a given map name. This assumes that TileMill is running on the local development computer (e.g., localhost), which will not work from an iOS device but will work in the iOS Simulator.
| Inherits from | RMAnnotation : NSObject |
| Declared in | RMUserLocation.h |
The RMUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class directly. Instead, you retrieve an existing RMUserLocation object from the userLocation property of the map view displayed in your application.
The heading of the user location. (read-only)
@property (nonatomic, readonly) CLHeading *headingThe current location of the device. (read-only)
@property (nonatomic, readonly) CLLocation *locationThe current location of the device. (read-only)
This property contains nil if the map view is not currently showing the user location or if the user’s location has not yet been determined.
| Inherits from | UIBarButtonItem |
| Declared in | RMUserTrackingBarButtonItem.h |
An RMUserTrackingBarButtonItem object is a specialized bar button item that allows the user to toggle through the user tracking modes. For example, when the user taps the button, the map view toggles between tracking the user with and without heading. The button also reflects the current user tracking mode if set elsewhere. This bar button item is associated to a single map view.
– initWithMapView:
Initializes a newly created bar button item with the specified map view.
mapView
The map view associated with this bar button item.
propertyInitializes a newly created bar button item with the specified map view.
- (id)initWithMapView:(RMMapView *)mapViewThe map view used by this bar button item.
The initialized bar button item.
Initializes a newly created bar button item with the specified map view.
| Declared in | RMInteractiveSource.h |
Developers can import RMInteractiveSource in order to enable embedded interactivity in their RMMapView, RMMBTilesSource, and RMMapBoxSource objects. Interactivity is based on the UTFGrid specification, which is a space-efficient way to encode many arbitrary values for pixel coordinates at every zoom level, allowing later retrieval based on user events on those coordinates. For example, the user touching a pixel in Spain could trigger retrieval of Spain’s flag image for display.
Interactive map views adopt the RMInteractiveMapView protocol.
Interactivity currently supports two types of output, teaser and full. These two types are ideal for master/detail interfaces or for showing a MapKit-style detail-toggling point callout.
– supportsInteractivity
Returns YES if a map view supports interactivity features given its current tile sources.
required method– formattedOutputOfType:forPoint:
Returns the HTML-formatted output for a given point on a given map view.
required methodReturns the HTML-formatted output for a given point on a given map view.
- (NSString *)formattedOutputOfType:(RMInteractiveSourceOutputType)outputType forPoint:(CGPoint)pointThe type of feature info desired.
A point in the map view.
The formatted feature output.
Returns the HTML-formatted output for a given point on a given map view.
| Declared in | RMInteractiveSource.h |
Developers can import RMInteractiveSource in order to enable embedded interactivity in their RMMapView, RMMBTilesSource, and RMMapBoxSource objects. Interactivity is based on the UTFGrid specification and is best described by this web demo.
Interactive tile sources adopt the RMInteractiveSource protocol.
Interactivity currently supports two types of output, teaser and full. These two types are ideal for master/detail interfaces or for showing a MapKit-style detail-toggling point callout.
– supportsInteractivity
Returns YES if a tile source supports interactivity features.
required method– formattedOutputOfType:forPoint:inMapView:
Returns the HTML-formatted output for a given point on a given map view, considering the currently active interactive tile source.
required methodReturns the HTML-formatted output for a given point on a given map view, considering the currently active interactive tile source.
- (NSString *)formattedOutputOfType:(RMInteractiveSourceOutputType)outputType forPoint:(CGPoint)point inMapView:(RMMapView *)mapViewThe type of feature info desired.
A point in the map view.
The map view being interacted with.
The formatted feature output.
Returns the HTML-formatted output for a given point on a given map view, considering the currently active interactive tile source.
| Conforms to | NSObject |
| Declared in | RMMapViewDelegate.h |
The RMMapViewDelegate protocol defines a set of optional methods that you can use to receive map-related update messages. Because many map operations require the RMMapView class to load data asynchronously, the map view calls these methods to notify your application when specific operations complete. The map view also uses these methods to request annotation layers and to manage interactions with those layers.
– mapView:layerForAnnotation:
Returns (after creating or reusing) the layer associated with the specified annotation object.
– mapView:willHideLayerForAnnotation:
Tells the delegate that the visible layer for an annotation is about to be hidden from view due to scrolling or zooming the map.
– mapView:didHideLayerForAnnotation:
Tells the delegate that the visible layer for an annotation has been hidden from view due to scrolling or zooming the map.
– mapView:didSelectAnnotation:
Tells the delegate that one of its annotations was selected.
– mapView:didDeselectAnnotation:
Tells the delegate that one of its annotations was deselected.
– beforeMapMove:byUser:
Tells the delegate when a map is about to move.
– afterMapMove:byUser:
Tells the delegate when a map has finished moving.
– beforeMapZoom:byUser:
Tells the delegate when a map is about to zoom.
– afterMapZoom:byUser:
Tells the delegate when a map has finished zooming.
– mapViewRegionDidChange:
Tells the delegate that the region displayed by the map view just changed.
– doubleTapOnMap:at:
Tells the delegate when the user double-taps a map view.
– singleTapOnMap:at:
Tells the delegate when the user taps a map view.
– singleTapTwoFingersOnMap:at:
Tells the delegate when the user taps a map view with two fingers.
– longPressOnMap:at:
Tells the delegate when the user long-presses a map view.
– tapOnAnnotation:onMap:
Tells the delegate when the user taps the layer for an annotation.
– doubleTapOnAnnotation:onMap:
Tells the delegate when the user double-taps the layer for an annotation.
– longPressOnAnnotation:onMap:
Tells the delegate when the user long-presses the layer for an annotation.
– tapOnLabelForAnnotation:onMap:
Tells the delegate when the user taps the label for an annotation.
– doubleTapOnLabelForAnnotation:onMap:
Tells the delegate when the user double-taps the label for an annotation.
– tapOnCalloutAccessoryControl:forAnnotation:onMap:
Tells the delegate that the user tapped one of the annotation layer’s accessory buttons.
– mapView:shouldDragAnnotation:
Asks the delegate whether the user should be allowed to drag the layer for an annotation.
– mapView:didDragAnnotation:withDelta:
Tells the delegate that the user is dragging an annotation layer.
– mapView:didEndDragAnnotation:
Tells the delegate that the user has finished dragging an annotation layer.
– mapViewWillStartLocatingUser:
Tells the delegate that the map view will start tracking the user’s position.
– mapViewDidStopLocatingUser:
Tells the delegate that the map view stopped tracking the user’s location.
– mapView:didUpdateUserLocation:
Tells the delegate that the location of the user was updated.
– mapView:didFailToLocateUserWithError:
Tells the delegate that an attempt to locate the user’s position failed.
– mapView:didChangeUserTrackingMode:animated:
Tells the delegate that the user tracking mode changed.
Tells the delegate when a map has finished moving.
- (void)afterMapMove:(RMMapView *)map byUser:(BOOL)wasUserActionThe map view that has finished moving.
A Boolean indicating whether the map move was in response to a user action or not.
Tells the delegate when a map has finished moving.
Tells the delegate when a map has finished zooming.
- (void)afterMapZoom:(RMMapView *)map byUser:(BOOL)wasUserActionThe map view that has finished zooming.
A Boolean indicating whether the map zoom was in response to a user action or not.
Tells the delegate when a map has finished zooming.
Tells the delegate when a map is about to move.
- (void)beforeMapMove:(RMMapView *)map byUser:(BOOL)wasUserActionThe map view that is about to move.
A Boolean indicating whether the map move is in response to a user action or not.
Tells the delegate when a map is about to move.
Tells the delegate when a map is about to zoom.
- (void)beforeMapZoom:(RMMapView *)map byUser:(BOOL)wasUserActionThe map view that is about to zoom.
A Boolean indicating whether the map zoom is in response to a user action or not.
Tells the delegate when a map is about to zoom.
Tells the delegate when the user double-taps the layer for an annotation.
- (void)doubleTapOnAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)mapThe annotation that was double-tapped.
The map view.
Tells the delegate when the user double-taps the layer for an annotation.
Tells the delegate when the user double-taps the label for an annotation.
- (void)doubleTapOnLabelForAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)mapThe annotation whose label was was double-tapped.
The map view.
Tells the delegate when the user double-taps the label for an annotation.
Tells the delegate when the user double-taps a map view.
- (void)doubleTapOnMap:(RMMapView *)map at:(CGPoint)pointThe map that was double-tapped.
The point at which the map was double-tapped.
Tells the delegate when the user double-taps a map view.
Tells the delegate when the user long-presses the layer for an annotation.
- (void)longPressOnAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)mapThe annotation that was long-pressed.
The map view.
Tells the delegate when the user long-presses the layer for an annotation.
Tells the delegate when the user long-presses a map view.
- (void)longPressOnMap:(RMMapView *)map at:(CGPoint)pointThe map that was long-pressed.
The point at which the map was long-pressed.
Tells the delegate when the user long-presses a map view.
Tells the delegate that the user tracking mode changed.
- (void)mapView:(RMMapView *)mapView didChangeUserTrackingMode:(RMUserTrackingMode)mode animated:(BOOL)animatedThe map view whose user tracking mode changed.
The mode used to track the user’s location.
If YES, the change from the current mode to the new mode is animated; otherwise, it is not. This parameter affects only tracking mode changes. Changes to the user location or heading are always animated.
Tells the delegate that the user tracking mode changed.
Tells the delegate that one of its annotations was deselected.
- (void)mapView:(RMMapView *)mapView didDeselectAnnotation:(RMAnnotation *)annotationThe map view containing the annotation.
The annotation that was deselected.
Tells the delegate that one of its annotations was deselected.
You can use this method to track changes in the selection state of annotations.
Tells the delegate that the user is dragging an annotation layer.
- (void)mapView:(RMMapView *)map didDragAnnotation:(RMAnnotation *)annotation withDelta:(CGPoint)deltaThe map view.
The annotation being dragged.
The delta of movement since the last drag notification.
Tells the delegate that the user is dragging an annotation layer.
If the screen location of the annotation layer should be changed, you are responsible for adjusting it.
Tells the delegate that the user has finished dragging an annotation layer.
- (void)mapView:(RMMapView *)map didEndDragAnnotation:(RMAnnotation *)annotationThe map view.
The annotation that was dragged.
Tells the delegate that the user has finished dragging an annotation layer.
If the screen position of the annotation layer has been changed since the drag operation started, you should update its coordinate to the final location in order to ensure that the annotation is displayed there going forward. Otherwise, the next time the annotations are adjusted, it will revert to its original position from before the drag.
Tells the delegate that an attempt to locate the user’s position failed.
- (void)mapView:(RMMapView *)mapView didFailToLocateUserWithError:(NSError *)errorThe map view that is tracking the user’s location.
An error object containing the reason why location tracking failed.
Tells the delegate that an attempt to locate the user’s position failed.
Tells the delegate that the visible layer for an annotation has been hidden from view due to scrolling or zooming the map.
- (void)mapView:(RMMapView *)mapView didHideLayerForAnnotation:(RMAnnotation *)annotationThe map view whose annotation layer was hidden.
The annotation whose layer was hidden.
Tells the delegate that the visible layer for an annotation has been hidden from view due to scrolling or zooming the map.
Tells the delegate that one of its annotations was selected.
- (void)mapView:(RMMapView *)mapView didSelectAnnotation:(RMAnnotation *)annotationThe map view containing the annotation.
The annotation that was selected.
Tells the delegate that one of its annotations was selected.
You can use this method to track changes in the selection state of annotations.
Tells the delegate that the location of the user was updated.
- (void)mapView:(RMMapView *)mapView didUpdateUserLocation:(RMUserLocation *)userLocationThe map view that is tracking the user’s location.
The location object representing the user’s latest location.
Tells the delegate that the location of the user was updated.
While the showsUserLocation property is set to YES, this method is called whenever a new location update is received by the map view. This method is also called if the map view’s user tracking mode is set to RMUserTrackingModeFollowWithHeading and the heading changes.
This method is not called if the application is currently running in the background. If you want to receive location updates while running in the background, you must use the Core Location framework.
Returns (after creating or reusing) the layer associated with the specified annotation object.
- (RMMapLayer *)mapView:(RMMapView *)mapView layerForAnnotation:(RMAnnotation *)annotationThe map view that requested the annotation layer.
The object representing the annotation that is about to be displayed. In addition to your custom annotations, this object could be an RMUserLocation object representing the user’s current location.
The annotation layer to display for the specified annotation or nil if you do not want to display a layer.
Returns (after creating or reusing) the layer associated with the specified annotation object.
An annotation layer can be created using RMMapLayer and its subclasses, such as RMMarker for points and RMShape for shapes such as lines and polygons.
If the object in the annotation parameter is an instance of the RMUserLocation class, you can provide a custom layer to denote the user’s location. To display the user’s location using the default system layer, return nil.
If you do not implement this method, or if you return nil from your implementation for annotations other than the user location annotation, the map view does not display a layer for the annotation.
Asks the delegate whether the user should be allowed to drag the layer for an annotation.
- (BOOL)mapView:(RMMapView *)map shouldDragAnnotation:(RMAnnotation *)annotationThe map view.
The annotation the user is attempting to drag.
A Boolean value indicating whether the user should be allowed to drag the annotation layer.
Asks the delegate whether the user should be allowed to drag the layer for an annotation.
Tells the delegate that the visible layer for an annotation is about to be hidden from view due to scrolling or zooming the map.
- (void)mapView:(RMMapView *)mapView willHideLayerForAnnotation:(RMAnnotation *)annotationThe map view whose annotation alyer will be hidden.
The annotation whose layer will be hidden.
Tells the delegate that the visible layer for an annotation is about to be hidden from view due to scrolling or zooming the map.
Tells the delegate that the map view stopped tracking the user’s location.
- (void)mapViewDidStopLocatingUser:(RMMapView *)mapViewThe map view that stopped tracking the user’s location.
Tells the delegate that the map view stopped tracking the user’s location.
This method is called when the value of the showsUserLocation property changes to NO.
Tells the delegate that the region displayed by the map view just changed.
- (void)mapViewRegionDidChange:(RMMapView *)mapViewThe map view whose visible region changed.
Tells the delegate that the region displayed by the map view just changed.
This method is called whenever the currently displayed map region changes. During scrolling, this method may be called many times to report updates to the map position. Therefore, your implementation of this method should be as lightweight as possible to avoid affecting scrolling performance.
Tells the delegate that the map view will start tracking the user’s position.
- (void)mapViewWillStartLocatingUser:(RMMapView *)mapViewThe map view that is tracking the user’s location.
Tells the delegate that the map view will start tracking the user’s position.
This method is called when the value of the showsUserLocation property changes to YES.
Tells the delegate when the user taps a map view.
- (void)singleTapOnMap:(RMMapView *)map at:(CGPoint)pointThe map that was tapped.
The point at which the map was tapped.
Tells the delegate when the user taps a map view.
Tells the delegate when the user taps a map view with two fingers.
- (void)singleTapTwoFingersOnMap:(RMMapView *)map at:(CGPoint)pointThe map that was tapped.
The center point at which the map was tapped.
Tells the delegate when the user taps a map view with two fingers.
Tells the delegate when the user taps the layer for an annotation.
- (void)tapOnAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)mapThe annotation that was tapped.
The map view.
Tells the delegate when the user taps the layer for an annotation.
Tells the delegate that the user tapped one of the annotation layer’s accessory buttons.
- (void)tapOnCalloutAccessoryControl:(UIControl *)control forAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)mapThe control that was tapped.
The annotation whose callout control was tapped.
The map view containing the specified annotation.
Tells the delegate that the user tapped one of the annotation layer’s accessory buttons.
Accessory views contain custom content and are positioned on either side of the annotation title text. If a view you specify is a descendant of the UIControl class, the map view calls this method as a convenience whenever the user taps your view. You can use this method to respond to taps and perform any actions associated with that control. For example, if your control displayed additional information about the annotation, you could use this method to present a modal panel with that information.
If your custom accessory views are not descendants of the UIControl class, the map view does not call this method.
Tells the delegate when the user taps the label for an annotation.
- (void)tapOnLabelForAnnotation:(RMAnnotation *)annotation onMap:(RMMapView *)mapThe annotation whose label was was tapped.
The map view.
Tells the delegate when the user taps the label for an annotation.
| Conforms to | NSObject |
| Declared in | RMTileCache.h |
– cachedImage:withCacheKey:
Returns an image from the cache if it exists.
required method– addImage:forTile:withCacheKey:
Adds a tile image to specified cache.
– removeAllCachedImages
Removes all tile images from a cache.
Adds a tile image to specified cache.
- (void)addImage:(UIImage *)image forTile:(RMTile)tile withCacheKey:(NSString *)cacheKeyA tile image to be cached.
The RMTile describing the map location of the image.
The key representing a certain cache.
Adds a tile image to specified cache.
Returns an image from the cache if it exists.
- (UIImage *)cachedImage:(RMTile)tile withCacheKey:(NSString *)cacheKeyA desired RMTile.
The key representing a certain cache.
An image of the tile that can be used to draw a portion of the map.
Returns an image from the cache if it exists.
| Conforms to | NSObject |
| Declared in | RMTileCache.h |
The RMTileCacheBackgroundDelegate protocol is for receiving notifications about background tile cache download operations.
– tileCache:didBeginBackgroundCacheWithCount:forTileSource:
Sent when the background caching operation begins.
– tileCache:didBackgroundCacheTile:withIndex:ofTotalTileCount:
Sent upon caching of each tile in a background cache operation.
– tileCacheDidFinishBackgroundCache:
Sent when all tiles have completed downloading and caching.
– tileCacheDidCancelBackgroundCache:
Sent when the cache download operation has completed cancellation and the cache object is safe to dispose of.
Sent upon caching of each tile in a background cache operation.
- (void)tileCache:(RMTileCache *)tileCache didBackgroundCacheTile:(RMTile)tile withIndex:(int)tileIndex ofTotalTileCount:(int)totalTileCountThe tile cache.
A structure representing the tile in question.
The index of the tile in question, beginning with 1 and ending with totalTileCount.
The total number of of tiles required for coverage of the desired geographic area.
Sent upon caching of each tile in a background cache operation.
Sent when the background caching operation begins.
- (void)tileCache:(RMTileCache *)tileCache didBeginBackgroundCacheWithCount:(int)tileCount forTileSource:(id<RMTileSource>)tileSourceThe tile cache.
The total number of tiles required for coverage of the desired geographic area.
The tile source providing the tiles.
Sent when the background caching operation begins.
Sent when the cache download operation has completed cancellation and the cache object is safe to dispose of.
- (void)tileCacheDidCancelBackgroundCache:(RMTileCache *)tileCacheThe tile cache.
Sent when the cache download operation has completed cancellation and the cache object is safe to dispose of.
| Conforms to | NSObject |
| Declared in | RMTileSource.h |
The RMTileSource protocol describes the general interface for map tile sources. Whether retrieved from network sources or provided locally, tile sources must provide some specific minimum properties.
minZoom
The minimum zoom level supported by the tile source.
property required method maxZoom
The maximum zoom level supported by the tile source.
property required method cacheable
A Boolean value indicating whether the tiles from this source should be cached.
property required method opaque
A Boolean value indicating whether the tiles from this source are opaque. Setting this correctly is important when using RMCompositeSource so that alpha transparency can be preserved when compositing tile images.
property required method latitudeLongitudeBoundingBox
The bounding box that the tile source provides coverage for.
property required method uniqueTilecacheKey
A unique string representing the tile source in the cache in order to distinguish it from other tile sources.
property required method tileSideLength
The number of pixels along the side of a tile image for this source.
property required method shortName
A short version of the tile source’s name.
property required method longDescription
An extended version of the tile source’s description.
property required method shortAttribution
A short version of the tile source’s attribution string.
property required method longAttribution
An extended version of the tile source’s attribution string.
property required method– imageForTile:inCache:
Provide an image for a given tile location using a given cache.
required method– tileSourceHasTile:
Check if the tile source can provide the requested tile.
required methodA Boolean value indicating whether the tiles from this source should be cached.
@property (nonatomic, assign, getter=isCacheable) BOOL cacheableA Boolean value indicating whether the tiles from this source should be cached.
The bounding box that the tile source provides coverage for.
@property (nonatomic, readonly) RMSphericalTrapezium latitudeLongitudeBoundingBoxThe bounding box that the tile source provides coverage for.
An extended version of the tile source’s attribution string.
@property (nonatomic, readonly) NSString *longAttributionAn extended version of the tile source’s attribution string.
An extended version of the tile source’s description.
@property (nonatomic, readonly) NSString *longDescriptionAn extended version of the tile source’s description.
The maximum zoom level supported by the tile source.
@property (nonatomic, assign) float maxZoomThe maximum zoom level supported by the tile source.
The minimum zoom level supported by the tile source.
@property (nonatomic, assign) float minZoomThe minimum zoom level supported by the tile source.
A Boolean value indicating whether the tiles from this source are opaque. Setting this correctly is important when using RMCompositeSource so that alpha transparency can be preserved when compositing tile images.
@property (nonatomic, assign, getter=isOpaque) BOOL opaqueA Boolean value indicating whether the tiles from this source are opaque. Setting this correctly is important when using RMCompositeSource so that alpha transparency can be preserved when compositing tile images.
A short version of the tile source’s attribution string.
@property (nonatomic, readonly) NSString *shortAttributionA short version of the tile source’s attribution string.
A short version of the tile source’s name.
@property (nonatomic, readonly) NSString *shortNameA short version of the tile source’s name.
The number of pixels along the side of a tile image for this source.
@property (nonatomic, readonly) NSUInteger tileSideLengthThe number of pixels along the side of a tile image for this source.
A unique string representing the tile source in the cache in order to distinguish it from other tile sources.
@property (nonatomic, readonly) NSString *uniqueTilecacheKeyA unique string representing the tile source in the cache in order to distinguish it from other tile sources.
Provide an image for a given tile location using a given cache.
- (UIImage *)imageForTile:(RMTile)tile inCache:(RMTileCache *)tileCacheThe map tile in question.
A tile cache to check first when providing the image.
An image to display.
Provide an image for a given tile location using a given cache.
Check if the tile source can provide the requested tile.
- (BOOL)tileSourceHasTile:(RMTile)tileThe map tile in question.
A Boolean value indicating whether the tile source can provide the requested tile.
Check if the tile source can provide the requested tile.