Using Meridian Editor Keys (Android)

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

Using Editor Keys

Use instances of EditorKey to specify apps, maps, and placemarks that have been created in the Meridian Editor. Most of the Meridian SDK classes require a valid key during initialization.

    // Create a key representing your app in the Meridian Editor.
    EditorKey appKey = new EditorKey("5809862863224832");

    // Create a key representing a map in the Meridian Editor.
    EditorKey mapKey = EditorKey.forMap("5668600916475904", appKey.getId());

    // Create a key representing a placemark.
    EditorKey placemarkKey = EditorKey.forPlacemark("5668600916475904_5709068098338816", mapKey);

When you create an EditorKey to represent a map, the app identifier you provide becomes the parent of the map key. Likewise, when you create a placemarkKey, the map you specify becomes the parent of that placemark.

    EditorKey placemarkKey = EditorKey.forPlacemark("375634485771", someMapKey);

    EditorKey mapKey = placemarkKey.getParent();
    Log.i(TAG, "My map ID: " + mapKey.getId());

    EditorKey appKey = mapKey.getParent();
    Log.i(TAG, "My app ID: " + appKey.getId());