{"id":60321,"date":"2026-05-19T13:52:35","date_gmt":"2026-05-19T11:52:35","guid":{"rendered":"https:\/\/jesusyesares.com\/?p=60321"},"modified":"2026-11-27T18:22:13","modified_gmt":"2026-11-27T17:22:13","slug":"featured-maps-and-overview-maps-with-leaflet-map","status":"publish","type":"post","link":"https:\/\/jesusyesares.com\/en\/visualizacion-datos\/featured-maps-and-overview-maps-with-leaflet-map\/","title":{"rendered":"Featured maps and overview maps with Extensions for Leaflet Map"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this post we&#8217;ll see how to geolocate a blog post, and how to show those located posts on a map. A very handy feature for travel blogs, hotel websites and so on.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Previously we saw how to create maps with markers in Leaflet Map. We even saw how to use those markers in a more advanced way and give them a bit of a boost. Now we&#8217;re going one step further with featured maps and overview maps. To do this, let&#8217;s take the following example. Imagine you <strong>have a travel website<\/strong> where <strong>each post is a destination<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It would make sense for each post about a destination to show a map with its location. This is what we call a <strong>featured map.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the other hand, on the page where we show the list or loop with all the destinations, it would make sense to show a map where each one is located with a marker. And, of course, without having to do it by hand, but automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Geolocating posts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To geolocate posts, we need custom fields. They can be the native WordPress ones, or you can use any other plugin such as ACF to create those fields easily.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, to keep things simple, we&#8217;ll use the native WordPress custom fields. Remember that to enable them you need to click the <em>three dots<\/em> at the top right of the WordPress editor, then click <em>Preferences<\/em>, and turn on the <em>Custom fields<\/em> toggle, which you&#8217;ll find near the bottom.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember too that the custom fields are in a metabox at the bottom of the editor, labelled <strong>Meta boxes<\/strong>. Drag that panel up and you&#8217;ll see the custom fields.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep in mind that we&#8217;re in the post for a specific destination, and that destination must have latitude and longitude coordinates, which you can look up in Google Maps or OpenStreetMap. These are the coordinates we&#8217;re going to add as custom fields, so the fields we&#8217;ll define are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>geo_latitude<\/code>: latitude coordinate, always using a dot for decimals. Example: <code>18.90839958580139<\/code><\/li>\n\n\n\n<li><code>geo_longitude<\/code>: longitude coordinate. Example: <code>-70.08178710937501<\/code><\/li>\n\n\n\n<li><code>geo_address<\/code>: the address we&#8217;ll use in the label, in this case <code>Santo Domingo, Rep. Dominicana<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Featured map with <code>[featured-map]<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we have the coordinates linked to our post, it&#8217;s time to show the featured map. I, for example, want to show it at the start of the post, or right after its first paragraph.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In principle, just adding the <code>[featured-map]<\/code> shortcode, with nothing else, would be enough. Of course, you can customize the map with all the parameters this command accepts, but here I&#8217;ve kept it simple so it&#8217;s easier to understand. So in the editor we&#8217;d have the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"815\" height=\"1024\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-01-815x1024.webp\" alt=\"featured map 01\" class=\"wp-image-60124\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-01-815x1024.webp 815w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-01-239x300.webp 239w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-01-768x965.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-01.webp 1200w\" fetchpriority=\"high\" \/><figcaption class=\"wp-element-caption\">Shortcode to insert the featured map, with the custom fields in the Meta boxes panel.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And on the frontend we&#8217;d now see the map published with the location point we defined in the post&#8217;s custom fields.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"1024\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-02-998x1024.webp\" alt=\"featured map 02\" class=\"wp-image-60125\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-02-998x1024.webp 998w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-02-292x300.webp 292w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-02-768x788.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-02.webp 1200w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Resulting map on the frontend. It takes the location data from the custom fields automatically.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">But imagine you want to make the map a bit more elaborate. In the following example we can add a popup, give the marker a color, put a small symbol inside it, and so on.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;featured-map zoom=9 height=200 popup=geo_address marker=leaflet-extramarker markerColor=blue shape=circle icon=fa-house prefix=fa extraClasses=fa-5x iconColor=#98A700&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">featured<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">9<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">height<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">200<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">popup<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">geo_address<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">extramarker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">markerColor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">blue<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">shape<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">circle<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">icon<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">fa<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">house<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">prefix<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">fa<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">extraClasses<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">fa<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9FF\">5<\/span><span style=\"color: #D8DEE9\">x<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">iconColor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\">#98<\/span><span style=\"color: #D8DEE9\">A700<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This way we can see how the marker&#8217;s appearance on the map would change.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"288\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-03-1024x288.webp\" alt=\"featured map 03\" class=\"wp-image-60126\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-03-1024x288.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-03-300x85.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-03-768x216.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-03.webp 1200w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Custom marker showing the location from the custom field.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Another example would be the following, where we repeat the previous shortcode but the coordinates in the custom fields are different.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"876\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-04-1024x876.webp\" alt=\"featured map 04\" class=\"wp-image-60127\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-04-1024x876.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-04-300x257.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-04-768x657.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-04.webp 1200w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Example in another post. The shortcode stays the same; only the data in the metabox changes.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As we can see, the frontend reflects the corresponding result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"938\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-05-1024x938.webp\" alt=\"featured map 05\" class=\"wp-image-60128\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-05-1024x938.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-05-300x275.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-05-768x703.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/featured-map-05.webp 1200w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Resulting map for this second post.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is to build the automatic overview map.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Automatic overview map with <code>[overviewmap]<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now what we want is to show, on an overview map, all the markers of the posts we&#8217;ve created, thanks to having positioned them with the coordinates of those places in the custom fields. We&#8217;ll build this overview map with the <code>[overviewmap]<\/code> command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Optionally you can also add the <code>overview-icon<\/code> attribute, which sets the marker icon for that particular post, and we can show the featured image in the popup with the <code>show_thumbnails=1<\/code> attribute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To create our very, very basic map, we&#8217;d do the following:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n&#91;overviewmap latlngs=codex&#93;\n&#91;hover&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">overviewmap<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">latlngs<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">codex<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">hover<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Notice that, so it knows where to take the coordinates from, we&#8217;ve told it they come from the WordPress geolocation system, that is, the standard WordPress fields we used (<code>geo_latitude<\/code> and <code>geo_longitude<\/code>).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"943\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-01-1024x943.webp\" alt=\"overview 01\" class=\"wp-image-60133\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-01-1024x943.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-01-300x276.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-01-768x707.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-01.webp 1200w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">overview 01<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And finally, it will show us the map we want, with the markers for the posts we&#8217;ve added coordinate fields to.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"833\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-02-1024x833.webp\" alt=\"overview 02\" class=\"wp-image-60134\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-02-1024x833.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-02-300x244.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-02-768x625.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-02.webp 1200w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">overview 02<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">What&#8217;s more, if the posts are organized into categories, we can also filter those categories on the map as follows.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n&#91;overviewmap category=\"Asia\"&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">overviewmap<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">category<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Asia<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Or we could <strong>filter by a list of categories<\/strong>:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n&#91;overviewmap category=\"Asia,\u00c1frica\"&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">overviewmap<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">category<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Asia,\u00c1frica<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">And if we add <code>AND<\/code> at the start, it will only show <strong>posts that belong to all the categories in the list at once<\/strong>, as if we were running an SQL query:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n&#91;overviewmap category=\"AND,aventura,historia\"&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">overviewmap<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">category<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">AND,aventura,historia<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If we now wanted to <strong>use a featured image<\/strong> and <strong>add a link to the category<\/strong>:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n&#91;overviewmap show_thumbnails thumbsize=\"100,100\" show_category newtab&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">overviewmap<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">show_thumbnails<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">thumbsize<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">100,100<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">show_category<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">newtab<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Imagine the map doesn&#8217;t show the markers you expect. In that case, the <code>debug<\/code> parameter will generate a table with all the posts the plugin is reading and their custom fields:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n&#91;overviewmap debug&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">overviewmap<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">debug<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This lets you see exactly what data the plugin finds in each post and where the error is. Something like what you can see below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"426\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-03-1024x426.webp\" alt=\"overview 03\" class=\"wp-image-60135\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-03-1024x426.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-03-300x125.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-03-768x319.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/overview-03.webp 1200w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">overview 03<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Linking to markers with <code>[targetmarker]<\/code> and <code>[targetlink]<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now imagine you want to create a link anywhere on your site that, when clicked, takes the user to a map and automatically opens the popup of a specific marker.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">On the same page<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the link and the map are on the same page, you only need to add <code>[zoomhomemap]<\/code> to the map and then create the link with <code>[targetlink]<\/code>. It&#8217;s important for the marker to have a <code>title<\/code>, since that&#8217;s the connection we&#8217;ll use. So we can create this map:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880 title=\"Alhambra\"&#93;Alhambra&#91;\/leaflet-marker&#93;\n&#91;leaflet-marker lat=37.1767 lng=-3.5994 title=\"Catedral de Granada\"&#93;Catedral de Granada&#91;\/leaflet-marker&#93;\n&#91;leaflet-marker lat=37.1771 lng=-3.5902 title=\"Museo de la Alhambra\"&#93;Museo de la Alhambra&#91;\/leaflet-marker&#93;\n\n&#91;zoomhomemap&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.1760<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.5880<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Alhambra<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><span style=\"color: #D8DEE9\">Alhambra<\/span><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.1767<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.5994<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Catedral de Granada<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><span style=\"color: #D8DEE9\">Catedral<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">de<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Granada<\/span><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.1771<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.5902<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Museo de la Alhambra<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><span style=\"color: #D8DEE9\">Museo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">de<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">la<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Alhambra<\/span><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">zoomhomemap<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">And anywhere in the text on the same page:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;targetlink title=\"Alhambra\" linktext=\"Ver la Alhambra en el mapa\"&#93;\n&#91;targetlink title=\"Catedral de Granada\" linktext=\"Ver la Catedral en el mapa\"&#93;\n&#91;targetlink title=\"Museo de la Alhambra\" linktext=\"Ver el Museo de la Alhambra en el mapa\"&#93;\n&#91;targetlink title=\"Jardines del Generalife\" linktext=\"Ver los Jardines del Generalife en el mapa\"&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">targetlink<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Alhambra<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linktext<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Ver la Alhambra en el mapa<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">targetlink<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Catedral de Granada<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linktext<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Ver la Catedral en el mapa<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">targetlink<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Museo de la Alhambra<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linktext<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Ver el Museo de la Alhambra en el mapa<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">targetlink<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Jardines del Generalife<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linktext<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Ver los Jardines del Generalife en el mapa<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see, it behaves exactly like an anchor within a web page, except that it takes us to a specific marker on the map and opens its popup.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2230\" height=\"1002\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/05\/enlace-marcadores.gif\" alt=\"marker links\" class=\"wp-image-60145\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">How the marker link behaves<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">On different pages<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">But if the link is on one page and the map on another, the destination map needs the <code>[zoomhomemap]<\/code> and <code>[targetmarker]<\/code> shortcodes:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;leaflet-map fitbounds&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880 title=\"Alhambra\"&#93;Alhambra&#91;\/leaflet-marker&#93;\n&#91;leaflet-marker lat=37.1767 lng=-3.5994 title=\"Catedral de Granada\"&#93;Catedral de Granada&#91;\/leaflet-marker&#93;\n\n&#91;zoomhomemap&#93;\n&#91;targetmarker&#93;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">map<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fitbounds<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.1760<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.5880<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Alhambra<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><span style=\"color: #D8DEE9\">Alhambra<\/span><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.1767<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.5994<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Catedral de Granada<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><span style=\"color: #D8DEE9\">Catedral<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">de<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Granada<\/span><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">leaflet<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">marker<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">zoomhomemap<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">targetmarker<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">And on the source page:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;targetlink title=\"Alhambra\" link=\"https:\/\/tudominio.com\/mapa-granada\/\" linktext=\"Ver la Alhambra en el mapa\"&#93;\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">targetlink<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">title<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Alhambra<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">link<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/tudominio.com\/mapa-granada\/<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linktext<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Ver la Alhambra en el mapa<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">From an external site<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s take it a step further. What if we want to link to the map from another site? For that we&#8217;ll use a query string directly in the URL, with no shortcode:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>https:\/\/tudominio.com\/mapa-granada\/?lat=37.1760&amp;lng=-3.5880\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">https<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #616E88\">\/\/tudominio.com\/mapa-granada\/?lat=37.1760&amp;lng=-3.5880<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>zoom<\/code> parameter is optional: <code>?lat=37.1760&amp;amp;lng=-3.5880&amp;amp;zoom=16<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">It also works with GeoJSON<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">And if you use GeoJSON, can you use it too? Yes, <code>[targetlink]<\/code> also works with GeoJSON. Look:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;targetlink property=name value=\"Alhambra\" link=\"https:\/\/tudominio.com\/mapa-granada\/\" linktext=\"Ver en el mapa\"&#93;\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;<\/span><span style=\"color: #D8DEE9\">targetlink<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">property<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">name<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">value<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Alhambra<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">link<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/tudominio.com\/mapa-granada\/<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linktext<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Ver en el mapa<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u26a0\ufe0f Note that the order of the shortcodes on the destination map is fixed: <code>[cluster]<\/code> \u2192 <code>[zoomhomemap]<\/code> \u2192 <code>[targetmarker]<\/code>. If you have several maps on the same page, <code>[targetmarker]<\/code> can only appear once and must be the last shortcode.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see, Extensions for Leaflet Map offers amazing possibilities when working with dynamic markers, to the point of making them behave like links to web pages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want more information, I recommend exploring the examples in the Extensions for Leaflet Map documentation, which seem almost endless.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/leafext.de\/en\/doku\/examples\">https:\/\/leafext.de\/en\/doku\/examples<\/a><\/p>\n<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:312,&quot;href&quot;:&quot;https:\\\/\\\/leafext.de\\\/en\\\/doku\\\/examples&quot;,&quot;archived_href&quot;:&quot;&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]\"><\/span>","protected":false},"excerpt":{"rendered":"<p>In this post we&#8217;ll see how to geolocate a blog post, and how to show those located posts on a map. A very handy feature for travel blogs, hotel websites and so on. Previously we saw how to create maps with markers in Leaflet Map. We even saw how to use those markers in a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":60334,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_ayudawp_aiss_exclude":false,"_ayudawp_aiss_exclude_summary":false,"_ayudawp_aiss_summary":"Now what we want is to show, on an overview map, all the markers of the posts we've created, thanks to having positioned them with the coordinates of those places in the custom fields. If the link and the map are on the same page, you only need to add to the map and then create the link with. But if the link is on one page and the map on another, the destination map needs the and shortcodes:.","_ayudawp_aiss_summary_provider":"extractive","_ayudawp_aiss_summary_hash":"e0a2a2d76cc76be6a47fe88d2469072fcb68075c","footnotes":""},"categories":[338],"tags":[339,340,341],"class_list":["post-60321","post","type-post","status-publish","format-standard","has-post-thumbnail","category-visualizacion-datos","tag-leaflet-map","tag-mapas","tag-wordpress"],"openstation_lock":null,"openstation_contributors":[],"openstation_attached_media":[60334,60124,60125,60126,60127,60128,60133,60134,60135,60145,60322,60323,60324,60325,60326,60327,60328,60329,60333],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/posts\/60321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/comments?post=60321"}],"version-history":[{"count":3,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/posts\/60321\/revisions"}],"predecessor-version":[{"id":60390,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/posts\/60321\/revisions\/60390"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/media\/60334"}],"wp:attachment":[{"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/media?parent=60321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/categories?post=60321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/tags?post=60321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}