Description

A responsive Google map that allows multiple markers per map and multiple maps per page. Includes fullscreen view and marker clustering. No API key required. Easy simple setup. No long complex shortcodes to generate by hand. As simple as creating a map, quick add a location, copy the simple shortcode to the page you want the map on, and you're done.

Requirements

Compatible With

Installation

To install this plugin, simply decompress the zip file and upload to the plugins folder in your WordPress site. You may also refer to the WordPress documentation on installing plugins.

Setup

After installation, go to the "Map Settings" page under the "Google Maps" tab. Here you can customize the global settings for the maps. You can also go to the "Location Settings" page under the "Map Locations" to customize the global location settings.

Getting Started

Note : On all plugin admin pages, there is more information under the "Help" link in the upper right corner. There is also shortcode help on pages and posts.
  1. Once you have set the global settings, you can then start to create map locations. Go to "New Location" under the "Map Locations" tab to create your first location.
  2. In the "Address to use for geocoding" field, enter the address of the location. If the marker is not accurate, you can drag the marker on the map to where you would like it. This will update the geographical coordinates of the marker. This field is also used for the directions services. The address saved in this field will be used when the user clicks on directions "to here" or "from here". If the marker was not accurate with the address you used, you can delete the address and the map will use the marker's coordinates for the address services.
  3. If you would like to categorize your locations, you can do so by creating new categories on this page or by going to the "Categories" page under the "Map Locations" tab.
  4. Once you have created a location, you can either use the shortcode provided and place that into a page or post, or you can move on to create a new map.
  5. If you choose to use the location shortcode, that map will use the global map setting when being displayed. If you choose to create a new map, you can override the global settings if allowed.
  6. To create a new map, go to "New Google Map" under the "Google Maps" tab. The map will display with the global map settings. If allowed the map will override options below.
  7. To the right side under "Map Locations" there will be a checkbox list of locations that you created. Check the boxes of the locations you would like to display on this map.
  8. Below the map is also a "Quick Add A Location". Here you can add a location on the fly. Just enter the address you would like to display. This will create a new location with the name of the address with basic global settings. These settings and name can then be updated as needed in map location section.
  9. Once you have created a map, you can copy the shortcode provided and place that into any page or post.

Options Pages

Plugin Settings

Map Default Settings

Location Settings

Map Style Settings

Page Metaboxes

Map Location

Location Shortcode

Location Info

Map Shortcode

Map locations

Quick add a location

Map Settings

Map:

Controls:

Style:

Features:

Info:

Map Styles

Map, Administrative, Landscape, (POI) Points of Interest, Road, Transit, Water:

JSON:

Shortcodes

[google_map]

location_id: Show a single location on a map. Example: [google_map location_id="12"/]

map_id: Show a group of locations on a map. Example: [google_map map_id="15"/]

category_name: Show a group of locations by category name or a comma separated list of categories. Example: [google_map category_name="Businesses"/] or [google_map category_name="Hotels,restaurants"/]

category_slug: Same as above but uses the slug instead of the name. Example: [google_map category_slug="businesses"/] or [google_map category_slug="hotels,restaurants"/]

width: Sets the width of the map in either pixels or %. Example: [google_map location_id="12" width="500px"/] or [google_map location_id="12" width="50%"/]

height: Sets the height of the map in either pixels or %. Example: [google_map location_id="12" height="500px"/] or [google_map location_id="12" height="50%"/]

Template Files

Public Map Pages

If you want to override the template files that displays the individual map pages from selecting the "Allow map pages to be viewed publicly" options, create a file named "single-google-map.php" and place it in your themes folder.

Public Location Pages

If you want to override the template files that displays the individual location pages from selecting the "Allow location pages to be viewed publicly" options, create a file named "single-location.php" and place it in your themes folder.

Location Category View

If you want to override the category view for location pages, create a file named "taxonomy-location-category.php" and place it in your themes folder.

Internationalization

The two folders in this directory hold the translation files (.po, .mo, .pot) needed to translate both, front-end and back-end terms.

Front-end Translation

The front-end terms are those shown to the user while using the map. These terms include the navigation and directions terms. The plugin is setup to translate the front-end based on the users browser language. If the .mo file for that language is not found it will revert to the WordPress install language. If that translation is not found than it will then revert to English.

If you would like to make a .mo file for the front-end, please name them responsive-google-maps-(two letter language).mo

Example for English

responsive-google-maps-en.mo

You can also make a file that is region specific. Just add and _(REGION)

Example

responsive-google-maps-en_US.mo

Depending on the users browser the language detected may, or may not, include the region. Be sure to create both files if at all possible.

Back-end Translation

The back-end translation is only based on the WordPress install language. Currently there are no translations for this, yet. The .pot file in the back-end folder include all of the terms used. Fell free to create your own translations and save the .mo file in that directory. The plugin is already setup to include the proper .mo file if it is available. Please name those responsive-google-maps-(two letter language_REGION).

Example

responsive-google-maps-en_US.mo

Submitting Translations

If you would like to submit your translations to be included in future releases please submit those to support@markadvertising.com. Please include both the .po and .mo files

Filters

"infowindow_content"

A filter is now applied to the infowindow content prior to being output. This filter is run after the content has run through the "wpautop()" function.

Example

function your_filter_function( $content, $post_id )
{
	return 'Post ID #' . $post_id . ' content = ' . $content;
}
add_filter( 'infowindow_content', 'your_filter_function', 10, 2 );

"rgm_metabox_{metabox_id}"

A filter is now applied to the metabox content prior to being output. This filter is run on all metaboxes created by this plugin.

Example

function your_filter_function( $content )
{
	return 'Your content ' . $content . ' around the metabox';
}
add_filter( 'rgm_metabox_map_locations', 'your_filter_function', 10, 2 );

"rgm_metabox_{metabox_id}_{field_id}"

A filter is now applied to the metabox field prior to being output. This filter is run on all inputs in all metaboxes created by this plugin.

Example

function your_filter_function( $content )
{
	return 'Your content ' . $content . ' around the metafield';
}
add_filter( 'rgm_metabox_map_settings_zoom_level', 'your_filter_function', 10, 2 );

Visual Composer Block

Select the "Responsive Google Map" block to begin. Select from the "Map" dropdown, already created map or locations. If the only option is "None", you need to create a map or location.

Enter the height and width. Please inlude units (px, %) or leave blank to use the default.