Using Meridian Editor Keys (iOS)

This article describes how to use Meridian Editor keys for apps, maps, and placemarks in the iOS SDK.

Using Meridian Editor Keys

Use instances of MREditorKey to reference specific apps, maps, and placemarks that you've created in the Meridian Editor. Many of the Meridian SDK's classes require valid keys during initialization.

    // Creating a key representing your app in the Meridian Editor:
    MREditorKey *appKey = [MREditorKey keyWithIdentifier:@"5085468668573440"];

    // Creating a key representing a map in the MeridianEditor:
    MREditorKey *mapKey = [MREditorKey keyForMap:@"5708115733494264" app:@"5085468668573440"];

    // An alternate way to create a map key:
    MREditorKey *mapKey = [MREditorKey keyForMap:@"5708115733494264" app:appKey.identifier];

    // Creating a key representing a placemark:
    MREditorKey *placemarkKey = [MREditorKey keyForPlacemark:@"375634485771" map:mapKey];

When you create an instance of MREditorKey to represent a specific map, your app ID becomes the parent of the mapKey. Similarly, when you create a placemark key, the map ID becomes the parent of the placemarkKey.

    MREditorKey *placemarkKey = [MREditorKey keyForPlacemark:@"375634485771" map:someMapKey];

    MREditorKey *mapKey = placemarkKey.parent;
    NSLog(@"My map ID: %@", mapKey.identifier);

    MREditorKey *appKey = mapKey.parent;
    NSLog(@"My app ID: %@", appKey.identifier);