Map Block Leaflet, by Jesús Olazagoitia

· Por

Map Block Leaflet is a map plugin for WordPress developed by Jesús Olazagoitia (Goiblas). A developer member of the WordPress community of Logroño, which serves 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 is a plugin that puts at our disposal two blocks. One of map with a marker (Map Leaflet), and another also of 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 is accompanied by a search engine in which we can enter the city or the place or address that we want to show on the map, and allows us to resize the map with a handle in a very simple way as well as how to relocate the marker where we want.

Bloque de un solo marcador del plugin Map Block Leaflet con una búsqueda de ciudad.
A 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 skate a bit, but I am afraid that this is not the responsibility of the developer, but of the search base in which they are located.

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

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

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

The next option that we can configure is the theme of the cartographic base, where we can currently choose between eight designs, although one did not work correctly because they have removed it.

When adding the option to edit the URL of the cartographic base, I tried to add some cartographic base of those that are available on Github and other sites, but I have not been able to change it.

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

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 that we have available are the position fields (with geographical coordinates) and the 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 scroll of the mouse. How many times have we done scrool on a website with a map and we have been stuck in navigation zooming again and again inside the map because we are involved with the mouse wheel?

Multimarker Leaflet 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 has a trick because, when adding a bookmark from the properties of the block, it asks us with a search engine for the address, city, etc. that we 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

We can add as many markers as we want, so that, as we add them, the map is automatically reframed 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 couple of markers.
Porpiedades del bloque Map Leaflet multimarker
Properties of the multi-marker block.

The menu of properties 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 block of a single marker, 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 edition, which is very appreciated, since we do not need to abstract ourselves to imagine what it can be while we see something else.

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

And what happens when you disable the plugin?

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

This is good, as there are many plugins that leave shortcodes or “unsquarnished” content.

What is missing from this plugin?

As it lacks many things, but if we added them all, it would cease to make sense and would be something else. In addition, you have to keep in mind that your developer does it completely altruistically, for the community, and nobody pays you for the time you spend on it.

However, to ask, it would be very good to be able to customize the markers, at least color, which could go very well to adapt them to the corporate color of the web 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 has not worked for me for some strange reason.

And not much else either. I think it is a perfect plugin to add a location map on a website for both a business with a single location, and for a business with multiple locations.

Simple, easy and for the whole family…

Where do I download Map Block Leaflet?

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

Map Block Leaflet

Leave a Comment