OpenStreetMaps – Leaflet Map

Overview

In Enfold version 4.8.2 we have added OpenStreetMaps – Leaflet map element. OpenStreetMaps is an open source and responsive map with markers and it is based on Leaflet Map plugin. Unlike Google Maps, you do not need a key or  an account to use OpenStreetMaps.

How to active OSM – Leaflet Map element

Here are the steps to active OSM – Leaflet Map element

  • In your WordPress dashboard, go to Plugins > Add New and install Leaflet Map plugin
  • Go to Enfold > Theme Extensions > OpenStreetMaps and enable it.

enabling OpenStreetMaps

FAQ

Grayscale is done by CSS classes ‘avia-grayscale-xxx’ and it is not possible to add other colors using pure CSS.

You would need to enter an address and then click the button. If it is not working, please make sure that have entered a valid address.

Yes, that is true and when you choose that option, assets are loaded from your server and not from external server.

We only offer a basic implementation, therefore, out of the box, it is not possible. You can find get_maps_html_from_alb_shortode() function in enfold\config-leaflet-maps\class-avia-leaflet-maps.php if you would like to extend the implementation.

Troubleshoot

Maps do not show

This is probably caused by Leaflet js library that was bundled in the theme is incompatible with the version required by the plugin.

To troubleshoot:

  • Go to Enfold > Theme Extensions > OpenStreetMaps and switch “Leaflet Javascript Library js File” option to “Use Plugin Default Library” until next theme update

or