Skip to main content

SVG Export

Mappedin maps can be exported as SVG using the Mappedin Editor or by using the Mappedin REST APIs. The SVG export can be used to create a map for publication applications. Mappedin also provides a tool to edit the SVG file before it is used in publication applications, called the Print Map Styler.

Downloading an SVG Using the Mappedin REST API

SVG export is a feature of Mappedin Pro and Enterprise Tiers. To export an SVG using the Mappedin REST API, follow the steps below. Refer to the Mappedin REST API documentation for more information.

1. Get an API Key

Follow the steps in the Create a Key & Secret Guide to generate an API key and secret.

2. Exchange API Key and secret for JWT

Using the API key and secreted generated in the previous step, make a POST call to https://app.mappedin.com/api/v1/api-key/token, passing the key and secret within the body of the call in JSON format. Use the API key as the username and the secret as the password.

The body of the call should be formatted as follows:

{
"key": "mik_yeBk0Vf0nNJtpesfu560e07e5",
"secret": "mis_2g9ST8ZcSFb5R9fPnsvYhrX3RyRwPtDGbMGweCYKEq385431022"
}

The API responds with JSON that contains a JSON Web Token (JWT) token that can be used to authenticate to other Mappedin REST API endpoints.

The response will be formatted as follows:

{
"access_token": "YOUR_TOKEN_HERE",
"expires_in": 172800
}

Refer to the Exchange API Key and secret for JWT REST API documentation for more information and examples.

Using the JWT token generated in the previous step, make a GET call to https://app.mappedin.com/api/v1/svg/<YOUR_MAP_ID>/download. Replace <YOUR_MAP_ID> with the ID of the map you wish to export. Use the Authorization header with the value Bearer <YOUR_JWT> where <YOUR_JWT> is the JWT token. The API responds with a ZIP file containing an SVG file for each floor of the map.

Refer to the Get venue SVG REST API documentation for more information and examples.