Replace and Revert style

In this guide, you will learn:

  • How to replace a style.
  • How to revert a style to the last published version.

This guide assumes you have read the Publish and Share style guide and you are familiar with the Draft and Production styles.

Replace style

You can replace the current version of your Draft style with a different style without changing the style ID. This means that the URL to your style will remain the same. Replacing a style can be useful when your application is using a style URL, and you want to switch to a completely different style, but updating the style URL in the application is not an option.

The new style can be uploaded using either a file or a style URL (only styles served from TomTom APIs are supported).

Follow these steps to replace a style from the Style editor:

  1. Open a style.

  2. Click Show more option iconShow more next to the style name and choose the Replace style option.

    Style options in the style editor

    The Replace style dialog will open.

    Replace style modal
  3. Upload a new style. You can use a style file or a style URL. Paste the style URL in the input field and click Load url or click Select file and choose the correct style file (you can also drag and drop a style file).

  4. Compare the current style with the new style after uploading is done.

  5. Click Replace style. The Draft style will be replaced with the new style.

You can also replace a style from the Style list. Find your style entry, click Show more option iconShow more and choose the Replace style option. The remaining steps are the same as in the Style editor.

Style options in the style list

Revert style to last published

If you are not happy with the changes made to your Draft style, you can always revert to the last published version. Reverting a style helps save time and effort in case you want to restart your customization from the Production style version.

Follow these steps to revert a style to the last published version from the Style editor:

  1. Open a style.

  2. Click Show more option iconShow more next to the style name and choose the Revert to last published option.

    Style options in the style editor

    The Revert style dialog will open.

    Revert style modal
  3. Compare the current style with the last published version before reverting.

  4. Click Revert style. The Draft style will be reverted to the last published version of your style.

In the Style editor, you can undo the style replace or revert action by clicking the Show more option iconUndo in the top bar.

You can also revert a style from the Style list. Find your style entry, click Show more option iconShow more and choose the Revert to the last published option. The remaining steps are the same as in the Style editor.

Style options in the style list

Since you have learned how to replace and revert a style, here are recommendations for the next steps: