Code example for itinerary XML file

Print 

Copy this XML example and edit it to suit your own needs as explained in the notes below.

<?xml version="1.0" encoding="UTF-8" ?>

<item>

<itinerary idstr="ANWB_Bollenstreek" version="1">

  <start>Katwijk Aan Zee</start>

  <finish>Oegstgeest</finish>

  <distance mile="39" km="62" />

  <title xml:lang="en-GB" mimetype="text/plain">Flower Bulbs area route</title>

  <title xml:lang="nl" mimetype="text/plain"> Bollenstreek route</title>

  <description xml:lang="en-GB" mimetype="text/plain">

  In the spring, the tulip bulb fields delight visitors from near and far. But the sea, beaches, dunes, country estates and friendly towns make the Bollenstreek a region well worth a visit in any season.

</description>

  <description xml:lang="nl" mimetype="text/plain">

    In het voorjaar brengen de bollenvelden bezoekers van heinde en verre in verrukking. Maar de zee, de stranden, de duinen, landgoederen en gezellige stadjes maken dat de bollenstreek in alle seizoenen een bezoek meer dan waard is.

</description>

  <image mimetype="image/gif" url="http://plus.tomtom.com /tt_public/spm/media/icon-routes.gif" usage="icon" />

  <image mimetype="image/png" url="http://plus.tomtom.com /tt_public/spm/media/routes/area/NL_Bollenstreek_map.png" usage="preview" variant="map" />

<image mimetype="image/png" url="/tt_public/spm/media/routes/route/NL_Bollenstreek.png" usage="preview" variant="route" />

  <size>2408</size>

  <download>

    <url location="http://plus.tomtom.com/tt_public/anwb/Bollenstreek.cab" content="main" size="2204"/>

  </download>

  <targetdevice models="all" />

  <price free="true" />

  <supplier>

  <name>ANWB</name>

    <image mimetype="image/gif" url="/ http://plus.tomtom.com tt_public/spm/media/suppliers/anwb_sm.gif" usage="icon" />

  </supplier>

</itinerary>

</item>

 

Explanatory Notes

1.All information needs to be contained within the <item> element.
2.itinerary: This element indicates that the content item is an itinerary.
3.itinerary idstr: This attribute must be a unique name for identifying your itinerary - see Naming your itinerary.
4.version: A version is required. Use of this attribute allows TomTom HOME to update your itinerary when an end user selects the “Update my device “ option in HOME. For your first version use “1”. If you create a new version of the same item, keep the name the same, but increase the version number.
5.start: Enter the name of the city where the itinerary starts.
6.finish: Enter the name of the city where the itinerary finishes (this can be the same as the start in the case of a circular route).
7.distance: Enter the length of the itinerary in kilometres and in miles.
8.title: This is the name that TomTom HOME will display for your itinerary. The title may appear several times but only once per language.
9.title xml:lang: This attribute indicates the language for the title. If your itinerary supports multiple languages you can include multiple <title> elements with different language codes, e.g. <title xml:lang="en">Beaches</title><title xml:lang="de">Strände</title>.

TomTom HOME will pick the most appropriate language based on the user's language setting. Note that if your itinerary only supports one language, you don't need to include the xml:lang attribute, TomTom HOME will just use that description. For xml:lang, the format is <languagecode>[-<regioncode>]. <languagecode> is a two-letter ISO language code (ISO 300 66) in lowercase. <regioncode> is a two-letter ISO region code to indicate the language variant used in that region. For example, zh-CN is simplified Chinese and zh-TW is traditional Chinese. Note that in many countries, there is an official, national variant that requires no qualification. A complete list of ISO language codes can be found here. <languagecode> and <regioncode> need to be separated by a hyphen (‘-“); underscores (“_”) are not supported.

10. description: TomTom HOME uses this as a description of your itinerary. You can have descriptions in multiple languages.
11. description mimetype: This attribute describes the formatting type of the description text. Currently only "text/plain" is supported.
12. image: TomTom HOME can display an image for your itinerary.
13. image mimetype: This attribute is the file type of the image. Currently only "image/gif", "image/jpeg" and "image/png" are supported.
14. image url: This is the absolute URL for the location of the image on your server.
15. image usage: This defines they way that TomTom HOME displays the image. Currently this methods are supported:

"icon": TomTom HOME will display an icon in front of the item line in the list view. Icons will be scaled to fit an area of 32 by 32 pixels. It’s recommended to create the image icon at that size.

"preview": TomTom HOME will display a preview image in the "more info" screen of your itinerary. You can use variant="map" to indicate where in the country the itinerary will be or variant="route" to show the shape of the itinerary.

There’s no limit to the size but we recommend you keep it sensible eg. 100 x 100 or 300 x 400.

16. size: This is the size of your itinerary after installation in bytes, not considering disk block size. TomTom HOME uses this to determine if there’s enough free space on the device to install the content item. Note that the server may sometimes report the download size instead.
17. url location: This is the absolute URL for the location on your server of the zip file containing the itinerary file. The item can be downloaded and used (with the provided information), if (and only if) this element is present. The URL must have a proper and meaningful filename component. The filename extension (and mimetype returned by server when downloading) must fit the content, currently .zip is allowed. Only the following characters are allowed in the filename: alphanumeric (a-z, A-Z, 0-9), dash (-), underscore (_). Filename length should be a maximum of 30 characters and the whole URL needs to conform to RFC 2396.
18. content: Currently only "main" is supported.
19. url size: This is the size of your zip file in bytes. TomTom HOME may display this to indicate to the end user how long the download might take. For very small files HOME displays “tiny”.
20. targetdevice models: This indicates on which TomTom devices the content can be installed. For itineraries you should use "all".
21. price free: This indicates whether the content is premium or free. Currently only "true" is supported.
22. supplier: TomTom HOME can display the name and logo of the supplier of the itinerary.
23. supplier name: Here you can enter your name or your company’s name.
24. supplier image: TomTom HOME can display your company logo, you need to define the mime type and absolute URL to the location of the image on your server. If you select usage="icon" the image will be scaled to a 32 x 32 image. Since icons will be scaled to a square aspect ratio it’s a good idea to have the image for such an icon to also be in a square aspect ratio, to prevent distortion.