Map Block Leaflet, by Jesús Olazagoitia

Map Block Leaflet is a map plugin for WordPress developed by Jesús Olazagoitia (Goiblas). A developer who is a member of the WordPress community of Logroño, which is used to insert maps made with Leaflet on our website.

This plugin is as simple as it promises and at the same time extremely powerful. It’s a plugin that offers us two blocks. One is a map with a marker (Map Leaflet), and another is a map with multiple markers (Map Leaflet multimarker).

Bloques que añade Map Block Leaflet a WordPress cuando instalamos el plugin.
Leaflet map blocks provided by the plugin.

Map Leaflet Block

The plugin comes with a search engine in which we can enter the city or the place or address that we want to show on the map, and it allows us to resize the map with a handle in a very simple way as well as relocate the marker where we want.

Bloque de un solo marcador del plugin Map Block Leaflet con una búsqueda de ciudad.
Single-marker block.
Sección de edición del texto del marcador del bloque simple.
Bookmark pop-up content

Maybe in the case of the addresses it can slip a bit, but I’m afraid that this is not the responsibility of the developer, but of the search base in which they are found.

The block has a very simple setup. In it, we can configure what text we want the bookmark pop-up to show.

In addition, it is very simple, and the result is shown in real time on the block that we are layout.

Edición del texto del marcador del pop-up en el bloque simple de Map Block Leaflet.
Bookmark pop-up content modified in real-time.
Sección para elegir el tema cartográfico que queremos mostrar en el mapa.

The next option we can configure is the cartographic base theme, where we can currently choose between eight layouts, although one did not work properly because it has been removed.

When I added the option to edit the URL of the map database, I tried to add some of the maps available on Github and other sites, but I couldn’t change it.

I don’t know if this hasn’t worked for me because I’m testing locally, I don’t think so, or if it’s just a feature that will come in the future but doesn’t work yet.

Sección en la que se puede configurar la ubicación del centro del mapa en el bloque simple y el zoom.

The other two options available are position fields (with geographical coordinates) and zoom, although these parameters can also be dynamically modified on the block with the mouse directly.

Sección de altura del mapa en el bloque simple de Map Block Leaflet

The last option available is the height of the map, which is also modifiable with the mouse. But here is a very interesting option, which is to disable the zoom of the map with the mouse scroll. How many times have we scrool on a website with a map and our navigation has been stuck zooming in again and again on the map because we are busy with the mouse wheel?

Leaflet Multimarker Block

This block is perhaps simpler than the previous one, but very powerful. When we add it, we get a map with a default location and there is no way to change it.

Bloque multimarcador sin ningún marcador dentro, con la ubicación inicial por defecto.
Newly added multi-marker block.

But it’s tricky because, when you add a bookmark from the block properties, it asks you with a search engine for the address, city, etc. that you want to add. In addition, we can add the content of the pop-up, which we can format with HTML tags.

Ventana pop-up para añadirle un nuevo marcador al bloque multimarcador.
Pop-up window to add bookmark

You can add as many markers as you want, so as you add them, the map automatically reframes to show them all. Magic.

Bloque multimarcador reencuadrado después de haberle añadido un par de marcadores
Multi-marker block reframed after adding a pair of markers.
Porpiedades del bloque Map Leaflet multimarker
Properties of the multi-marker block.

The properties menu of the block is very simple, as I said, it has the section to add the bookmarks, and be able to edit or delete them.

On the other hand, it has the theme option that we already saw in the single marker block, which allows us to choose the cartographic base and that works exactly the same in both blocks.

Once the insertion of our blocks is finished, we can see the final result, which is quite similar to what we were already seeing during its editing, which is very appreciated, since we do not need to abstract ourselves to imagine what it may be showing while we see something else.

Resultado final de los bloques insertados en el frontend de la web.
Final result of inserted map blocks.

And what happens when you deactivate the plugin?

When you deactivate the plugin, the blocks simply disappear, there’s nothing left, no code or anything. So, one good thing about it is that it doesn’t have any kind of lock-in effect.

This is a good thing, as there are a lot of plugins that leave shortcodes or “uncluttered” content.

What’s missing from this plugin?

Like missing it, it lacks many things, but if we were to add them all, it would cease to make sense and would be something else. Also, keep in mind that its developer does it completely altruistically, for the community, and no one pays him for the time he puts into it.

However, if you ask, it would be very nice to be able to customize the markers, at least in color, which could be very good to adapt them to the corporate color of the website in which we are inserting the map.

Another thing that would be very good is to be able to add the cartographic bases that we would like with the two fields that you already have enabled for it. Although I have my doubts that it didn’t work for me for some strange reason.

And not much else, either. I think it’s a perfect plugin to add a location map to a website for a business with a single location, as well as for a business with multiple locations.

Simple, easy and for the whole family…

Where do I download Map Block Leaflet?

You have this useful plugin in the WordPress repository itself. At the following address:

Map Block Leaflet