Title: Simple Shortcode for Google Maps
Author: fullworks
Published: <strong>1 octombrie 2012</strong>
Last modified: 25 martie 2025

---

Caută module

![](https://ps.w.org/simple-google-maps-short-code/assets/banner-772x250.png?rev
=1868523)

![](https://ps.w.org/simple-google-maps-short-code/assets/icon-256x256.png?rev=1868328)

# Simple Shortcode for Google Maps

 De [fullworks](https://profiles.wordpress.org/fullworks/)

[Descarcă](https://downloads.wordpress.org/plugin/simple-google-maps-short-code.1.8.2.zip)

[Previzualizează live](https://ro.wordpress.org/plugins/simple-google-maps-short-code/?preview=1)

 * [Detalii](https://ro.wordpress.org/plugins/simple-google-maps-short-code/#description)
 * [Recenzii](https://ro.wordpress.org/plugins/simple-google-maps-short-code/#reviews)
 *  [Instalare](https://ro.wordpress.org/plugins/simple-google-maps-short-code/#installation)
 * [Dezvoltare](https://ro.wordpress.org/plugins/simple-google-maps-short-code/#developers)

 [Suport](https://wordpress.org/support/plugin/simple-google-maps-short-code/)

## Descriere

Simple to use, yet powerful, Google Maps plugin! Reviews say this is „Best Google
Map Shortcode plugin”.

Put a Google map on your WordPress posts and pages simply and easily with a shortcode.
Straight forward and easy to use! Ideal for contact page maps, maps showing delivery
areas and many other uses!

This plugin will enable a simple shortcode that you can use for embedding Google
Maps in any WordPress post or page. The shortcode uses the [WordPress HTTPS API](https://developer.wordpress.org/plugins/http-api/)
and the [Transients API](https://developer.wordpress.org/apis/handbook/transients/)
for delivering cached Google maps with little to no impact on your site’s performance.

Maps are displayed with the [pw_map] shortcode:

    ```
    [pw_map address="New York City" key="YOUR Map JS API KEY" geokey="YOUR Geo API KEY"]
    ```

Google now requires that new accounts use an API key. You can register a free API
key [here](https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key).

You can have multiple map pins, simply add multiple addresses separated by semi-
colon `;`

    ```
    [pw_map address="Statue of Liberty National Monument NYC;Empire State Building, New York, NY, USA" key="YOUR Map JS API KEY" geokey="YOUR Geo API KEY"]
    ```

### All Shortcode Options

Mandatory

  address – Description: The address you want pinned – Allowed values: any address
  that Google can find, multi addresses separated by ;
  key – Description: Your Google Maps API Key – Allowed values: valid key
  geokey – Description: Your Google Geocoding API Key – Allowed values: valid key
  Why two key? You should restrict your API keys to avoid abuse. You need to use
  the geokey to allow the geocoding to work, enabled on the GeoCoding API, restricted
  to your server IP, and key
   enabled on the Maps JavaScript API restricted to your
  website domain(s).
  Optional ( with default values)
  width – Description: sets the map width – Default: 100% – Allowed values: size
  in % or px
  height – Description: sets the map height – Default: 400px – Allowed values: size
  in % or px
  enablescrollwheel – Description: zooming on the map using a mouse scroll wheel–
  Default: true – Allowed values: true or false
  zoom – Description: The initial Map zoom level – Default: 15 – Allowed values:
  Valid zoom values are numbers from zero up to the supported maximum zoom level
  disablecontrols – Description: Enables/disables all default UI buttons. May be
  overridden individually. Does not disable the keyboard controls – Default: false–
  Allowed values: true or false
  force – Description: disable caching of geocoding, only use this on test – Default:
  false – Allowed values: true or false
  zoomcontrol – Description: display the Zoom +/- buttons – Default: true – Allowed
  values: true or false
  nozoom – Description: fixes the zoom level by seeting min and max to the starting
  zoom – Default: false – Allowed values: true or false
  gesturehandling – Description: This setting controls how the amp handles gestures
  on the map. – Default: auto – Allowed values:
   * „cooperative”: Scroll events and one-finger touch gestures scroll the page,
     and do not zoom or pan the map. Two-finger touch gestures pan and zoom the 
     map. Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode
     the map cooperates with the page.
   * „greedy”: All touch gestures and scroll events pan or zoom the map.
   * „none”: The map cannot be panned or zoomed by user gestures.
   * „auto”: Gesture handling is either cooperative or greedy, depending on whether
     the page is scrollable or in an iframe.
  maptypeid – Description: Determines the initial map display type – Default: roadmap–
  Allowed values:
   * „roadmap”: This map type displays a normal street map.
   * „satellite”: This map type displays satellite images.
   * „hybrid”: This map type displays a transparent layer of major streets on satellite
     images.
   * „terrain”: This map type displays maps with physical features such as terrain
     and vegetation.
  
  ## Blocuri
  
  Acest modul oferă 1 bloc.
   *   Simple Google Maps Google Maps Block
  
  ## Instalare
  
   1. Activează modulul.
   2. Obtain an API key [here](https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key).
   3. Added [pw_map address=”your address here” key=”YOUR API KEY”] to any post or 
      page.
  
  ## Întrebări frecvente
  
  
  ### Can I change the width or height of the map?
  
  Yes, simply supply a width and height parameter:
      ```
      [pw_map address="New York City" width="400px" height="200px" key="YOUR API KEY"]
      ```
  
  You can also use percentages for heights:
      ```
      [pw_map address="New York City" width="50%" height="200px" key="YOUR API KEY"]
      ```
  
  
  ### Can I disable the scroll wheel?
  
  Yes, simple add `enablescrollwheel="false"` to the maps shortcode.
      ```
      [pw_map address="New York City" enablescrollwheel="false" key="YOUR API KEY"]
      ```
  
  
  ### Can I disable the map controls?
  
  Yes, simple add `disablecontrols="true"` to the shortcode.
      ```
      [pw_map address="New York City" disablecontrols="true" key="YOUR API KEY"]
      ```
  
  
  ### How are the maps cached?
  
  Maps are cached using the WordPress [Transients API](https://developer.wordpress.org/apis/handbook/transients/),
  which allows for very efficient and WordPress standard database-based caching.
  Each time you display a map, the address specified is used to generate a unique
  md5 hash, which is used for the cache identifier. This means that if you change
  the address used for your map, the cache will be refreshed.
  For testing ONLY if you want to not use the cache then specify force=true
  e.g.
      ```
      [pw_map address="New York City" force="true" key="YOUR API KEY"]
      ```
  
  
  ### How often do caches refresh?
  
  The maps are cached for 3 months. Caches are automatically cleared (for individual
  maps) when you change the address in the shortcode.
  
  ### Can I specify multiple pins?
  
  Yes simply separate addresses with a semi-colon ; the map will center on the first
  pin
      ```
      [pw_map address="New York City;New Jersey" zoom="8" key="YOUR API KEY"]
      ```
  
  
  ### How do I change the initial zoom?
  
  Initial zoom can be controlled with the shortcode option zoom= the default is 
  zoom=15 use for instance zoom=10 to zoom out
      ```
      [pw_map address="New York City" zoom="8" key="YOUR API KEY" "geokey"="YOUR GEO KEY"]
      ```
  
  
  ### Why do I get REQUEST_DENIED error?
  
  This is likely to be an issue with the authorization you granted to your API key
  see [Google API REQUEST_DENIED troubleshooting](https://developers.google.com/maps/documentation/places/web-service/faq#why_do_i_keep_receiving_status_request_denied)
  It is recommended that you set an Application Restriction to restrict your API
  key from others using it.
  However restricting the referrer HTTP will cause this error ‘API keys with referer
  restrictions cannot be used with this API’, this is because the geoencoding is
  performed server side and cached server side, so there is no browser referrer.
  
  If you get this message change your restriction to IP addresses (web servers, 
  cron jobs, etc.) using the IP address of your website.
  If you restrict your API key to specific APIs make sure you enable at least
   *
  Maps JavaScript API * Geocoding API
  
  ### Are there any filters for developers?
  
  For developer documentation on filters visit here [https://fullworksplugins.com/docs/developers-simple-shortcode-for-google-maps/](https://fullworksplugins.com/docs/developers-simple-shortcode-for-google-maps/)
  
  ### How can I report security bugs?
  
  You can report security bugs through the Patchstack Vulnerability Disclosure Program.
  The Patchstack team help validate, triage and handle any security vulnerabilities.
  [Report a security vulnerability.](https://patchstack.com/database/vdp/simple-google-maps-short-code)
  
  ## Recenzii
  
  ![](https://secure.gravatar.com/avatar/eae9b03fdf1750ad9ecddf610003712fb406bce09006a0c4596071960057ea0e?
  s=60&d=retro&r=g)
  
  ### 󠀁[Simple and effective](https://wordpress.org/support/topic/simple-and-effective-1639/)󠁿
  
   [Ulrich](https://profiles.wordpress.org/grapplerulrich/) 16 iunie 2025
  Would be cool if there was a custom block but works with the shortcode also.
  ![](https://secure.gravatar.com/avatar/26920134ea6adb51194caede5cc701e0ee8da44a7bdb6ceab985043ed30b9aa3?
  s=60&d=retro&r=g)
  
  ### 󠀁[Exactly what I was looking for](https://wordpress.org/support/topic/exactly-what-i-was-looking-for-602/)󠁿
  
   [brott](https://profiles.wordpress.org/brott/) 16 iunie 2024
  Needed something simple and easy to use on a webpage. This is it. Glad I found
  it.
  ![](https://secure.gravatar.com/avatar/f7a090b723c544f4060681c2d67b9ce90fb478949125613f0d50c6804b8c832d?
  s=60&d=retro&r=g)
  
  ### 󠀁[Great. Simple. Free.](https://wordpress.org/support/topic/great-simple-free-2/)󠁿
  
   [greggalex](https://profiles.wordpress.org/greggalex/) 17 mai 2024
  The title says it all – what more could you ask?!
  ![](https://secure.gravatar.com/avatar/6d5976a8b3f650fe772bacf73a5a0b74f19360d328dab321a46b4000b0dc8ddb?
  s=60&d=retro&r=g)
  
  ### 󠀁[Well Done](https://wordpress.org/support/topic/well-done-763/)󠁿
  
   [jimbo26tp0](https://profiles.wordpress.org/jimbo26tp0/) 13 aprilie 2024
  Great addin
  ![](https://secure.gravatar.com/avatar/6f726fea7d5f58e75e27b759f0500c37f8c5a74fdd6774fb554f5625999b6a20?
  s=60&d=retro&r=g)
  
  ### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-38268/)󠁿
  
   [itinfoservices](https://profiles.wordpress.org/itinfoservices/) 9 ianuarie 2024
  great little tool
  ![](https://secure.gravatar.com/avatar/c62020010cd704cf86601a040c141cbeea6fb5842aa01c3ae512bac19ea0120d?
  s=60&d=retro&r=g)
  
  ### 󠀁[Works GREAT](https://wordpress.org/support/topic/works-great-8774/)󠁿
  
   [lizzielou](https://profiles.wordpress.org/lizzielou/) 10 aprilie 2023
  Easy to use. Works perfectly!
   [ Citește toate cele 46 de recenzii ](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/)
  
  ## Contributori și dezvoltatori
  
  „Simple Shortcode for Google Maps” este un software open-source. La acest modul
  au contribuit următoarele persoane.
  Contributori
   *   [ fullworks ](https://profiles.wordpress.org/fullworks/)
   *   [ Alan Fuller ](https://profiles.wordpress.org/alanfuller/)
  „Simple Shortcode for Google Maps” a fost tradus în 3 locale. Mulțumim [traducătorilor](https://translate.wordpress.org/projects/wp-plugins/simple-google-maps-short-code/contributors)
  pentru contribuția lor.
  [Tradu „Simple Shortcode for Google Maps” în limba ta.](https://translate.wordpress.org/projects/wp-plugins/simple-google-maps-short-code)
  
  ### Te interesează dezvoltarea?
  
  [Răsfoiește codul](https://plugins.trac.wordpress.org/browser/simple-google-maps-short-code/),
  vezi [depozitarul SVN](https://plugins.svn.wordpress.org/simple-google-maps-short-code/),
  sau abonează-te la [jurnalul de dezvoltare](https://plugins.trac.wordpress.org/log/simple-google-maps-short-code/)
  prin [RSS](https://plugins.trac.wordpress.org/log/simple-google-maps-short-code/?limit=100&mode=stop_on_copy&format=rss).
  
  ## Istoric modificări
  
  
  #### 1.8.2
  
   * allow for one key to be used for both geocoding and maps
  
  #### 1.8.1
  
   * update free plugin lib
  
  #### 1.8
  
   * remove donation lib and add free plugin lib
  
  #### 1.7
  
   * added optional geokey so you can properly restrict keys
  
  #### 1.6
  
   * escape output to better protect against CSRF ans XSS exploits
  
  #### 1.5.4
  
   * add filters for developers
   * add option to disable zoom
   * remove special characters from address that can break Google
  [Full Change History](https://plugins.trac.wordpress.org/browser/simple-google-maps-shortcode/trunk/changelog.txt)
  
  ## Meta
  
   *  Versiunea **1.8.2**
   *  Ultima actualizare **Acum 1 an**
   *  Instalări active: **4.000+**
   *  Versiune WordPress ** 4.6 sau mai recentă **
   *  Testat până la **6.7.5**
   *  Versiune PHP ** 7.4 sau mai recentă **
   *  Limbi
   * [English (UK)](https://en-gb.wordpress.org/plugins/simple-google-maps-short-code/),
     [English (US)](https://wordpress.org/plugins/simple-google-maps-short-code/),
     [Russian](https://ru.wordpress.org/plugins/simple-google-maps-short-code/) 
     și [Spanish (Spain)](https://es.wordpress.org/plugins/simple-google-maps-short-code/).
   *  [Tradu în limba ta](https://translate.wordpress.org/projects/wp-plugins/simple-google-maps-short-code)
   * Etichete
   * [gmaps](https://ro.wordpress.org/plugins/tags/gmaps/)[Google Maps](https://ro.wordpress.org/plugins/tags/google-maps/)
     [google maps plugin](https://ro.wordpress.org/plugins/tags/google-maps-plugin/)
     [google maps shortcode](https://ro.wordpress.org/plugins/tags/google-maps-shortcode/)
     [maps](https://ro.wordpress.org/plugins/tags/maps/)
   *  [Vizualizare avansată](https://ro.wordpress.org/plugins/simple-google-maps-short-code/advanced/)
  
  ## Evaluări
  
   4.6 din 5 stele.
   *  [  41 5 – de recenzii (stele)     ](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/?filter=5)
   *  [  0 4 – recenzii (stele)     ](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/?filter=4)
   *  [  0 3 – recenzii (stele)     ](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/?filter=3)
   *  [  0 2 – recenzii (stele)     ](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/?filter=2)
   *  [  5 1 – recenzii (stele)     ](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/?filter=1)
  [Your review](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/#new-post)
  [Vezi toate recenziile](https://wordpress.org/support/plugin/simple-google-maps-short-code/reviews/)
  
  ## Contributori
  
   *   [ fullworks ](https://profiles.wordpress.org/fullworks/)
   *   [ Alan Fuller ](https://profiles.wordpress.org/alanfuller/)
  
  ## Suport
  
  Ai ceva de zis? Ai nevoie de ajutor?
   [Vezi forumul pentru suport](https://wordpress.org/support/plugin/simple-google-maps-short-code/)
  
  ## Donează
  
  Vrei să sprijini dezvoltarea acestui modul?
   [ Donează pentru acest modul ](https://ko-fi.com/wpalan)