MRMap Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | MRMap.h |
Other Methods
key
Uniquely identifies this map. The parent of this key should identify app this map belongs to.
@property (nonatomic, copy) MREditorKey *keyDeclared In
MRMap.h
groupKey
A key identifying the group this map belongs to, or nil if this map doesn’t belong to a group.
@property (nullable, nonatomic, copy) MREditorKey *groupKeyDeclared In
MRMap.h
overviewKey
A key identifying the overview map for the app this map belongs to, or nil if there is no overview map.
@property (nullable, nonatomic, copy) MREditorKey *overviewKeyDeclared In
MRMap.h
imageURL
The map’s image URL, or nil if this is an SVG map.
@property (nullable, nonatomic, copy) NSURL *imageURLDeclared In
MRMap.h
svgURL
The map’s image URL, or nil if this is a raster map.
@property (nullable, nonatomic, copy) NSURL *svgURLDeclared In
MRMap.h
levelLabel
The map’s level label.
@property (nonatomic, copy) NSString *levelLabelDeclared In
MRMap.h
groupName
The map’s group name, or nil if this map doesn’t belong to a group.
@property (nullable, nonatomic, copy) NSString *groupNameDeclared In
MRMap.h
gpsTransform
A transform for converting between this map’s coordinate space and GPS coordinates.
@property (nonatomic, readonly) CGAffineTransform gpsTransformDeclared In
MRMap.h
gpsMultiplier
Multiplier for latitude vs longitude multiplier to adjust aspect ratio (affected by distance from equator)
@property (nonatomic, readonly) double gpsMultiplierDeclared In
MRMap.h
size
The map’s actual size in pixels or SVG units.
@property (nonatomic, assign) CGSize sizeDeclared In
MRMap.h
meterSize
The map’s size in meters.
@property (nonatomic, assign) CGSize meterSizeDeclared In
MRMap.h
isOutdoor
Indicates whether or not this is an outdoor map.
@property (nonatomic, assign) BOOL isOutdoorDeclared In
MRMap.h
isInvalid
If YES, this map is considered unusable due to missing or invalid data.
@property (nonatomic, readonly) BOOL isInvalidDeclared In
MRMap.h
isPublished
If YES, this map has been marked published in the Editor
@property (nonatomic, readonly) BOOL isPublishedDeclared In
MRMap.h
unitsPerMeter
Number of map units per meter.
@property (nonatomic, assign) CGFloat unitsPerMeterDeclared In
MRMap.h
northOffset
Angle in degrees between the map’s north and true north.
@property (nonatomic, assign) CGFloat northOffsetDeclared In
MRMap.h
Loading
+ getMapsForApp:pageURL:success:failure:
Creates and runs an operation to fetch maps for the given app.
+ (NSOperation *)getMapsForApp:(MREditorKey *)appKey pageURL:(nullable NSURL *)pageURL success:(void ( ^ _Nullable ) ( NSArray<MRMap*> *maps , NSURL *_Nullable next ))success failure:(void ( ^ _Nullable ) ( NSError *error ))failureParameters
appKey |
A key identifying the Meridian app to get maps for. |
|---|---|
pageURL |
A URL specifying a page of results to load. |
success |
A block to run if the operation succeeds. |
failure |
A block to run if the operation fails. |
Discussion
If the operation succeeds, the success block will be run with the resulting array of MRMap objects. If there are too many maps
to return in a single response, you can use the next URL to load more maps by passing it as the pageURL in subsequent requests.
If the operation fails, the failure block will be run with an NSError instance describing what went wrong.
Declared In
MRMap.h
+ getMap:success:failure:
Creates and runs an operation to fetch the map identified by the given key.
+ (NSOperation *)getMap:(MREditorKey *)mapKey success:(void ( ^ _Nullable ) ( MRMap *map ))success failure:(void ( ^ _Nullable ) ( NSError *error ))failureParameters
mapKey |
A key identifying the map to load. |
|---|---|
success |
A block to run if the operation succeeds. |
failure |
A block to run if the operation fails. |
Discussion
If the operation succeeds, the success block will be run with the resulting MRMap object. If it fails, the failure
block will be run with an NSError instance describing what went wrong.
Declared In
MRMap.h
+ getMapGroup:success:failure:
Creates and runs an operation to fetch all maps belonging to the given group.
+ (NSOperation *)getMapGroup:(MREditorKey *)mapGroupKey success:(void ( ^ _Nullable ) ( NSArray<MRMap*> *maps ))success failure:(void ( ^ _Nullable ) ( NSError *error ))failureParameters
mapGroupKey |
A key identifying the map group to load. |
|---|---|
success |
A block to run if the operation succeeds. |
failure |
A block to run if the operation fails. |
Discussion
If the operation succeeds, the success block will be run with the resulting array of MRMap objects. If it fails, the failure
block will be run with an NSError instance describing what went wrong.
Declared In
MRMap.h
– mapPtWithGPS:
Converts gps coordinate to map coordinates.
- (CGPoint)mapPtWithGPS:(CLLocationCoordinate2D)gpsCoordParameters
gpsCoord |
The GPS coordinate to be converted |
|---|
Return Value
The map point as a CGPoint
Declared In
MRMap.h
– gpsWithMapPt:
Converts map coordinates to gps coordinate.
- (CLLocationCoordinate2D)gpsWithMapPt:(CGPoint)mapPtParameters
mapPt |
The map point to be converted |
|---|
Return Value
The GPS coordinate as a CLLocationCoordinate2D
Declared In
MRMap.h