• just put: [gmap]my address[/gmap] and you're done!
  • no API keys, no setup, no code editing, no bulls**t
  • works in sidebars, posts, pages and custom post types
  • supports fullscreen and custom location icons/pins

Available variables

Use in form: [gmap variable1="value" variable2="value"]address[/gmap]

Variable name Description Default value Acceptable values
address Location you want to show on the map.
You can enter the address via a variable or between the Shortcode used: [gmap][/gmap] tags (this method is recommend).
none Any address in the world that can be understood by Google Geocoding API.
lat Latitude of the location you want to show on the map. If the coordinates are given the address is ignored. none number, ie: 39.1684
lng Longitude of the location you want to show on the map. If the coordinates are given the address is ignored. none number, ie: -104.14
zoom Map zoom level. 17 0 – 20
description Description/bubble text shown when user clicks on the marker. none Any HTML or plain-text. Use “title | text” to automatically format text. String “DIRECTIONS_LINK” will be replaced by a link which is used to get driving directions to specified address.
show_description Show description bubble immediately after map is loaded. If set to false user has to click the marker to view description. false true, false
width Map canvas width. 100% Any acceptable CSS value. Ie: 200px, 300em, 60%.
height Map canvas height. 400px Any acceptable CSS value. Ie: 200px, 300em, 60%.
fullscreen Weather to display or not the full screen button on map. If set to true jQuery is required on map page. false true, false
icon Icon/marker for selected address on the map. none (red pin) Predefined pins: red, blue, yellow, green, gray, black, white, house, shop, chat, flag, star, default (Google maps icon) . Or you can enter the full URL to any image (size cca 35*35px).
type Map type – the usual types you can select when using Google Maps. roadmap roadmap, satellite, hybrid, terrain
Variables you probably won’t need:
disable_cache If you want to temporarily disable the cache, or rebuild it for a specific address set to “true”. Otherwise be sure to set it on false or just don’t define it. false true, false
post_id If you’re using custom field values in a sidebar or want to force another post ID besides the post you’re currently in then specify this variable. current post, page, custom post type ID int; any valid post, page, custom post type ID
debug Prints out various variables used in the process of map defining/creation. false true, false

Using custom fields for variable values

Instead of the usual variable=”value” use variable=”$custom-field-name” where custom-field-name is the actual custom field in the current post/page/custom post type.
The only thing to remember is: place the dollar sign ($) in front of custom field name.

Example: [gmap zoom="$zoom-level"]$my-address[/gmap]

The post ID will be auto-detected, but if needed, enter it manually via “post_id” parameter.

Using multiple custom fields per variable is also supported, ie: [gmap]$my-address $my-town[/gmap]