Simple Shortcode for GoogleMaps

Descripción

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 and the Transients API 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 API KEY"]

Google now requires that new accounts use an API key. You can register a free API key here.

Instalación

  1. Activar el plugin.
  2. Obtain an API key here.
  3. Added [pw_map address=»your address here» key=»YOUR API KEY»] to any post or page.

FAQ

  1. 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"]
  1. 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"]
  1. 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"]
  1. How are the maps cached?

Maps are cached using the WordPress Transients API, which allows for very simple 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.

  1. 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.

Reseñas

11 de enero de 2022
I tried other map plugins and all I wanted to do was to display a Google map with an address pinned. Believe it or not, the more well known plugins, that do a TON of stuff, could not handle this simple request. I found this plugin and within about 5 minutes I had the map displaying on my site with a dynamic pin for the address based on the page I was on. Worked first time and has never given me any issues. So if all you want to do is display a map, and highlight an address, then this is the plugin for you!
6 de diciembre de 2021
I had been using WP Google Maps for a while when the shortcode stopped working correctly in Pods and Elementor. So I moved to this plugin, which is WAY simpler than WP Google Maps of course, because it provided the absolute basic functionality that I needed: display of a map by shortcode. Excellent plugin. Zero conflicts. Would highly recommend.
Leer todas las 33 reseñas

Colaboradores y desarrolladores

«Simple Shortcode for GoogleMaps» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Simple Shortcode for GoogleMaps» ha sido traducido a 3 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce «Simple Shortcode for GoogleMaps» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

1.4.1

  • load google maps cookieless to help with GDPR compliance

1.4.0

  • add donation info to settings

1.3.3

  • Fix block editor issue

1.3.2

  • Fix: few API key related issues

1.3.1

  • Fix: API key was not passed to the pw_map_get_coordinates() function

1.3

  • Added key parameter to the [pw_map] shortcode.

1.2

  • Added missing load_plugin_textdomain()
  • Changed textdomain for language packs

1.1.2

  • Fixed a bug with the zoom parameter not working

1.1.1

  • Fixed a bug with sites on HTTPS

1.1

  • Added support for disabling map controls via disablecontrols=»true», thanks to Alex Hochberger
  • Added support for disabling the scroll wheel zoom via enablescrollwheel=»false», thanks to Alex Hochberger

1.0.3

  • Fixed a conflict with the Live Composer plugin.

1.0.2

  • Updated Google Maps API to fix broken maps after version 2 was deprecated on March 8, 2013
  • Improved error responses

1.0.1

  • Added CSS to fix a problem with responsive themes

1.0

  • First release!