MapPress FAQ

‘Oops’ Error and Google Maps API Keys

Google now requires an API key to use the maps API. 

If your key isn’t working

  1. Open the JavaScript console and check the error message from Google. 
  2. If you have a referrer error, check that you entered the referrers using Google’s format (**)
  3. Be patient: changes in the developer console can take up to five minutes to update

Get a Browser API key

  1. Go to the Google Developer Console
  2. From the projects list, select a project or create a new one
  3. If the API Manager page isn’t already open, open the menu and select API Manager
  4. On the left, choose Credentials
  5. Click ‘Create credentials’ and then select ‘API key’
  6. Choose ‘Browser key’
  7. Give the key any name you like. 
  8. You can leave the HTTP Referers field blank.  If you’re worried about security, enter a referrer: for most blogs, use* (Google’s example only applies if you have subdomains).
  9. Copy the API key and click ‘OK’

Enable the APIs Google Maps Javascript and Google Maps Geocoding

  1. Click ‘overview’ on the left
  2. Under ‘Google Maps APIs’ click ‘more’
  3. Click ‘Google Maps Javascript API’
  4. On the next screen, click the ‘enable’ button
  5. Repeat the above steps to enable the ‘Google Maps Geocoding API’
  6. Paste the API key you copied earlier into the MapPress settings
  7. You should now see the sample map on the MapPress settings screen

Get a Server Key

A server key is only required for the geocoding function in MapPress Pro. 

  1. Follow the steps above to create a new key, but select ‘server key’ instead of ‘browser key’. 
  2. Enter your server’s IP address in the ‘accept requests from these server IP addresses’ field

Test / Local Keys

You will need separate API keys for testing on a local server (for example, a server on your PC). 

  1. For a browser test key, leave the ‘accept requests from these HTTP referrers’ field blank. 
  2. For a server test key leave the ‘accept requests from these server IP addresses’ field blank.

Maps API Loaded Multiple Times

Google only allows the maps API to be loaded once per page.  Sometimes another plugin or the theme will load the API, in addition to MapPress.  This can cause unusual errors:

  • Map can’t be dragged
  • Missing controls or icons
  • No map display

Check the browser’s JavaScript console for an error indicating the maps API is loaded multiple times.  If so, deactivate the other plugin entirely, or disable the maps function in your theme,  Most themes include a checkbox for this purpose, or you can contact the author to ask how to do it. 

For plugins, you may be able to keep both plugins working by changing the activation order of MapPress and the other plugin. 

Map Isn’t Displayed

These are the most common issues:

  1. Error in another plugin or theme
    Disable all of your plugins and switch to a standard theme (for a moment).  If you now see your map, re-activate until you find the error. 
  2. Maps API loaded multiple times
    See the section above on this topic.
  3. Theme is missing the wp_footer() call
    See here for details:
  4. Theme or plugin loads obsolete version of jQuery 
    If the jQuery version is too old, you’ll see an error in your browser’s javacript console.  The minimum version is 1.7 (released 4 years ago).  You’ll need to update the theme or plugin or deactivate it.
  5. “Minifier” plugins
    Exclude the MapPress files (mappress.min.js) or Google URL ( from your minifier plugin.

Map Won’t Save

This is caused by  errors in another plugin or the theme.  Disable all plugins and switch to a standard theme (for a moment).  If you now see your map, re-activate until you find the problem. 

Will I Lose my Maps when I Upgrade to Pro?

Don’t worry – your maps will continue to work.  You’ll gain all the new Pro features but your existing maps are fully compatible.

Map is grey or only a corner of the map displays

Google maps do not display properly when they are inside an element that is initially hidden, such as a hidden tab, slider, accordion, etc.  MapPress includes a workaround for jQuery UI TabsFor other libraries or controls, you’ll need to implement your own solution using Javascript. 

When a hidden element is displayed, you can redraw the map by calling its resize() method.  For example to redraw the first map on the screen use:

This example redraws maps inside elements with class ‘mycontrol’ when the element is clicked.  Note that setTimeout is only needed if there is an animation (such as sliding into place) that must complete before the map is resized:

jQuery(document).ready(function() {
    jQuery('.mycontrol').on('click', function() {
        jQuery(this).find('.mapp-canvas').each(function() {
            var id = jQuery(this).attr('id');
            var map = window[id];
            setTimeout(function() {
            }, 350);

POIs are in the Ocean near Africa

This happens when a POI can’t be geocoded.  Either the POI location is invalid or you are over your Google query limit.  See the documentation for information about query limits.

Can’t change marker icons

MapPress Pro is required to change the map icons.  

Map exists but doesn’t appear in the post

Check that a shortcode is present in the post.  The documentation shows you how to do it step by step.

Post displays [mappress] shortcode instead of the map

This indicates MapPress has been deactivated or it can occur because of a very old WordPress bug: each shortcode must be on a separate line.  Edit the post and check that there is a carriage return between shortcodes and any surrounding text.

Translating MapPress

WordPress plugin translations are created using the POEdit utility. MapPress translation files are stored in the languages directory of the plugin. 

Creating a New Translation

  1. Download the latest POEdit
  2. Run POEdit and open the master file mappress.pot or mappress.po from the languages directory of the MapPress plugin
  3. Use the menu File->Save as to save it as a .po file (a translation).  The file name must include an extension for your language.  For example, ‘mappress-es_ES.po’  is for Spanish.  A list of valid language extensions is here.
  4. Translate the strings.
  5. When you’re done use menu ‘file->save’ to save the file again.  POEdit should create a .MO file (a compiled translation) with the same base name as your .PO file.
  6. Send me both the .PO and .MO files, and I’ll include them with all future versions of MapPress!

Updating an Existing Translation

MapPress texts change frequently so you may find there is an existing .PO file for your language but the translation isn’t up to date.  If that happens:

  1. Run POEdit and open the .po file.  For example, for Spanish open mappress-es_ES.po
  2. Use the menu Catalog->Update from POT file. Select the file mappress.pot or mappress.po
  3. Update any missing strings.
  4. Correct any fuzzy strings (they appear in a different color at the top of the file).  For each one, click on menu Edit->Translation is Fuzzy to remove the fuzzy indicator.  You can also hit ALT-U.
  5. Save your .PO file.  POEdit should re-generate the corresponding .MO file.
  6. Send me both the .PO and .MO files, and I’ll include them with all future versions of MapPress!

Still Stuck?

I’ll be happy to help.  Please contact me and let me know you’ve already taken the steps listed above.  Please send everything I might need to reproduce the problem, including any error messages and a URL or screenshots illustrating the problem.