Plugin Directory

Basic Google Maps Placemarks

Embeds a Google Map into your site and lets you add map markers with custom icons and information windows.

How do I use the plugin?

Read the instructions on the Installation page. If you still have questions, read this FAQ and look for answers on the support forum. If you can't find an answer, start a new thread on the forums.

How can I get help when I'm having a problem?

Don't e-mail me. I automatically delete any support requests that come in over e-mail. Follow the steps below instead.

  1. Read the the Installation page.
  2. Read the answers in this FAQ.
  3. Look through the support forum, because there's a good chance your problem has already been addressed there.
  4. Check the Other Notes page for known conflicts with other plugins.

If you still need help, then follow these instructions:

  1. Disable all other plugins and switch to the default theme, then check if the problem is still happening. If it isn't, then the problem may actually be with your theme or other plugins you have installed.
  2. If the problem is still happening, then start a new thread in the forum with a detailed description of your problem and the URL to the page on your site where you placed the map. Please copy/paste any error messages verbatim. Screenshots can be very helpful, too. And please be respectful.
  3. Check the 'Notify me of follow-up posts via e-mail' box so you won't miss any replies.

I monitor the forums and respond to a lot of the requests. I do this in my spare time, though, and can't respond to all of them. I typically only have time to help with problems that are within the plugin's scope. That means that I probably won't respond if the issue is actually caused by your theme or another plugin, or if you're trying to modify the plugin to do something it doesn't natively do. It's still a good idea to post something on the forums, though, because other users may be able to help out when I can't.

If you can't find a solution, you can always hire a developer to create one for you. See the Customization section on the Other Notes page for more info on that.

Does the plugin support [feature]? / How can I get the plugin to do [feature]?

All of the features that the plugin supports are documented on these pages. If you don't see a feature mentioned, then that means that the plugin doesn't support it. You'll need to write the extra code yourself if you want to add that feature to the plugin, or hire someone to do it for you (see the Customization section on the Other Notes page). There are filters throughout the core code to support customization. If you need a hook or filter that doesn't currently exist, add a post to the support forums to request it and I'll add it to the next version.

You can also try searching the support forums in case others have already worked out a way to do it.

If you do get it working with your custom code, please share it on the support forums so that others can benefit from your work.

The map doesn't look right.

This is probably because some rules from your theme's stylesheet are being applied to the map. Contact your theme developer for advice on how to override the rules.

The page says 'Loading map...', but the map never shows up.

Check to see if there are any Javascript errors by opening the JavaScript console in your web browser. An error caused by other plugins or your theme can prevent BGMP from working. You'll need to fix the errors, or switch to a different plugin/theme.

Also, make sure your theme is calling wp_footer() right before the closing body tag in footer.php.

None of the placemarks are showing up on the map

If your theme is calling add_theme_support( 'post-thumbnails' ) and passing in a specific list of post types -- rather than enabling support for all post types -- then it should check if some post types are already registered and include those as well. This only applies if it's hooking into after_theme_setup with a priority higher than 10. Contact your theme developer and ask them to fix their code.

Also check the Other Notes page for known conflicts with other plugins.

Can I use coordinates to set the marker, instead of an address?

Yes. You can type anything into the Address field that you would type into a standard Google Maps search field, which includes coordinates.

If the plugin recognizes your input as coordinates then it will create the marker at that exact point on the map. If it doesn't, it will attempt to geocode them, which can sometimes result in a different location than you intended. To help the plugin recognize the coordinates, make sure they're in decimal notation (e.g. 48.61322,-123.3465) instead of minutes/seconds notation. The latitude and longitude must be separated by a comma and cannot contain any letters or symbols. If your input has been geocoded, you'll see a note next to the address field that gives the geocoded coordinates, and the plugin will use those to create the marker on the map; if you don't see that note then that means that your input was not geocoded and your exact coordates will be used to place the marker.

If you're having a hard time getting a set of coordinates to work, try visiting Latitude and Longitude of a Point and use the coordinates they give you.

Can I change the default icon?

Yes, if you want to use the same custom icon for all markers by default, instead of having to set it on each individual placemark, you can add this to your theme's functions.php or a functionality plugin:

function setBGMPDefaultIcon( $iconURL )
{
    return get_bloginfo( 'stylesheet_directory' ) . '/images/bgmp-default-icon.png';
}
add_filter( 'bgmp_default-icon', 'setBGMPDefaultIcon' );

The string you return needs to be the full URL to the new icon.

How can I set the default icon by category or other condition?

If you only want to replace the default marker under certain conditions (e.g., when the marker is assigned to a specific category), then you can using something like this:

function setBGMPDefaultIconByCategory( $iconURL, $placemarkID )
{
    $placemarkCategories = wp_get_object_terms( $placemarkID, 'bgmp-category' );

    foreach( $placemarkCategories as $pc )
    {
        switch( $pc->slug )
        {
            case 'restaurants':
                $iconURL = get_bloginfo( 'stylesheet_directory' ) . '/images/marker-icons/resturants.png';
            break;
            
            case 'book-stores':
                $iconURL = get_bloginfo( 'stylesheet_directory' ) . '/images/marker-icons/book-stores.png';
            break;
            
            default:
                $iconURL = get_bloginfo( 'stylesheet_directory' ) . '/images/marker-icons/pin.png';
            break;
        }
    }

    return $iconURL;
}
add_filter( 'bgmp_default-icon', 'setBGMPDefaultIconByCategory', 10, 2 );

Here's another example to uses the placemark's ID:

function setBGMPDefaultIconByID( $iconURL, $placemarkID )
{
    if( $placemarkID == 352 )
        $iconURL = get_bloginfo( 'stylesheet_directory' ) . '/images/bgmp-default-icon.png';
        
    return $iconURL;
}
add_filter( 'bgmp_default-icon', 'setBGMPDefaultIcon', 10, 2 );

The string you return needs to be the full URL to the new icon.

Can I embed more than one map on the same page?

No, the Google Maps JavaScript API can only support one map on a page. You can have different maps on separate pages, though. See the Installation page for instructions on making different maps have different center locations, display different sets of placemarks, etc.

How can I override the styles the plugin applies to the map?

The width/height of the map and marker information windows are always defined in the Settings, but you can override everything else by putting this code in your theme's functions.php file or a functionality plugin:

function setBGMPStyle()
{
    wp_deregister_style( 'bgmp_style' );
    wp_register_style(
        'bgmp_style',
        get_bloginfo('template_url') . '/bgmp-style.css'
    );
    wp_enqueue_style( 'bgmp_style' );
}
add_action('init', 'setBGMPStyle');

Then create a bgmp-style.css file inside your theme directory or a child theme and put your styles there. If you'd prefer, you could also just make it an empty file and put the styles in your main style.css, but either way you need to register and enqueue a style with the bgmp_style handle, because the plugin checks to make sure the CSS and JavaScript files are loaded before embedding the map.

I get an error when using do_shortcode() to call the map shortcode

See the instructions on the Installation page.

How can I force the info. window width and height to always be the same size?

Add the following styles to your theme's style.css file or a child theme:

.bgmp_placemark
{
    width: 450px;
    height: 350px;
}

Can registered users create their own placemarks?

Yes. The plugin creates a custom post type, so it has the same permission structure as regular posts/pages.

I upgraded to the latest version and now something's broken

If you're running a caching plugin like WP Super Cache, make sure you delete the cache contents so that the latest files are loaded, and then refresh your browser.

If you upgraded other plugins at the same time, it's possible that one of them is causing a JavaScript error that breaks the entire page or some other kind of conflict. Check if BGMP works with the default theme and no other plugins activated.

If you're still having problems, create a detailed report on the support forum (see the 'How can I get help when I'm having a problem?' question above), and then download an older version to use until the problem is fixed.

Also, keep in mind that professionals don't just install plugin updates on their live website and then get angry when they inevitably run into a situation where an update crashes the site. The right way to do it is to have a staging server where you test all updates and code changes, and then push them to the production server once you're satisfied that everything is working properly. If your website is mission-critical, then this is what you need to be doing. If you're not capable or willing to do it yourself, then you need to hire a developer to manage the process for you. If you don't do those things, then you don't have anyone to blame but yourself when things go wrong. You can subscribe to the BGMP Testers e-mail list to be notified when new release candidates are available for testing.

Are there any hooks I can use to modify or extend the plugin?

Yes, I've tried to add filters for everything you might reasonably want, just browse the source code to look for them. If you need a filter or action that isn't there, make a request on the support forum and I'll add it to the next version.

Requires: 3.1 or higher
Compatible up to: 3.5.1
Last Updated: 2013-3-31
Downloads: 53,033

Ratings

4 stars
4.5 out of 5 stars

Support

6 of 14 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
0,1,0 100,1,1
50,2,1 100,4,4 50,2,1 100,5,5
100,2,2
100,2,2 100,9,9
100,2,2
100,1,1 100,2,2
100,7,7 100,1,1 0,1,0 0,1,0 100,1,1
100,1,1
100,1,1 80,5,4