Getting started

Create an app

  1. Go to Troop Marketplace and click on My Integrations.

  2. Click Create App. A modal window will open.

  3. Select type API import.

  1. Edit the basic information of your app and click Next.

For API imports, the supported app types/subtypes are Geographic Area and Geographic Location. Check the introduction for more information on how to choose type and subtype.

  1. Save the app ID and API key, that you will need to manipulate the app data.

For security reasons, you won't be able to see the API key again, so make sure you save it.

  1. Click Next. You app is ready to be manipulated.

Import data for your app

  1. Read the Model Reference to understand the difference between an App, a Feature and a Feature property.

It's important that you understand the model of the Troop Marketplace before manipulating data. Reading it will take you less than 5 minutes.

  1. Use our Graphql API to import data into your app. See the Graphql schema.

    1. Create/update/delete features with createOneFeature, createManyFeatures, updateOneFeature, deleteOneFeature and deleteManyFeatures.

      1. If your app subtype is Geographic Area: title and at least one of country, region or city are required fields for your features.

      2. If your app subtype is Geographic Location: title, type and coordinates are required fields for your features.

    2. Create/update/delete feature properties with createOneFeatureProperty, createManyFeatureProperties, updateOneFeatureProperty, deleteOneFeatureProperty and deleteManyFeatureProperties.

      1. Add custom feature properties. For example:

        • For an app representing country risk (subtype Geographic Area): feature properties with name risk_level, risk_description...

        • For an app representing meeting spaces (subtype Geographic Location: feature properties with name address, email, phone_number, link...

      2. Optionally, add feature properties to customize the colors: feature properties with name fill_color and line_color. See more details in the Model Reference.

      3. Optionally, add feature properties to customize the shapes, in case your app subtype is Geographic Location: feature properties with name circle_radius and circle_border_width. See more details in the Model Reference.

      4. Optionally, add feature properties to customize the legend: feature properties with name legend_title, legend_description and photos. See more details in the Model Reference.

    3. Update the map with updateTilesetSource.

After creating/updating features and feature properties, you will need to execute a specific mutation to update the map: updateTilesetSource. Otherwise, the data will be imported, but the map will not update.

  1. Check that your map is up to date.

Once the sync is successful, it will take up to 15 minutes for the data to reflect on your map, due to caching.

Examples

Check the examples at Examples.

Last updated