Documentation > Tags Reference > google_map

google_map

The google_map tag can be used to easily create a Google map on a web page.

<cms:google_map
    name='my_map'
    address='1600 Amphitheatre Parkway, Mountain View, CA'
/>
<cms:google_map
    name='my_map'
    latitude='37.423021'
    longitude='-122.083739'
/>

Please see Core Concepts - Google Maps for a discussion on this tag.

We can have only one Google map on a page.

Parameters

In addition to the parameters listed below, any arbitrary parameter given to this tag will be passed on unchanged to the DIV that holds the generated map.

name

Name of the map. This parameter is mandatory.

id

If skipped, is set to the name.

address

A map can be generated by providing either an address of both longitude and latitude.

longitude

latitude

Coordinates used to create the map.

zoom

Default is 14

message

Text shown in the marker baloon.

width

Width of the map in pixels. Default value is 400.

height

Height of the map in pixels. Default value is 300.

style

Regular CSS styles.

A full example -

<cms:google_map
    name='my_office'
    latitude='37.423021'
    longitude='-122.083739' 
    zoom='14'
    message='We are located here'
    width='640'
    height='480'
    style='margin-bottom:10px;'
/>

Variables

It is a self closing tag and sets no variables of its own.