<thirdparty:googlemap>
AJAX
Data
Forms
Layout
Logic
Navigation
Personalisation
Standard
Templates
Regions
Third Party
ATTRIBUTES
EXAMPLES

<thirdparty:googlemap> </...>

Embed a Google Map in the page, configured with a specific center location and zoom level. Add markers to the map using child <thirdparty:googlemapmarker> elements.

Content

Fixed locations to display on the map at all times.

Attributes

center
string
Center

Requires API Key

The location to initialize the map to. Google Maps recognises country, city, area and street names.
height
string
Height

Height of the map. No unit means pixels will be used, otherwise a percent sign can be included to use percentage values. Default = "100%".
id
string
(Required) Give this control a unique id. Can be accessed in the client DOM (eg, document.getElementById('myid') or in the server DOM using [? $myid ?] or [? $('myid') ?]).
saveState
boolean
SaveState

If true, then the last location of the map will be restored when the user visits the page again.
scrollWheel
bool
Scroll Wheel

Requires API Key

If true, the user won't be able to interact with the map using the scroll wheel on their mouse. Deafult = false.
static
boolean
Static

Force the use of a Static Map. This allows the use of a reduced functionality Map without an API key.
styles
string
Styles

Requires API Key

Set custom map styles.
width
string
Width

Width of the map. No unit means pixels will be used, otherwise a percent sign can be included to use percentage values. Default = "100%".
zoom
int
Zoom

Zoom level to use on the map. Leaving blank will allow the
Map to set zoom automatically. Possible values range from 1 (zoomed out), to 22 (zoomed in).
Default = "" (auto).
apikey
string
API Key

A Google Maps API key is required for the following features: - Map Centering - More than One Map Marker

Get an API Key

Examples

Standard Usage

Maps can be used without an API Key if you have only a single marker.

HTML:

<thirdparty:googlemap> <thirdparty:googlemapmarker address="Brisbane"></thirdparty:googlemapmarker> </thirdparty:googlemap>

Populate markers from a Datasource with a Repeater

You can create multiple markers easily using a Data Repeater. This example assumes $arrMarkerAddresses is an array filled with address data.

HTML:

<thirdparty:googlemap apikey="YOUR_API_KEY"> <data:repeater datasource="$arrMarkerAddresses" as="address"> <thirdparty:googlemapmarker address="[? $address ?]"></thirdparty:googlemapmarker> </data:repeater> </thirdparty:googlemap>