{"id":60414,"date":"2026-04-23T07:47:00","date_gmt":"2026-04-23T05:47:00","guid":{"rendered":"https:\/\/jesusyesares.com\/?p=60414"},"modified":"2026-11-27T18:22:17","modified_gmt":"2026-11-27T17:22:17","slug":"creating-map-markers-with-leaflet-map","status":"publish","type":"post","link":"https:\/\/jesusyesares.com\/en\/data-visualization\/creating-map-markers-with-leaflet-map\/","title":{"rendered":"Creating map markers with Leaflet Map"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <code>[leaflet-marker]<\/code> shortcode we saw <a href=\"https:\/\/jesusyesares.com\/en\/visualizacion-datos\/how-to-install-and-set-up-leaflet-map\/\" data-type=\"post\" data-id=\"60036\">in the previous post<\/a> is the starting point, but Leaflet Map offers quite a few more options to <strong>customize the markers<\/strong> on your map: changing the icon, adding tooltips, controlling how the popup behaves, or using markers with Font Awesome icons thanks to the companion plugin <a href=\"https:\/\/wordpress.org\/plugins\/extensions-leaflet-map\/\" target=\"_blank\" rel=\"noreferrer noopener\">Extensions for Leaflet Map<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here we&#8217;ll go over what you can do with markers in Leaflet Map, with examples so you can clearly understand how to work with them on your maps. We&#8217;ll leave the more advanced features for a future post: clustering, marker lists, automatic overview maps and more.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">If you don&#8217;t have Leaflet Map installed, start here: <a href=\"https:\/\/jesusyesares.com\/en\/visualizacion-datos\/how-to-install-and-set-up-leaflet-map\/\">How to install and set up Leaflet Map from scratch<\/a>.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">The native marker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As we saw in the previous post, adding a basic marker to a base map made with Leaflet Map is very easy. Basically, after the base map shortcode <code>[leaflet-map]<\/code> we add the marker shortcode with the coordinates and, if we want, we can include text for the marker&#8217;s popup:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880&#93;Alhambra&#91;\/leaflet-marker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">&#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><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This places a standard blue pin on the map with a popup that shows the text &#8220;Alhambra&#8221; when clicked. From here, let&#8217;s see how to improve it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"255\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-1024x255.webp\" alt=\"Native marker in Leaflet Map\" class=\"wp-image-60067\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-1024x255.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-300x75.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-768x191.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-1536x383.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-2048x511.webp 2048w\" fetchpriority=\"high\" \/><figcaption class=\"wp-element-caption\">Native marker in Leaflet Map<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Tooltip with <code>title<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>title<\/code> parameter shows a text label when you hover over the marker, without needing to click:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880 title=\"Alhambra\"&#93;Monumento m\u00e1s visitado de Espa\u00f1a&#91;\/leaflet-marker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">Monumento<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">m\u00e1s<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">visitado<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">de<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">Espa\u00f1a<\/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><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"257\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-tooltip-1024x257.webp\" alt=\"Native marker in Leaflet Map with tooltip\" class=\"wp-image-60069\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-tooltip-1024x257.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-tooltip-300x75.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-tooltip-768x193.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-tooltip-1536x385.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-tooltip-2048x514.webp 2048w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Native marker with tooltip<\/figcaption><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udca1 <code>title<\/code> is an important parameter beyond the tooltip: you&#8217;ll need it if you later use <code>[listmarker]<\/code> or <code>[targetmarker]<\/code> from the Extensions for Leaflet Map plugin. If you don&#8217;t include the <code>title<\/code>, those modules won&#8217;t be able to identify the marker.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Popup open by default with <code>visible<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you want a marker&#8217;s popup to appear open as soon as the map loads, without the user having to click, you&#8217;ll need to use the <code>visible<\/code> parameter:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880 visible=1&#93;Alhambra&#91;\/leaflet-marker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">visible<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">1<\/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><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"256\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-popup-visible-por-defecto-1024x256.webp\" alt=\"native marker in leaflet map with popup visible by default\" class=\"wp-image-60070\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-popup-visible-por-defecto-1024x256.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-popup-visible-por-defecto-300x75.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-popup-visible-por-defecto-768x192.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-popup-visible-por-defecto-1536x384.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-nativo-en-leaflet-map-con-popup-visible-por-defecto-2048x512.webp 2048w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Native marker with popup visible by default<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is very useful on detail pages about a specific place, where there may be other markers but that particular marker is the star of the map.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Draggable marker with <code>draggable<\/code><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now imagine we want to be able to drag the marker around the map ourselves and move it somewhere else. For that, we&#8217;ll use the <code>draggable<\/code> parameter:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880 draggable=1&#93;Arrastra este marcador&#91;\/leaflet-marker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">draggable<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><span style=\"color: #D8DEE9\">Arrastra<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">este<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">marcador<\/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><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2128\" height=\"528\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcador-arrastrable-con-leaflet.gif\" alt=\"draggable marker with leaflet\" class=\"wp-image-60071\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Draggable marker<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To be honest, it&#8217;s rarely used on production maps, but it could be useful if you&#8217;re building interactive tools or want to demonstrate coordinates in a tutorial.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">HTML in the popup<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">So far we&#8217;ve been adding plain text to the markers&#8217; content, but you may be interested to know that it accepts basic HTML:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880&#93;\n&lt;b>Alhambra&lt;\/b>&lt;br>\nSiglo XIII \u00b7 &lt;a href=\"https:\/\/www.alhambra-patronato.es\" target=\"_blank\">Web oficial&lt;\/a>\n&#91;\/leaflet-marker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;b&gt;<\/span><span style=\"color: #D8DEE9FF\">Alhambra<\/span><span style=\"color: #81A1C1\">&lt;\/b&gt;&lt;br&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">Siglo XIII \u00b7 <\/span><span style=\"color: #81A1C1\">&lt;a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">href<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/www.alhambra-patronato.es<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">target<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">_blank<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #D8DEE9FF\">Web oficial<\/span><span style=\"color: #81A1C1\">&lt;\/a&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;\/leaflet-marker&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Custom icon with your own image<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Leaflet Map&#8217;s standard blue pin is fine, but we should be able to use other options, and one of them is replacing it with any image. The parameter for this is <code>iconUrl<\/code>:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880 iconUrl=\"https:\/\/tudominio.com\/wp-content\/uploads\/icono-monumento.png\" iconSize=\"32,32\" iconAnchor=\"16,32\" popupAnchor=\"0,-32\"&#93;Alhambra&#91;\/leaflet-marker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">iconUrl<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/tudominio.com\/wp-content\/uploads\/icono-monumento.png<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">iconSize<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">32,32<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">iconAnchor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">16,32<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">popupAnchor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">0,-32<\/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><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/icono-personalizado-con-imagen-propia-en-leaflet-1024x258.webp\" alt=\"custom icon with your own image in leaflet\" class=\"wp-image-60072\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/icono-personalizado-con-imagen-propia-en-leaflet-1024x258.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/icono-personalizado-con-imagen-propia-en-leaflet-300x76.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/icono-personalizado-con-imagen-propia-en-leaflet-768x194.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/icono-personalizado-con-imagen-propia-en-leaflet-1536x388.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/icono-personalizado-con-imagen-propia-en-leaflet-2048x517.webp 2048w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Custom icon with your own image<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s important to clarify the size and position parameters here, so we understand how to position the image correctly and make it behave properly without doing strange things:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>iconSize<\/code>: the size of the icon in pixels, in <code>\"width,height\"<\/code> format. For example <code>\"32,32\"<\/code> for a 32px square icon.<\/li>\n\n\n\n<li><code>iconAnchor<\/code>: the point of the icon that is anchored to the geographic coordinate, in <code>\"x,y\"<\/code> format. For a 32\u00d732 icon with the tip at the bottom, the correct value is <code>\"16,32\"<\/code>: horizontal center, bottom edge.<\/li>\n\n\n\n<li><code>popupAnchor<\/code>: the position of the popup relative to the icon, in <code>\"x,y\"<\/code> format. With <code>\"0,-32\"<\/code> the popup appears above the icon and won&#8217;t overlap the marker.<\/li>\n\n\n\n<li><code>tooltipAnchor<\/code>: the same as <code>popupAnchor<\/code> but for the tooltip.<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\ud83d\udca1 The <code>iconAnchor<\/code> value is the most confusing one. Think of it this way: it&#8217;s the pixel of the image that will line up exactly with the point on the map. If your icon is a pushpin with the tip at the bottom, that pixel is the horizontal center of the image&#8217;s bottom row.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Adding a shadow to the marker<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We can add a shadow to the marker. To do this we need an image of the shadow, since it isn&#8217;t an effect as such, and we&#8217;ll have to use a small workaround to create that sense of depth. In the following example, look at the <code>shadowURL<\/code> parameter, which defines the shadow image, <code>shadowSize<\/code>, which sets its size, and <code>shadowAnchor<\/code>, which sets the shadow&#8217;s anchor point, separate from that of the image itself:<\/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-marker lat=37.1760 lng=-3.5880 iconUrl=\"https:\/\/tudominio.com\/icono.png\" iconSize=\"32,32\" iconAnchor=\"16,32\" shadowUrl=\"https:\/\/tudominio.com\/sombra.png\" shadowSize=\"40,20\" shadowAnchor=\"12,20\"&#93;Alhambra&#91;\/leaflet-marker&#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\">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\">iconUrl<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/tudominio.com\/icono.png<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">iconSize<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">32,32<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">iconAnchor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">16,32<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">shadowUrl<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/tudominio.com\/sombra.png<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">shadowSize<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">40,20<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">shadowAnchor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">12,20<\/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><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"257\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/anadir-sombra-al-marcador-en-leaflet-1024x257.webp\" alt=\"adding a shadow to the marker in leaflet\" class=\"wp-image-60073\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/anadir-sombra-al-marcador-en-leaflet-1024x257.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/anadir-sombra-al-marcador-en-leaflet-300x75.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/anadir-sombra-al-marcador-en-leaflet-768x193.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/anadir-sombra-al-marcador-en-leaflet-1536x385.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/anadir-sombra-al-marcador-en-leaflet-2048x513.webp 2048w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Adding a shadow to the marker<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Several markers with different icons<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s very common to have different types of markers on the same map. With custom icons you can tell them apart visually:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-marker lat=37.1760 lng=-3.5880 iconUrl=\"https:\/\/tudominio.com\/icono-monumento.png\" iconSize=\"32,32\" iconAnchor=\"16,32\"&#93;&lt;b>Alhambra&lt;\/b>&lt;br>Monumento&#91;\/leaflet-marker&#93;\n\n&#91;leaflet-marker lat=37.1767 lng=-3.5994 iconUrl=\"https:\/\/tudominio.com\/icono-iglesia.png\" iconSize=\"32,32\" iconAnchor=\"16,32\"&#93;&lt;b>Catedral de Granada&lt;\/b>&lt;br>Iglesia&#91;\/leaflet-marker&#93;\n\n&#91;leaflet-marker lat=37.1771 lng=-3.5902 iconUrl=\"https:\/\/tudominio.com\/icono-museo.png\" iconSize=\"32,32\" iconAnchor=\"16,32\"&#93;&lt;b>Museo de la Alhambra&lt;\/b>&lt;br>Museo&#91;\/leaflet-marker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">iconUrl<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">https:\/\/tudominio.com\/icono-monumento.png<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">iconSize<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">32,32<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">iconAnchor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">16,32<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9\">b<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #D8DEE9\">Alhambra<\/span><span style=\"color: #81A1C1\">&lt;\/<\/span><span style=\"color: #D8DEE9\">b<\/span><span style=\"color: #81A1C1\">&gt;&lt;br&gt;<\/span><span style=\"color: #D8DEE9FF\">Monumento&#91;\/leaflet-marker&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;leaflet-marker lat=37.1767 lng=-3.5994 iconUrl=&quot;https:\/\/tudominio.com\/icono-iglesia.png&quot; iconSize=&quot;32,32&quot; iconAnchor=&quot;16,32&quot;&#93;<\/span><span style=\"color: #81A1C1\">&lt;b&gt;<\/span><span style=\"color: #D8DEE9FF\">Catedral de Granada<\/span><span style=\"color: #81A1C1\">&lt;\/b&gt;&lt;br&gt;<\/span><span style=\"color: #D8DEE9FF\">Iglesia&#91;\/leaflet-marker&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;leaflet-marker lat=37.1771 lng=-3.5902 iconUrl=&quot;https:\/\/tudominio.com\/icono-museo.png&quot; iconSize=&quot;32,32&quot; iconAnchor=&quot;16,32&quot;&#93;<\/span><span style=\"color: #81A1C1\">&lt;b&gt;<\/span><span style=\"color: #D8DEE9FF\">Museo de la Alhambra<\/span><span style=\"color: #81A1C1\">&lt;\/b&gt;&lt;br&gt;<\/span><span style=\"color: #D8DEE9FF\">Museo&#91;\/leaflet-marker&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"256\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-1024x256.webp\" alt=\"several markers with different icons\" class=\"wp-image-60074\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-1024x256.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-300x75.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-768x192.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-1536x385.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-2048x513.webp 2048w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Several markers with different icons<\/figcaption><\/figure>\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 This approach works well with a few markers. But if you have lots of points in different categories, the <code>[geojsonmarker]<\/code> module from Extensions for Leaflet Map is much more efficient. We&#8217;ll look at that in the next post.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Markers with Font Awesome icons<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the previous option falls short for you, the <a href=\"https:\/\/wordpress.org\/plugins\/extensions-leaflet-map\/\" target=\"_blank\" rel=\"noreferrer noopener\">Extensions for Leaflet Map<\/a> plugin lets us liven up our markers a bit, since it lets us tell them apart more easily by adding <a href=\"https:\/\/fontawesome.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Font Awesome<\/a> icons. This gives us markers with vector icons without having to prepare PNG images.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Extensions for Leaflet Map includes the <code>[leaflet-extramarker]<\/code> shortcode, based on the <a href=\"https:\/\/github.com\/coryasilva\/Leaflet.ExtraMarkers\" target=\"_blank\" rel=\"noreferrer noopener\">Leaflet.ExtraMarkers<\/a> library.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing you need to do is install Extensions for Leaflet Map:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to <strong>Plugins &gt; Add New<\/strong>.<\/li>\n\n\n\n<li>Search for <strong><a href=\"https:\/\/wordpress.org\/plugins\/extensions-leaflet-map\/\">Extensions for Leaflet Map<\/a><\/strong>.<\/li>\n\n\n\n<li>Install and activate it.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s look at a basic example where we create a red marker (<code>markerColor=\"red\"<\/code>) and, instead of the usual marker shape, give it a circular one (<code>shape=\"circle\"<\/code>). We also add an icon with a museum symbol (<code>icon=\"fa-landmark\"<\/code>). Note that you also need to add <code>prefix=\"fa\"<\/code>.<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-extramarker lat=37.1760 lng=-3.5880 markerColor=\"red\" shape=\"circle\" icon=\"fa-landmark\" prefix=\"fa\" title=\"Alhambra\"&#93;Alhambra&#91;\/leaflet-extramarker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">extramarker<\/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\">markerColor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">red<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">shape<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">circle<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">icon<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">fa-landmark<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">prefix<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">fa<\/span><span style=\"color: #ECEFF4\">&quot;<\/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\">extramarker<\/span><span style=\"color: #D8DEE9FF\">&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"254\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"http:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcadores-con-iconos-de-font-awesome-1024x254.webp\" alt=\"markers with font awesome icons\" class=\"wp-image-60076\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcadores-con-iconos-de-font-awesome-1024x254.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcadores-con-iconos-de-font-awesome-300x74.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcadores-con-iconos-de-font-awesome-768x191.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcadores-con-iconos-de-font-awesome-1536x381.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/marcadores-con-iconos-de-font-awesome-2048x508.webp 2048w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Marker with a Font Awesome icon<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This way we can add several markers that differ in both color and icon:<\/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 zoom=13 lat=37.18 lng=-3.60&#93;\n\n&#91;leaflet-extramarker lat=37.1760 lng=-3.5880 markerColor=\"red\" shape=\"circle\" icon=\"fa-landmark\" prefix=\"fa\" title=\"Alhambra\"&#93;&lt;b>Alhambra&lt;\/b>&lt;br>Monumento&#91;\/leaflet-extramarker&#93;\n\n&#91;leaflet-extramarker lat=37.1767 lng=-3.5994 markerColor=\"blue\" shape=\"square\" icon=\"fa-church\" prefix=\"fa\" title=\"Catedral de Granada\"&#93;&lt;b>Catedral de Granada&lt;\/b>&lt;br>Iglesia&#91;\/leaflet-extramarker&#93;\n\n&#91;leaflet-extramarker lat=37.1771 lng=-3.5902 markerColor=\"green\" shape=\"circle\" icon=\"fa-building-columns\" prefix=\"fa\" title=\"Museo de la Alhambra\"&#93;&lt;b>Museo de la Alhambra&lt;\/b>&lt;br>Museo&#91;\/leaflet-extramarker&#93;\n\n&#91;leaflet-extramarker lat=37.1804 lng=-3.5862 markerColor=\"orange\" shape=\"star\" icon=\"fa-tree\" prefix=\"fa\" title=\"Jardines del Generalife\"&#93;&lt;b>Jardines del Generalife&lt;\/b>&lt;br>Jard\u00edn&#91;\/leaflet-extramarker&#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\">zoom<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">13<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lat<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">37.18<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">lng<\/span><span style=\"color: #81A1C1\">=-<\/span><span style=\"color: #B48EAD\">3.60<\/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\">extramarker<\/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\">markerColor<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">red<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">shape<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">circle<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">icon<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">fa-landmark<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">prefix<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">fa<\/span><span style=\"color: #ECEFF4\">&quot;<\/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: #81A1C1\">&lt;<\/span><span style=\"color: #D8DEE9\">b<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #D8DEE9\">Alhambra<\/span><span style=\"color: #81A1C1\">&lt;\/<\/span><span style=\"color: #D8DEE9\">b<\/span><span style=\"color: #81A1C1\">&gt;&lt;br&gt;<\/span><span style=\"color: #D8DEE9FF\">Monumento&#91;\/leaflet-extramarker&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;leaflet-extramarker lat=37.1767 lng=-3.5994 markerColor=&quot;blue&quot; shape=&quot;square&quot; icon=&quot;fa-church&quot; prefix=&quot;fa&quot; title=&quot;Catedral de Granada&quot;&#93;<\/span><span style=\"color: #81A1C1\">&lt;b&gt;<\/span><span style=\"color: #D8DEE9FF\">Catedral de Granada<\/span><span style=\"color: #81A1C1\">&lt;\/b&gt;&lt;br&gt;<\/span><span style=\"color: #D8DEE9FF\">Iglesia&#91;\/leaflet-extramarker&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;leaflet-extramarker lat=37.1771 lng=-3.5902 markerColor=&quot;green&quot; shape=&quot;circle&quot; icon=&quot;fa-building-columns&quot; prefix=&quot;fa&quot; title=&quot;Museo de la Alhambra&quot;&#93;<\/span><span style=\"color: #81A1C1\">&lt;b&gt;<\/span><span style=\"color: #D8DEE9FF\">Museo de la Alhambra<\/span><span style=\"color: #81A1C1\">&lt;\/b&gt;&lt;br&gt;<\/span><span style=\"color: #D8DEE9FF\">Museo&#91;\/leaflet-extramarker&#93;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;leaflet-extramarker lat=37.1804 lng=-3.5862 markerColor=&quot;orange&quot; shape=&quot;star&quot; icon=&quot;fa-tree&quot; prefix=&quot;fa&quot; title=&quot;Jardines del Generalife&quot;&#93;<\/span><span style=\"color: #81A1C1\">&lt;b&gt;<\/span><span style=\"color: #D8DEE9FF\">Jardines del Generalife<\/span><span style=\"color: #81A1C1\">&lt;\/b&gt;&lt;br&gt;<\/span><span style=\"color: #D8DEE9FF\">Jard\u00edn&#91;\/leaflet-extramarker&#93;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" src=\"http:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-favicon-1024x258.webp\" alt=\"Several markers with different icons and shapes\" class=\"wp-image-60075\" srcset=\"https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-favicon-1024x258.webp 1024w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-favicon-300x76.webp 300w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-favicon-768x194.webp 768w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-favicon-1536x388.webp 1536w, https:\/\/jesusyesares.com\/wp-content\/uploads\/2026\/04\/varios-marcadores-con-iconos-diferentes-favicon-2048x517.webp 2048w\" fetchpriority=\"low\" \/><figcaption class=\"wp-element-caption\">Several markers with different icons and shapes<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Several colors are available for <code>markerColor<\/code>: <code>red<\/code>, <code>blue<\/code>, <code>green<\/code>, <code>orange<\/code>, <code>purple<\/code>, <code>darkred<\/code>, <code>darkblue<\/code>, <code>darkgreen<\/code>, <code>cadetblue<\/code>, <code>white<\/code>, <code>black<\/code>, <code>gray<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As for the shapes available for <code>shape<\/code>, we have: <code>circle<\/code>, <code>square<\/code>, <code>star<\/code>, <code>penta<\/code><\/p>\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 If the <code>title<\/code> has more than one word, always put it in quotes: <code>title=\"Jardines del Generalife\"<\/code>. Without quotes, the shortcode only processes the first word and the rest disappears.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">When to use each type of marker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s worth knowing when to use each marker so you don&#8217;t waste resources or use a sledgehammer to crack a nut. So:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For <strong>simple maps with few points<\/strong> where appearance isn&#8217;t a priority and you don&#8217;t need extra dependencies, use the <strong>native <code>[leaflet-marker]<\/code> marker with the standard pin<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you have your own icons designed specifically for your project and want full control over the image, I recommend the <strong>native <code>[leaflet-marker]<\/code> marker with <code>iconUrl<\/code><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you need to tell types of places apart visually with colors and shapes, without preparing images, use <strong><code>[leaflet-extramarker]<\/code><\/strong>. It requires the additional Extensions for Leaflet Map plugin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In an upcoming post we&#8217;ll look at the advanced features of Extensions for Leaflet Map: clustering for maps with many markers, marker lists, markers from GeoJSON files and automatic overview maps built from your WordPress content.<\/p>\n<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:324,&quot;href&quot;:&quot;https:\\\/\\\/wordpress.org\\\/plugins\\\/extensions-leaflet-map&quot;,&quot;archived_href&quot;:&quot;https:\\\/\\\/web-wp.archive.org\\\/web\\\/20261104192422\\\/https:\\\/\\\/wordpress.org\\\/plugins\\\/extensions-leaflet-map\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-11-27 17:24:01&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-11-27T17:24:01+00:00&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:308,&quot;href&quot;:&quot;https:\\\/\\\/fontawesome.com&quot;,&quot;archived_href&quot;:&quot;https:\\\/\\\/web-wp.archive.org\\\/web\\\/20260423055838\\\/https:\\\/\\\/fontawesome.com\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-08-10 14:22:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-08-20 03:58:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-09-01 08:05:20&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-09-01T08:05:20+00:00&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:309,&quot;href&quot;:&quot;https:\\\/\\\/github.com\\\/coryasilva\\\/Leaflet.ExtraMarkers&quot;,&quot;archived_href&quot;:&quot;https:\\\/\\\/web-wp.archive.org\\\/web\\\/20260423055841\\\/https:\\\/\\\/github.com\\\/coryasilva\\\/Leaflet.ExtraMarkers&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-08-10 14:22:27&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-08-20 03:58:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-09-01 08:05:21&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-09-01T08:05:21+00:00&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span>","protected":false},"excerpt":{"rendered":"<p>The [leaflet-marker] shortcode we saw in the previous post is the starting point, but Leaflet Map offers quite a few more options to customize the markers on your map: changing the icon, adding tooltips, controlling how the popup behaves, or using markers with Font Awesome icons thanks to the companion plugin Extensions for Leaflet Map. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":60424,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_ayudawp_aiss_exclude":false,"_ayudawp_aiss_exclude_summary":false,"_ayudawp_aiss_summary":"The shortcode we saw in the previous post is the starting point, but Leaflet Map offers quite a few more options to customize the markers on your map: changing the icon, adding tooltips, controlling how the popup behaves, or using markers with Font Awesome icons thanks to the companion plugin Extensions for Leaflet Map. If you don't have Leaflet Map installed, start here: How to install and set up Leaflet Map from scratch. As we saw in the previous post, adding a basic marker to a base map made with Leaflet Map is very easy.","_ayudawp_aiss_summary_provider":"extractive","_ayudawp_aiss_summary_hash":"e9c2bcc46cd9204bd37d713782adc89c46b76142","_native_aeo_pack_title":"Creating map markers with Leaflet Map","_native_aeo_pack_description":"The options you have for adding markers with Leaflet Map and other extensions to design professional maps on your website.","_native_aeo_pack_og_title":"Marcadores en mapas con Leaflet Map","_native_aeo_pack_og_description":"Aqu\u00ed ver\u00e1s las posibilidades que tienes para a\u00f1adir marcadores con Leaflet Map y otras extensiones, para dise\u00f1ar mapas profesionales en tu web.","_native_aeo_pack_canonical":"","_native_aeo_pack_og_image":60424,"_native_aeo_pack_noindex":"","_native_aeo_pack_excluded":"","_native_aeo_pack_nofollow":"","_native_aeo_pack_excluded_nofollow":"","_native_aeo_pack_sitemap_excluded":"","_native_aeo_pack_noimageindex":"","_native_aeo_pack_nosnippet":"","_native_aeo_pack_excluded_noimageindex":"","_native_aeo_pack_excluded_nosnippet":"","_native_aeo_pack_llms_exclude":"","_native_aeo_pack_schema_type":"","_native_aeo_pack_schema_entity":"","footnotes":""},"categories":[338],"tags":[339,340,341],"class_list":["post-60414","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-visualization","tag-leaflet-map","tag-mapas","tag-wordpress"],"openstation_lock":null,"openstation_contributors":[],"openstation_attached_media":[60424,60067,60069,60070,60071,60072,60073,60074,60076,60075,60036,60415,60416,60417,60418,60419,60420,60421],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/posts\/60414","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=60414"}],"version-history":[{"count":3,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/posts\/60414\/revisions"}],"predecessor-version":[{"id":60545,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/posts\/60414\/revisions\/60545"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/media\/60424"}],"wp:attachment":[{"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/media?parent=60414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/categories?post=60414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jesusyesares.com\/en\/wp-json\/wp\/v2\/tags?post=60414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}