MapPress FAQ

How can I get a Google API key and secure it?

Please see this page to get your key: How to Get A Google Maps API Key

If you receive a warning from Google that your API keys are unsecured. It’s nothing to worry about. API keys are visible on any web pages where a map is displayed (this is how Google Maps work – it’s not related to MapPress). Although it’s unlikely, someone could take the key and use it on another site. Please follow Google’s instructions to secure your API key.

Map error or blank map

Most display problems are due to theme or plugin conflicts:

  • “Minifier” or “Optimizer” plugins
    These plugins often mangle the MapPress JavaScript and CSS files.  They usually have a setting where you can exclude certain scripts. Try excluding the Google Maps API and the MapPress JavaScripts and CSS:
    • maps.googleapis.com
    • index_mappress.js
    • index_mappress_admin.js
    • leaflet.js
    • maplibre-gl.js
    • leaflet-maplibre-gl.js
    • mappress.css
  • “Consent” plugins
    Usually these plugins display a blank map until consent is accepted and the page is reloaded. However, they are sometimes too aggressive in blocking Leaflet scripts. You will usually see a browser console (F12) message like “L is undefined”, “can’t access property Layer”, or “Leaflet not loaded”. If you’re using OpenFreeMap tiles, there are no third-party request / cookies, so no consent is required, and you can exclude the MapPress scripts from your consent plugin. This includes:
    • Complianz
    • Real Cookie Banner
    • Borlabs Cookie
    • CookieYes
    • Cookiebot
  • Theme missing wp_footer() call
    The wp_footer() call is used to load JavaScripts. It’s a required call, but it’s sometimes missing in custom themes. The fix is to just add it to the theme footer file: http://codex.wordpress.org/Function_Reference/wp_footer

Troubleshooting conflicts

Here’s how to check for a conflict:

  1. Temporarily disable all plugins except MapPress.  If the maps are now working, re-activate one by one to find the conflicting plugin.
  2. Temporarily Install and activate a standard WordPress theme, like “twenty twenty”.  Check the maps again.  If they’re working, there’s a theme problem. Most themes that include maps also have a setting to disable loading the Google Maps API, to prevent this kind of conflict.

Google API errors

The map container may show an error message instead of the map:

  • Google Maps API key missing
    Enter a Google API key in the MapPress settings screen.
  • Google Maps API loaded multiple times
    This is caused by another plugin or the theme loading the Google Maps API twice. Try checking the setting ‘Prevent loading Google Maps multiple times’ or “Output maps in iframes”, in the in the MapPress settings. If this doesn’t resolve the issue, contact the author of the other plugin/theme to determine how to prevent it from loading the Google Maps API.
  • Google Maps API not loaded
    This is a theme or plugin problem. See the section “Map Doesn’t Display” to figure out which one.

Geocoding with Google Maps

If you use MapPress ‘geocoding’ functionality to generate maps from custom fields, you will need a second API key just for the WordPress admin. This key can be optionally secured by IP address, but it won’t be visible to site visitors. You may also need to enable Google’s Geocoding API for your new key. Please see Google’s frequently asked questions for information about how to enable/disable specific APIs.

Address not found

MapPress includes several geocoders, which are responsible for finding addresses and translating them into map coordinates. The free geocoders (Nominatim and Algolia) aren’t very accurate. If you have an address that can’t be found, try either switching to Google or using the Mapbox geocoder with Leaflet maps.

KML or GPX errors

KML and GPX files are tricky. If you’re getting an error trying to display one of these files, it’s probably one of two things:

  1. Because of a web security feature called CORS, it is impossible to read KML/GPX files directly from most web sites.
  2. Google and Mapbox must read the file to display it on the map. This means you generally cannot use these files on a local (localhost) web server.

So what’s the solution? Just two steps:

  1. Copy the KML/GPX file you want to a web-accessible directory on your hosted web server (it could be the main WordPress directory)
  2. Now you can use the file on your site on that server

Will I lose my maps when I upgrade to MapPress Pro?

No! All of your maps will continue to work.  You’ll gain all the new Pro features but your existing maps are fully compatible.

Translating MapPress

Please see here: Translating MapPress

How do I cancel a PayPal subscription?

Please see this page in your PayPal account: Payments Overview

Still stuck?

Please use the contact form and describe the what you’ve tried so far.  Please send details: a step-by-step to reproduce the issue, and a URL that shows the problem.