2 minutes read

Map

Parameters:

  • address – put address, for example: “New York” or “40.7058316,-74.2581926” (format needs to be the same as used and rocognized on https://maps.google.com/.
  • info – text for marker, for example: “Info text goes here”.
  • show_info – show info, allowed values: “yes” or “no”.
  • marker – custom marker URL, for example: “http://example.com/images/marker.png”.
  • marker_animation – set marker animation, allowed values: “no”, “bounce”, “drop”.
  • lat – set latitude of map view, for example: “40.7053094”. (if empty then marker will be centered)
  • lng – set longitude of map view, for example: “-74.2588843” (if empty then marker will be centered)
  • type – set type of map, allowed values: “roadmap”, “satellite”, “hybrid”, “terrain”.
  • width – width in px, for example: “100%”.
  • height – height in px, for example: “300px”.
  • zoom – set the zoom (from 0 to 18), for example: “12”.
  • scrollwheel – show scrollwheel, allowed values: “yes” or “no”.
  • scale_control – show scale control, allowed values: “yes” or “no”.
  • zoom_control – show zoom control, allowed values: “yes” or “no”.
  • map_type_control – show map control, allowed values: “yes” or “no”.
  • street_view_control – show street view control, allowed values: “yes” or “no””.
  • draggable – make map draggable, allowed values: “yes” or “no”.
  • fullwidth – make map fullwidth, allowed values: “yes” or “no”.
  • hue – set the color of hue, for example: “#8ac0cd”.
  • class – add a CSS class.
  • id – add an unique id.
  • style – add an inline style.

Exemplary usage:

[map address="New York" info="Info text goes here" show_info="yes" marker="" marker_animation="no" lat="" lng="" type="terrain" width="100%" height="300px" zoom="12" scrollwheel="yes" scale_control="no" zoom_control="no" map_type_control="no" street_view_control="no" draggable="no" hue="" fullwidth="" style="" class=""]

See also demo of map shortcode. In full download package (Dummy data/shortcodes-pages/map.html) you can find the file with shortcodes we used to create demo page.

Did you know...

You can use map element in drag and drop website builder (Visual Composer) and customize this element easily without coding skills. Parameters and design options are the same as in shortcode.