Tutorial 8 : Using Templates
• Feeds can contain a large number of data fields for each place. Only a few fields are displayed by default.
• Go to section 3.2. (Templates) to define the templates used for displaying place data on the map.
• There are two available template formats : HTML (with tokens) or Javascript. HTML (with tokens) is the simplest to implement and is the method covered in this tutorial.
• The templates section contains 4 text boxes for the following templates: Info Window, Info Panel, Sidebar Listing and Tooltip. Initially these text boxes are empty.
• Click the 'Examples' button to set up some initial templates.
• Edit the templates by inputting the HTML to be displayed. Enclose variable names in braces, for example <b>{name}</b> will display the name as bold text.
• Use the HTML to implement styling, images and formatting as required.
• The example below shows some templates created for the hotel cities map.
• This map shows the results of applying the new templates.
• Templates can be used to create custom links to other websites. Each place has two default fields, lat and lng, which can be incoporated into templates.
• The example below shows the template to display a link to a Dual Map.
<• This is the Info Panel after applying the template.
• Go to section 5.7. (Info Panel) to configure other info panel settings.
• If your map is displayed in a large div or full screen you should choose the 'Info Panel Split' option to allow the place information, map and streetview to be shown together.