One version of WordPress GeoMashup 'custom' plugin for handling custom markers in Google Maps.
Extends GeoMashup WordPress plugin for better handling of markers (for both individual post types and post type archives) with the ability to load markers from a post taxonomy term, customisation of cluster markers, better support of Google Maps API V3.
This WordPress plugin is an expansion of the original GeoMashup Custom plugin kindly provided by GeoMashup plugin author, @cyberhobo, as a framework to extend and customise GeoMashup.
DISCLAIMER: This is still work in progress and might be broken, consider the plugin as a guideline on how to use and adapt the original GeoMashup Custom for your own theme or plugin development
Download, install and activate GeoMashup plugin first, before activating GeoMashup custom or you might bump into errors. The GeoMashup Custom plugin has been tested with GeoMashup up to 1.6.2 and might not work with plugin versions below 1.5.x. For some functions (to manage term meta) you will need Advanced Custom Fields plugin.
This Geo Mashup Custom plugin has been tested up with WordPress 3.5.x - howerver, as long as GeoMashup works, this extension should work as well. It has been tested to be working well in environments along with other popular plugins - namely bbPress, BuddyPress, WooCommerce, Gravity Forms and many others.
This extension is meant to work with GoogleMaps V3. GeoMashup plugin supports Bing Maps and other maps, however this extension has not been tested with these and might not work.
Download Geo Mashup Custom zip and unpack into your WordPress installation plugins directory (normally www.yourdomain.com/wp-content/plugins/
). Make sure the plugin directory is named as 'geo-mashup-custom'
(as GitHub would probably rename it (geo-mashup-custom-master
or other branch name). Activate the plugin from your WordPress dashboard plugin management page.
After installation is complete and the plugin has been activated, from your WordPress dashboard, look in the Settings
menu. You will see a new menu item GeoMashup Custom
. Click on it and you will be brought to the GeoMashup Custom settings page.
You can specify a marker icon for each post type - posts belonging to each type will be shown on GeoMashup maps with the marker you will have pointed to. The plugin will detected a list of your post types and the taxonomies associated with each. Select the post types which you want to print on your maps and for each one specify a URL pointing to an image marker.
For each post type selected, you can also select a related taxonomy. If you choose to do so, what the plugin will do is, when a map is being queried, to examine the post terms for the specified taxonomy. The plugin will look for a term meta that should contain a URL to the marker you want to use to represent the post on a GeoMashup map.
It's up to you how you want to manage or add term metas. WordPress does not do it natively via dashboard but you can add metadata to almost any object: http://codex.wordpress.org/Metadata_API. Advanced Customs Fields offers an excellent tool to manage term meta.
In GeoMashup Custom you only need to specify the name of the the term meta to look for. It's advisable to use only one term for the specified taxonomy; in case a post has two or more terms assigned, each containing a URL to a marker icon image, there might be inconsistencies.
If no marker is found for the specified term meta in the post term associated to the post to be pinned on a map, GeoMashup Custom will fallback on the parent term. If there's no term there either, it will further fallback on the marker specified globally for the post type.
There's an experimental fallback to look also for .png
images in the /markers
directory of geo-mashup-custom
plugin directory. Images names should match corresponding post term slugs.
The rest of the options in GeoMashup Custom will allow you to specify URLs for other non-dynamic markers, such as markers for posts sharing the same coordinates, cluster markers (three levels), marker for a currently viewed post (to override any default one set using terms meta). The rest of the settings allow you to adjust the position and size of the markers as they appear on the map.
With GeoMashup Custom, you can further customise the appearance of the maps queried with GeoMashup using theme template files.
You can customise the markup and style of the info window (the 'balloon' that pops out when a marker is clicked on the map) by copying the info-window.php
file into your active WordPress theme root. This will override the default one.
You can customise the markup and style of the map frame similarly by placing a copy of map-frame.php
into your active theme root. This will override the default one.
Please refer to GeoMashup documentation on how to customise other content, it has template overrides too.
Please refer to GeoMashup documentation on how to show maps in your theme. This plugin extensions focuses on extending and utilising of GeoMashup for theme development and assumes you'll be using echo GeoMashup::map( $args )
function method and query variables or options as described in the GeoMashup tag reference docs.