Skip to content

Location Field Google Maps

Barry Ceelen edited this page Sep 21, 2017 · 6 revisions

Google Map location field

Note When using this field you must comply with the terms of the google maps API licence.

gmap

Args

Required Args

  • id (string) (required)
  • name (string) (required) Field display name. Used as field label.
  • type 'gmap' (string) (required)
  • google_api_key (string) (required) Google API key matched to your site. Map will not load without this.

Field Specific Args

  • field_width (string) (optional) Width of the map.
  • field_height (string) (optional) Height of the map.
  • default_lat (string) (optional) Default marker location latitude.
  • default_long (string) (optional) Default marker location longitude.
  • default_zoom (string) (optional) Initial map zoom level.
  • string-marker-title (string) (optional) Marker title, show on hover.
  • string-gmaps-api-no-loaded (string) (optional) Message displayed if Google Maps API could not be loaded.

Optional Generic Args

See Optional Generic Args

Example Usage

array(
	'id'   => 'example-field-gmap',
	'name' => 'Location - using google maps.',
	'type' => 'gmap',
),