MRMap Class Reference

Inherits from NSObject
Declared in MRMap.h

Overview

Represents a map created in the Meridian Editor

Other Methods

  key

Uniquely identifies this map. The parent of this key should identify app this map belongs to.

@property (nonatomic, copy) MREditorKey *key

Declared 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 *groupKey

Declared 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 *overviewKey

Declared In

MRMap.h

  imageURL

The map’s image URL, or nil if this is an SVG map.

@property (nullable, nonatomic, copy) NSURL *imageURL

Declared In

MRMap.h

  svgURL

The map’s image URL, or nil if this is a raster map.

@property (nullable, nonatomic, copy) NSURL *svgURL

Declared In

MRMap.h

  level

The map’s level number.

@property (nonatomic, assign) int level

Declared In

MRMap.h

  levelLabel

The map’s level label.

@property (nonatomic, copy) NSString *levelLabel

Declared In

MRMap.h

  name

The map’s name.

@property (nonatomic, copy) NSString *name

Declared 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 *groupName

Declared In

MRMap.h

  gpsTransform

A transform for converting between this map’s coordinate space and GPS coordinates.

@property (nonatomic, readonly) CGAffineTransform gpsTransform

Declared In

MRMap.h

  gpsMultiplier

Multiplier for latitude vs longitude multiplier to adjust aspect ratio (affected by distance from equator)

@property (nonatomic, readonly) double gpsMultiplier

Declared In

MRMap.h

  size

The map’s actual size in pixels or SVG units.

@property (nonatomic, assign) CGSize size

Declared In

MRMap.h

  meterSize

The map’s size in meters.

@property (nonatomic, assign) CGSize meterSize

Declared In

MRMap.h

  isOutdoor

Indicates whether or not this is an outdoor map.

@property (nonatomic, assign) BOOL isOutdoor

Declared In

MRMap.h

  isInvalid

If YES, this map is considered unusable due to missing or invalid data.

@property (nonatomic, readonly) BOOL isInvalid

Declared In

MRMap.h

  isPublished

If YES, this map has been marked published in the Editor

@property (nonatomic, readonly) BOOL isPublished

Declared In

MRMap.h

  unitsPerMeter

Number of map units per meter.

@property (nonatomic, assign) CGFloat unitsPerMeter

Declared In

MRMap.h

  northOffset

Angle in degrees between the map’s north and true north.

@property (nonatomic, assign) CGFloat northOffset

Declared 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 ))failure

Parameters

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 ))failure

Parameters

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 ))failure

Parameters

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)gpsCoord

Parameters

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)mapPt

Parameters

mapPt

The map point to be converted

Return Value

The GPS coordinate as a CLLocationCoordinate2D

Declared In

MRMap.h