Google Maps WordPress Plugin – More Than Just Pretty Maps
A plugin that inserts Google maps into plugins is hardly newsworthy.
But what about a plugin that not only does that job exceptionally well but also brings a wealth of location-based features to your WordPress install like geotagging posts, adding location context to your BuddyPress users’ activity or even letting them “check-in”?Although we no longer update or maintain Google Maps, you can still download and use or customize the plugin!
The updated Google Maps plugin from WPMU DEV does all this and more. Now that is worth talking about.
There are, of course, many plugins in the WordPress plugin repository that will let you add a Google Map to your WordPress posts and pages, but the Google Maps plugin from WPMU DEV enables you to do a whole lot more.
Comprehensive Global Settings
The plugin allows you to control how all your maps look from the one spot.
Control the default height, width, map type, zoom, whether to use metric or imperial measurements, alignment, and snapping.
Additional CSS can also be specified to style the maps which allow, for example, for the marker details below the map to be hidden.
And if you need to tweak the settings for a particular map, you can override the global settings by adding the local setting to the shortcode embedded in the post or page.
Build and Insert
The standard way to insert a Google Map into a post or page is incredibly easy with Google Maps.
Clicking on the new globe icon in the Visual Editor opens a dialog that allows you to create and configure a new map. Add as many markers to the map as you need by simply entering the address and clicking on the resultant marker to edit its title and description.
The Map Options allow you to override many of the global settings plus you can choose whether to associate the map with the post. Associating a post allows the widget to automatically display the map enabling the map not to be shown in the post itself and only in the widget.
The Map Options also allow you to configure the display of relevant images from Panoramio.
When you are happy with the map, clicking Insert this map adds the shortcode to your post or page. You’ll also notice that any of the markers can be deleted from this page.
If you have already created a map then the dialog will allow you to insert an existing map by clicking on the appropriate link.
Auto-build Maps From Custom Fields
Where the Google Maps plugin starts to stretch its legs is away from the basic build and insert.
The ability to automatically insert a map based on the contents of a custom field is a powerful and useful feature. The custom field is identified in the global settings along with whether the data is a set of co-ordinates (longitude and latitude) or an address.
Once set up, a map will be created for every post that has the custom field populated – whether you display the map and where is up to you. Again, it is quite possible to just associate the map with the post and then display it in a widget rather than in the post content itself. The choice is yours.
This is invaluable for any listing on your site that may include a location such as a business directory, an event listing or a sporting fixture. Most likely built on a custom post type, you just need to tell the Google Maps plugin the custom field that contains the address and maps will be automatically added to the post entry or sidebar.
A Highly Flexible Widget
The plugin provides a highly flexible widget for displaying maps in your theme’s widgetized areas such as sidebars.
Whilst it is possible to “hardcode” the map to be displayed, the real flexibility comes in the ability to display:
- only maps associated with the current post
- maps that are associated to any post
- all maps
- a random map
- or maps associated with any post that has been tagged with a specified keyword
The widget map display can be customized from hiding the marker list to combining multiple maps into a single map.
For those of you looking at mobile web apps, the User Check-In feature will definitely be of interest.
Embed a shortcode on a post and when a user visits the post it will attempt to determine their location (after asking permission to do so) which will be recorded.
It’s possible to configure the plugin to allow guests to check-in or to restrict it to logged-in users only. The shortcode can also display a map with all the user check-ins marked.
An easy pathway to generating community through geotagging.
Over 20 Add-Ons To Further Extend The Feature-List
The User Check-in is the latest addition to the list of over 20 add-ons for the Google Maps plugin that can be activated as and when you need them including:
- BuddyPress Group Maps – allows BuddyPress groups to add location maps
- Nearby Facebook Friends – shows a list of nearby Facebook friends
- Featured Image As Map Marker – experimental but uses the posts featured image as a map marker icon
- Geotag My Activities – allows your users to add the location to their BuddyPress activity updates
- Geotag My Posts – add a location to your posts, pages, and custom post types
- Where Am I? – Show a map to your visitor based on their current location
More Than Just Inserting Pretty Maps
Far from being just a way to insert a Google map into your WordPress post, the Google Maps plugin adds mapping and geo-location to deliver a stable of location features that has a massive variety of potential uses.
Download it and start building your location-aware WordPress website.Tags: