Publish and Share style
In this guide, you will learn:
- What are Draft and Production styles.
- How to publish a style.
- How to share a style.
Draft and Production style
When you create or import a style, Map Maker creates two versions of it:
Draft version of the style:
- This is a current version of the style. It is what you see in the Editor.
- All the changes you make to the map are applied to the Draft version. These changes are automatically saved in the TomTom cloud. You do not need to worry about accidentally losing your progress.
- You can use the Draft style in your test application or prototyping.
Production version of the style:
- This is an optimized for performance and a cached version of the style. Rendering and viewing the Production style in your application is faster and more efficient.
- Changes from the Draft are applied every time you publish. For example, if you use Production style in your application, changes in the Draft will not impact the application, until you publish the style again.
- In your production application you should only use the Production styles.
When you are using Production style in your application, changes may not be visible immediately after you publish, because of server-side optimizations and client-side caching.
When you are happy with the changes to your Draft style and want to update the Production version, you can publish your style.
Follow these steps to publish a style:
- Open a style.
- Click the Publish button.
- Compare both the Draft and Production versions.
- Click Publish Style. Map Maker will update the Production style with changes from the Draft.
TomTom cloud safely stores your map styles. In Map Maker, you can generate a URL to your style and download it. To access or download your style URL, you must share the style.
Follow these steps to share a style:
Open a style.
Click the Share button.
On the side panel, click the version of the style you want to share, Draft or Production.
Usually, you will share the Production style to use it in the production applications. Sharing the Draft is useful for reviewing and testing.
In the Sharing box, choose an option from the drop-down. The following are available:
- Private, the style can only be used with an API Key from your Developer Portal account.
- Open: view only, the style can be displayed with an API Key from any Developer Portal account. Only you can make changes or delete it. Keep in mind that the person you shared a style with will be able to create their style based on the style you shared.
In the API Key box, select one of the available API Keys from your account. You can omit this step if you:
- set the Sharing option to "Open: view only"
- are using TomTom SDKs, where you can provide the API Key separately
- plan to enter the key manually in the style URL or style file
If your API Key list is empty, make sure that you have enabled the required Product API in your API Key settings. For example, if you are using the "Traffic Flow" map extension in your style, you need to have the Traffic API Product enabled in your API Key. You can edit your API Key settings in your Developer Portal account dashboard. If you are not sure how to add a new API Key, read How do I get a TomTom API Key?.
If you select API Key while sharing the style, the style URL and the style file will contain it. Remember to always protect your API Key. Never share it with others. If you plan to use it on the Web, enable domain whitelisting in the Edit key > Security, in the dashboard on the Developer Portal.
Copy the style URL from the Style URL box or download the style file to your local device by clicking the button with the style name in the Download field.
Notice that when you download a style file:
- assets like icons and glyphes are still fetched online
- style is not connected with TomTom cloud and will not be updated after you publish
Since you have learned about the Publish and Share style, here are recommendations for the next steps: