class_="gmap"

Using <widget class_="gmap"> creates a graphical map that can be used to display geographical information. This widget is powered by the Google Maps service.

Syntax

<dynamic pzpackage="{pkg('lat' 'lng' 'zoom' 'nelat' 'nelng' 'swlat' 'swlng';
     [LATITUDE_VAL] [LONGITUDE_VAL] 
     [ZOOM_VAL] '' '' '' '')}" 
     height_="[HEIGHT]" width_="[WIDTH]">
  <widget class_="gmap" pzvalue_="@pzpackage">
    <layer name_="[LAYER_TYPE]" lat_="" lng_=""/>
  </widget>
</dynamic>

Attributes

The attributes in this list are specific to widgets with class_="gmap".

width_
Specifies the width of the map widget in the browser. Accepts an integer value corresponding to the width in pixels.
height_
Specifies the height of the map widget in the browser. Accepts an integer value corresponding to the height in pixels.
label_
Specifies an optional label for the widget. Accepts a text value.
value_
Accepts a dynamic variable in the form: value_="@variable". The variable provided to value_= will hold the unique key of a marker on a map. This attribute is only available for <layer name_="marker"/>, but must be specified in the gmap widget containing the <layer> element.
pzvalue_
pzvalue_ accepts a package value with specific keys. As a user interacts with the map widget (by dragging, scrolling, or zooming), the values contained in the pzvalue_ package will be automatically updated to reflect the new positioning of the map. This includes the latitudinal and longitudinal coordinates of the center point and NE/SW corners along with the zoom level of the map. These values can be used by other variables and widgets contained in the <dynamic>. The following is a list of keys and what their values represent.
lat
Specifies the latitude of the center of the map.
lng
Specifies the longitude of the center of the map.
zoom
Specifies level of zoom of the map when it is rendered. Valid values are integers between 2 and 21.
nelat
Specifies the northeast latitude at the time the map is rendered.
nelng
Specifies the northeast longitude at the time the map is rendered.
swlat
Specifies the southwest latitude at the time the map is rendered.
swlng
Specifies the northeast longitude at the time the map is rendered.
theme_
Specifies a color theme for the gmap widget.

(Available as of prod-9)

Valid values for theme_ are as follows:

  • alpinecolors
  • aquamarine
  • armycolors
  • atlanticcolors
  • auroracolors
  • avocadocolors
  • beachcolors
  • bluegreenyellow
  • brasstones
  • brightbands
  • browncyantones
  • candycolors
  • cherrytones
  • cmykcolors
  • coffeetones
  • darkbands
  • darkrainbow
  • darkterrain
  • deepseacolors
  • fallcolors
  • fruitpunchcolors
  • fuchsiatones
  • graytones
  • grayyellowtones
  • greenbrownterrain
  • greenpinktones
  • islandcolors
  • lakecolors
  • lighttemperaturemap
  • lightterrain
  • mintcolors
  • neoncolors
  • pastel
  • pearlcolors
  • pigeontones
  • plumcolors
  • rainbow
  • redbluetones
  • redgreensplit
  • rosecolors
  • rusttones
  • sandyterrain
  • siennatones
  • solarcolors
  • southwestcolors
  • starrynightcolors
  • sunsetcolors
  • temperaturemap
  • thermometercolors
  • valentinetones
  • watermeloncolors

Example for class_="gmap"

This example creates a very basic map widget that renders at a size of 1100 pixels by 700 pixels.
Note: Only the first three values of the pzvalue_ package variable (in this case it's called pzpackage, but can be called anything) need to be specified. The final four elements of the package variable can be initialized as null strings (e.g., '').
<dynamic pzpackage="{pkg('lat' 'lng' 'zoom' 'nelat' 'nelng' 'swlat' 'swlng';
  40.753622 -73.972841 8 '' '' '' '')}">
  <widget class_="gmap" pzvalue_="@pzpackage" height_="700" width_="1100"/>
</dynamic>