{"id":333007,"date":"2026-07-06T12:01:41","date_gmt":"2026-07-06T12:01:41","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/blocks-for-leaflet-map\/"},"modified":"2026-07-06T12:01:06","modified_gmt":"2026-07-06T12:01:06","slug":"cartoblocks-for-leaflet","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/cartoblocks-for-leaflet\/","author":14405179,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.4","stable_tag":"1.2.4","tested":"7.0","requires":"6.8","requires_php":"7.4","requires_plugins":null,"header_name":"CartoBlocks for Leaflet","header_author":"Jes\u00fas Yesares Garc\u00eda","header_description":"A dynamic Gutenberg block that wraps the Leaflet Map plugin shortcodes. Requires the \"Leaflet Map\" plugin to be installed and active.","assets_banners_color":"b2ad9b","last_updated":"2026-07-06 12:01:06","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/jesusyesares\/cartoblocks-for-leaflet","header_author_uri":"https:\/\/jesusyesares.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":27,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.2.4":{"tag":"1.2.4","author":"glycymeris","date":"2026-07-06 12:01:06"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3597723,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3597723,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3597723,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3597723,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"cartoblocks-for-leaflet\/leaflet-map-block":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"cartoblocks-for-leaflet\/leaflet-map-block","version":"1.2.4","title":"Map for Leaflet","category":"media","icon":"location-alt","description":"Embed an interactive Leaflet map using the Leaflet Map plugin shortcodes.","keywords":["map","leaflet","location","embed"],"example":{"attributes":{"lat":37.1773,"lng":-3.5986,"zoom":13,"height":"400px"}},"supports":{"html":false,"align":["wide","full"]},"attributes":{"lat":{"type":"number","default":37.1773},"lng":{"type":"number","default":-3.5986},"zoom":{"type":"number","default":13},"height":{"type":"string","default":"400px"},"width":{"type":"string","default":"100%"},"scrollWheelZoom":{"type":"boolean","default":false},"zoomControl":{"type":"boolean","default":true},"fitMarkers":{"type":"boolean","default":false},"attribution":{"type":"string","default":""},"showScale":{"type":"boolean","default":false},"dragging":{"type":"string","default":""},"keyboard":{"type":"string","default":""},"doubleClickZoom":{"type":"string","default":""},"boxZoom":{"type":"string","default":""},"closePopupOnClick":{"type":"string","default":""},"tap":{"type":"string","default":""},"inertia":{"type":"string","default":""},"minZoom":{"type":"string","default":""},"maxZoom":{"type":"string","default":""},"maxBounds":{"type":"string","default":""},"tileurl":{"type":"string","default":""},"tilesize":{"type":"string","default":""},"subdomains":{"type":"string","default":""},"mapid":{"type":"string","default":""},"accesstoken":{"type":"string","default":""},"zoomoffset":{"type":"string","default":""},"nowrap":{"type":"string","default":""},"detectretina":{"type":"string","default":""},"address":{"type":"string","default":""},"wmsEnabled":{"type":"boolean","default":false},"wmsSource":{"type":"string","default":""},"wmsLayer":{"type":"string","default":""},"wmsCrs":{"type":"string","default":""},"imageMap":{"type":"boolean","default":false},"imageSrc":{"type":"string","default":""},"imageX":{"type":"number","default":0},"imageY":{"type":"number","default":0},"imageZoom":{"type":"number","default":0},"markers":{"type":"array","default":[],"items":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"},"title":{"type":"string"},"content":{"type":"string"},"alt":{"type":"string"},"visible":{"type":"boolean"},"draggable":{"type":"boolean"},"opacity":{"type":"number"},"zIndexOffset":{"type":"integer"},"useCustomIcon":{"type":"boolean","default":false},"iconUrl":{"type":"string","default":""},"iconWidth":{"type":["number","null"]},"iconHeight":{"type":["number","null"]},"iconAnchorX":{"type":["number","null"]},"iconAnchorY":{"type":["number","null"]},"popupAnchorX":{"type":["number","null"]},"popupAnchorY":{"type":["number","null"]},"useShadow":{"type":"boolean","default":false},"shadowUrl":{"type":"string","default":""},"shadowWidth":{"type":["number","null"]},"shadowHeight":{"type":["number","null"]},"shadowAnchorX":{"type":["number","null"]},"shadowAnchorY":{"type":["number","null"]},"iconOriginalWidth":{"type":["number","null"]},"iconOriginalHeight":{"type":["number","null"]},"lockIconAspectRatio":{"type":"boolean","default":true},"shadowOriginalWidth":{"type":["number","null"]},"shadowOriginalHeight":{"type":["number","null"]},"lockShadowAspectRatio":{"type":"boolean","default":true},"useSvgMarker":{"type":"boolean","default":false},"svgBackground":{"type":"string","default":""},"svgIconClass":{"type":"string","default":""},"svgColor":{"type":"string","default":""}}}},"lines":{"type":"array","default":[],"items":{"type":"object","properties":{"type":{"type":"string","default":"line"},"points":{"type":"array","default":[],"items":{"type":"object","properties":{"lat":{"type":"number","default":0},"lng":{"type":"number","default":0}}}},"fitbounds":{"type":"boolean","default":false},"color":{"type":"string","default":""},"weight":{"type":["number","null"],"default":null},"opacity":{"type":["number","null"],"default":null},"dashArray":{"type":"string","default":""},"classname":{"type":"string","default":""},"fill":{"type":"boolean","default":false},"fillColor":{"type":"string","default":""},"fillOpacity":{"type":["number","null"],"default":null},"popup":{"type":"string","default":""},"visible":{"type":"boolean","default":false}}}},"circles":{"type":"array","default":[],"items":{"type":"object","properties":{"lat":{"type":["number","null"],"default":null},"lng":{"type":["number","null"],"default":null},"radius":{"type":"number","default":1000},"fitbounds":{"type":"boolean","default":false},"color":{"type":"string","default":""},"weight":{"type":["number","null"],"default":null},"opacity":{"type":["number","null"],"default":null},"dashArray":{"type":"string","default":""},"classname":{"type":"string","default":""},"fill":{"type":"boolean","default":false},"fillColor":{"type":"string","default":""},"fillOpacity":{"type":["number","null"],"default":null},"popup":{"type":"string","default":""},"visible":{"type":"boolean","default":false}}}},"layers":{"type":"array","default":[],"items":{"type":"object","properties":{"type":{"type":"string","default":"geojson"},"src":{"type":"string","default":""},"fitbounds":{"type":"boolean","default":false},"popupText":{"type":"string","default":""},"popupProperty":{"type":"string","default":""},"tableView":{"type":"boolean","default":false},"color":{"type":"string","default":""},"weight":{"type":["number","null"],"default":null},"opacity":{"type":["number","null"],"default":null},"dashArray":{"type":"string","default":""},"classname":{"type":"string","default":""},"fill":{"type":"boolean","default":false},"fillColor":{"type":"string","default":""},"fillOpacity":{"type":["number","null"],"default":null},"useCustomIcon":{"type":"boolean","default":false},"iconUrl":{"type":"string","default":""},"iconWidth":{"type":["number","null"]},"iconHeight":{"type":["number","null"]},"iconAnchorX":{"type":["number","null"]},"iconAnchorY":{"type":["number","null"]},"popupAnchorX":{"type":["number","null"]},"popupAnchorY":{"type":["number","null"]},"iconOriginalWidth":{"type":["number","null"]},"iconOriginalHeight":{"type":["number","null"]},"lockIconAspectRatio":{"type":"boolean","default":true}}}},"overlays":{"type":"array","default":[],"items":{"type":"object","properties":{"type":{"type":"string","default":"image"},"src":{"type":"string","default":""},"bounds":{"type":"string","default":""},"opacity":{"type":["number","null"],"default":null},"interactive":{"type":"boolean","default":false},"alt":{"type":"string","default":""},"zIndex":{"type":["number","null"],"default":null},"classname":{"type":"string","default":""},"keepAspectRatio":{"type":"boolean","default":true}}}}},"textdomain":"cartoblocks-for-leaflet","editorScript":"file:.\/index.js","editorStyle":"file:.\/index.css","style":"file:.\/style-index.css","viewScript":"file:.\/view.js","render":"file:.\/render.php"}},"tagged_versions":["1.2.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3597723,"resolution":"1","location":"assets","locale":"","width":3340,"height":2496},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3597723,"resolution":"2","location":"assets","locale":"","width":3342,"height":2546},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3597723,"resolution":"3","location":"assets","locale":"","width":3340,"height":2486}},"screenshots":{"1":"Map block with three markers added.","2":"Map block in the editor with a circle, a polygon, and three markers.","3":"Map block showing the Shortcode Viewer popover with the shortcodes Leaflet Map will use to render the map."}},"plugin_section":[],"plugin_tags":[1220,148076,4595,2909,16164],"plugin_category":[49],"plugin_contributors":[270322],"plugin_business_model":[],"class_list":["post-333007","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-gutenberg","plugin_tags-leaflet","plugin_tags-map","plugin_tags-openstreetmap","plugin_category-maps-and-location","plugin_contributors-glycymeris","plugin_committers-glycymeris"],"banners":{"banner":"https:\/\/ps.w.org\/cartoblocks-for-leaflet\/assets\/banner-772x250.png?rev=3597723","banner_2x":"https:\/\/ps.w.org\/cartoblocks-for-leaflet\/assets\/banner-1544x500.png?rev=3597723","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/cartoblocks-for-leaflet\/assets\/icon-128x128.png?rev=3597723","icon_2x":"https:\/\/ps.w.org\/cartoblocks-for-leaflet\/assets\/icon-256x256.png?rev=3597723","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/cartoblocks-for-leaflet\/assets\/screenshot-1.png?rev=3597723","caption":"Map block with three markers added."},{"src":"https:\/\/ps.w.org\/cartoblocks-for-leaflet\/assets\/screenshot-2.png?rev=3597723","caption":"Map block in the editor with a circle, a polygon, and three markers."},{"src":"https:\/\/ps.w.org\/cartoblocks-for-leaflet\/assets\/screenshot-3.png?rev=3597723","caption":"Map block showing the Shortcode Viewer popover with the shortcodes Leaflet Map will use to render the map."}],"raw_content":"<!--section=description-->\n<p>CartoBlocks for Leaflet adds a native Gutenberg block that wraps the <a href=\"https:\/\/wordpress.org\/plugins\/leaflet-map\/\">Leaflet Map<\/a> plugin shortcodes. Configure your map visually in the block editor \u2014 the plugin generates the correct shortcodes automatically, and the frontend is <strong>rendered entirely by Leaflet Map<\/strong>.<\/p>\n\n<p><strong>Core map features:<\/strong><\/p>\n\n<ul>\n<li>Interactive live preview in the editor \u2014 what you see is what you get.<\/li>\n<li>Pan, zoom, and drag markers directly on the map preview.<\/li>\n<li>Sidebar controls for coordinates, zoom level, height, width, and scroll-wheel zoom.<\/li>\n<li>Address geocoding \u2014 search by place name (Nominatim\/OpenStreetMap), pick from up to 5 candidates.<\/li>\n<li>Fit map to markers toggle.<\/li>\n<li>Full tile layer override: custom tile URL, tile size, subdomains, Map ID, access token, zoom offset, no-wrap, detect retina.<\/li>\n<li>WMS tile source support (<code>[leaflet-wms]<\/code>) \u2014 toggle in Tile Layer panel; configure source URL, layer name, and CRS.<\/li>\n<li>Image map mode (<code>[leaflet-image]<\/code>) \u2014 replace tiles with a flat image (floor plans, diagrams, custom maps) on <code>L.CRS.Simple<\/code>.<\/li>\n<li>Map Controls panel: min\/max zoom, max bounds, scale bar, custom attribution.<\/li>\n<li>Interaction controls: dragging, keyboard, double-click zoom, box zoom, close-popup-on-click, tap, inertia \u2014 each with Default \/ Enabled \/ Disabled three-state model.<\/li>\n<\/ul>\n\n<p><strong>Markers (<code>[leaflet-marker]<\/code>):<\/strong><\/p>\n\n<ul>\n<li>Add, edit, and remove markers with title and popup content (HTML supported).<\/li>\n<li>Per-marker: alt text, auto-open popup, draggable, opacity, z-index offset.<\/li>\n<li>Custom icon via WordPress Media Library \u2014 width\/height with aspect-ratio lock, icon anchor and popup anchor with 9-position presets.<\/li>\n<li>SVG marker mode \u2014 background color, icon color (theme palette + custom picker), icon CSS class (Font Awesome \/ any icon font).<\/li>\n<li>Per-marker address geocoder.<\/li>\n<li>Drag markers on the live preview to update coordinates in real time.<\/li>\n<\/ul>\n\n<p><strong>Lines and polygons (<code>[leaflet-line]<\/code>):<\/strong><\/p>\n\n<ul>\n<li>Click-to-draw lines and polygons directly on the map preview.<\/li>\n<li>Per-line\/polygon: color, weight, opacity, dash array, CSS class, fill, fill color, fill opacity, popup text.<\/li>\n<li>Per-point address geocoder.<\/li>\n<\/ul>\n\n<p><strong>Circles (<code>[leaflet-circle]<\/code>):<\/strong><\/p>\n\n<ul>\n<li>2-click draw on the map preview \u2014 first click places center, second click sets radius.<\/li>\n<li>Live radius guide line and draggable center pin post-draw.<\/li>\n<li>m\/km unit toggle (stored in meters).<\/li>\n<li>Per-circle: color, weight, opacity, dash array, CSS class, fill, fill color, fill opacity, popup text.<\/li>\n<li>Per-circle address geocoder.<\/li>\n<\/ul>\n\n<p><strong>Data layers (<code>[leaflet-geojson]<\/code>, <code>[leaflet-gpx]<\/code>, <code>[leaflet-kml]<\/code>):<\/strong><\/p>\n\n<ul>\n<li>Load external GeoJSON, GPX, or KML files by URL.<\/li>\n<li>Full attribute parity: fitbounds, popup template with <code>{property}<\/code> interpolation, popup property, table view.<\/li>\n<li>Style controls: color, weight, opacity, dash array, CSS class, fill, fill color, fill opacity.<\/li>\n<li>Custom point icon with aspect-ratio lock and anchor presets.<\/li>\n<\/ul>\n\n<p><strong>Image and video overlays (<code>[leaflet-image-overlay]<\/code>, <code>[leaflet-video-overlay]<\/code>):<\/strong><\/p>\n\n<ul>\n<li>Pin raster images or videos to geo coordinates via SW\/NE bounds.<\/li>\n<li>Controls: opacity, interactivity, alt text, z-index, CSS class.<\/li>\n<li>Aspect-ratio lock for image overlays.<\/li>\n<\/ul>\n\n<p><strong>Developer-friendly:<\/strong><\/p>\n\n<ul>\n<li>Generates standard Leaflet Map shortcodes \u2014 full compatibility with the Leaflet Map plugin ecosystem.<\/li>\n<li>Multiple independent map blocks per page, fully isolated.<\/li>\n<li>Shortcode viewer in the toolbar \u2014 inspect and copy the generated shortcode at any time.<\/li>\n<li>All strings are translation-ready (<code>.pot<\/code> file included).<\/li>\n<\/ul>\n\n<p><strong>Requirements:<\/strong><\/p>\n\n<ul>\n<li>The <a href=\"https:\/\/wordpress.org\/plugins\/leaflet-map\/\">Leaflet Map<\/a> plugin must be installed and active. This is declared as a plugin dependency, so WordPress will guide you to install and activate it before this plugin can be activated.<\/li>\n<li>WordPress 6.8 or higher.<\/li>\n<li>PHP 7.4 or higher.<\/li>\n<\/ul>\n\n<h3>Source Code<\/h3>\n\n<p>The JavaScript and CSS files shipped in the <code>build\/<\/code> directory of this plugin\nare compiled with webpack (via <code>@wordpress\/scripts<\/code>): the JavaScript from the\nJSX sources and the CSS from the SCSS sources. The human-readable source code\nis publicly available in the plugin's development repository:<\/p>\n\n<p>https:\/\/github.com\/jesusyesares\/cartoblocks-for-leaflet<\/p>\n\n<p>The uncompiled sources (<code>.js<\/code> and <code>.scss<\/code>) live in the <code>src\/<\/code> directory of\nthat repository. To build the plugin from source:<\/p>\n\n<ol>\n<li>Clone the repository: <code>git clone https:\/\/github.com\/jesusyesares\/cartoblocks-for-leaflet.git<\/code><\/li>\n<li>Install the dependencies: <code>npm install<\/code><\/li>\n<li>Build the production files into <code>build\/<\/code>: <code>npm run build<\/code><\/li>\n<\/ol>\n\n<h3>External services<\/h3>\n\n<p>This plugin connects to one external service: the Nominatim geocoding API\noperated by the OpenStreetMap Foundation. It is used <strong>only<\/strong> in the block\neditor, and <strong>only<\/strong> when you click the address search button to look up the\ncoordinates of a place name. It is never called on the frontend of your site\nand is never called automatically.<\/p>\n\n<p>When you perform an address search, the text you type into the search field is\nsent to <code>https:\/\/nominatim.openstreetmap.org\/search<\/code> so it can be matched\nagainst OpenStreetMap data and returned as a list of candidate locations. The\nrequest also includes your site URL and administrator contact email in the\nUser-Agent header, following Nominatim's usage policy for attribution. No other\npersonal data is transmitted. If you have configured a Nominatim contact email\nin the Leaflet Map plugin settings, that value is used instead.<\/p>\n\n<ul>\n<li>Service provider: OpenStreetMap Foundation (Nominatim)<\/li>\n<li>Terms \/ usage policy: https:\/\/operations.osmfoundation.org\/policies\/nominatim\/<\/li>\n<li>Privacy policy: https:\/\/wiki.osmfoundation.org\/wiki\/Privacy_Policy<\/li>\n<\/ul>\n\n<p>Note: GeoJSON, GPX, and KML data layers, and any map tiles, are loaded by the\nLeaflet Map plugin (and your browser) from whatever URLs <strong>you<\/strong> enter. Those\nrequests are made by the Leaflet Map plugin, not by CartoBlocks for Leaflet.<\/p>\n\n<p>Note: if \"Use WMS tile source\" is enabled but the WMS Source field is left\nempty, the Leaflet Map plugin falls back to a free public demo WMS service\noperated by terrestris GmbH (<code>ows.mundialis.de<\/code>). That service displays a\nwatermark and is also a third-party request \u2014 provide your own WMS URL to\navoid it.<\/p>\n\n<h3>Known Limitations<\/h3>\n\n<p><strong>GPX data layers from the Media Library may not render.<\/strong><\/p>\n\n<p>When a <code>.gpx<\/code> file is uploaded to the WordPress Media Library and used as the\nsource of a GPX data layer, the track may fail to draw, while GeoJSON and KML\nlayers work in the same setup. This is an upstream limitation in the Leaflet\nMap plugin, not in CartoBlocks for Leaflet: its GeoJSON\/GPX\/KML loader reads the\nresponse as XML (<code>responseXML<\/code>), which the browser only populates when the file\nis served with an XML <code>Content-Type<\/code> (<code>text\/xml<\/code>, <code>application\/xml<\/code>, or a\n    +xml subtype). Many web servers serve <code>.gpx<\/code> as <code>text\/plain<\/code> or\n    application\/octet-stream, so the track is never parsed. The same behaviour\noccurs when using the Leaflet Map plugin's <code>[leaflet-gpx]<\/code> shortcode directly.<\/p>\n\n<p>Workarounds: serve the GPX file from a host that sets an XML <code>Content-Type<\/code>\n(e.g. <code>application\/gpx+xml<\/code>), or configure your web server to serve <code>.gpx<\/code> as\nXML. GeoJSON and KML layers are unaffected.<\/p>\n\n<p>Check out the source code and more details on <a href=\"https:\/\/github.com\/jesusyesares\/cartoblocks-for-leaflet\">GitHub<\/a>!<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>cartoblocks-for-leaflet<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install the plugin through the WordPress plugins screen.<\/li>\n<li>Activate the plugin through the Plugins screen. If the <a href=\"https:\/\/wordpress.org\/plugins\/leaflet-map\/\">Leaflet Map<\/a> plugin is not yet installed and active, WordPress prompts you to install and activate it first (it is a required dependency).<\/li>\n<li>In the block editor, search for \"Map for Leaflet\" and add it to your page or post.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20replace%20the%20leaflet%20map%20plugin%3F\"><h3>Does this plugin replace the Leaflet Map plugin?<\/h3><\/dt>\n<dd><p>No. Leaflet Map is wonderful. This plugin requires Leaflet Map to be installed and active. It provides a Gutenberg block interface for creating maps, but the actual map rendering on the frontend is handled entirely by Leaflet Map's shortcodes.<\/p><\/dd>\n<dt id=\"can%20i%20use%20multiple%20map%20blocks%20on%20the%20same%20page%3F\"><h3>Can I use multiple map blocks on the same page?<\/h3><\/dt>\n<dd><p>Yes. Each block is fully independent \u2014 different coordinates, zoom levels, markers, layers, and settings.<\/p><\/dd>\n<dt id=\"does%20the%20editor%20preview%20show%20real%20map%20tiles%3F\"><h3>Does the editor preview show real map tiles?<\/h3><\/dt>\n<dd><p>Yes. The editor preview renders the map using the Leaflet Map plugin's own shortcode processing via an iframe, so it looks identical to the frontend.<\/p><\/dd>\n<dt id=\"what%20map%20tile%20provider%20does%20it%20use%3F\"><h3>What map tile provider does it use?<\/h3><\/dt>\n<dd><p>Whatever you have configured in the Leaflet Map plugin settings. By default, OpenStreetMap tiles.<\/p><\/dd>\n<dt id=\"can%20i%20use%20a%20wms%20tile%20source%3F\"><h3>Can I use a WMS tile source?<\/h3><\/dt>\n<dd><p>Yes. Toggle \"Use WMS tile source\" in the Tile Layer panel and enter the WMS URL, layer name, and CRS. The WMS source must be CORS-enabled for the editor preview to load (same requirement as the frontend).<\/p>\n\n<p>Note: if you leave the WMS Source field empty, the Leaflet Map plugin falls\nback to a free public demo WMS service (<code>ows.mundialis.de<\/code>, operated by\nterrestris GmbH), which displays a \"terrestris\" watermark and QR code overlay\non the map. This is not added by CartoBlocks for Leaflet \u2014 enter your own WMS\nURL to remove it.<\/p><\/dd>\n<dt id=\"can%20i%20load%20geojson%2C%20gpx%2C%20or%20kml%20files%3F\"><h3>Can I load GeoJSON, GPX, or KML files?<\/h3><\/dt>\n<dd><p>Yes. Use the \"Data Layers\" panel in the block inspector. Add one or more layers, choose the type (GeoJSON, GPX, KML), and enter the file URL. Style options and popup configuration are available per layer.<\/p><\/dd>\n<dt id=\"can%20i%20use%20a%20floor%20plan%20or%20custom%20image%20as%20the%20map%3F\"><h3>Can I use a floor plan or custom image as the map?<\/h3><\/dt>\n<dd><p>Yes. Toggle \"Image map mode\" in the Location panel and select an image from the Media Library (or enter a URL). The map switches to <code>L.CRS.Simple<\/code> \u2014 markers, lines, circles, and polygons remain usable, and coordinates become pixel positions.<\/p><\/dd>\n<dt id=\"can%20i%20overlay%20an%20image%20or%20video%20on%20a%20geo%20map%3F\"><h3>Can I overlay an image or video on a geo map?<\/h3><\/dt>\n<dd><p>Yes. Use the \"Overlays\" panel to pin raster images or videos to geographic coordinates using SW\/NE bounds.<\/p><\/dd>\n<dt id=\"can%20i%20use%20custom%20marker%20icons%3F\"><h3>Can I use custom marker icons?<\/h3><\/dt>\n<dd><p>Yes. Each marker has a \"Custom Icon\" subsection where you can select an image from the Media Library, set size and anchor with aspect-ratio lock, and choose from nine anchor presets. You can also use SVG markers with background color, icon color, and an icon-font CSS class.<\/p><\/dd>\n<dt id=\"where%20can%20i%20see%20the%20shortcode%20the%20block%20generates%3F\"><h3>Where can I see the shortcode the block generates?<\/h3><\/dt>\n<dd><p>Click the <code>&lt;&gt;<\/code> button in the block toolbar to open the Shortcode Viewer. It shows the exact shortcode that will be rendered on the frontend, with a one-click copy button.<\/p><\/dd>\n<dt id=\"does%20it%20support%20translations%3F\"><h3>Does it support translations?<\/h3><\/dt>\n<dd><p>Yes. All user-facing strings are wrapped in <code>__()<\/code> with the <code>cartoblocks-for-leaflet<\/code> textdomain. A <code>.pot<\/code> file is included in the <code>languages\/<\/code> directory.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.4<\/h4>\n\n<ul>\n<li>Docs: Refreshed the plugin description, FAQ, and screenshots for the WordPress.org plugin directory listing. No change to plugin behaviour.<\/li>\n<\/ul>\n\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>Added: \"Source Code\" section in the readme linking the public development repository and documenting how to build the compiled <code>build\/<\/code> JavaScript and CSS from source, per WordPress Plugin Review guidelines. Added the Plugin URI header pointing to the same repository.<\/li>\n<li>Fixed: The ABSPATH direct-access guard in the block render template now uses <code>exit<\/code>, matching the rest of the codebase.<\/li>\n<li>Dev: Full ESLint\/stylelint pass across the JavaScript and SCSS sources (formatting and code-quality only, no behaviour change); PHPStan clean. Continuous integration is green again.<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Changed: The frontend no longer prints inline  tags. Map resize and image-map fit logic moved to the block's view script, enqueued via the WordPress enqueue API, per WordPress Plugin Review guidelines.<\/li>\n<li>Improved: Image-map fit now targets the correct map when multiple map blocks are on the same page.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Changed: Renamed the plugin to \"CartoBlocks for Leaflet\" (slug <code>cartoblocks-for-leaflet<\/code>) for a more distinctive name, per WordPress Plugin Review guidelines. Updated the Contributors list and plugin metadata.<\/li>\n<li>Changed: Moved the block to the Media category and gave its icon the Leaflet green accent.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Changed: Replaced the bundled TGM Plugin Activation library with WordPress 6.5+ native plugin dependencies (the \"Requires Plugins\" header). WordPress now guides you to install and activate the required Leaflet Map plugin before activation. Minimum WordPress version is 6.8.<\/li>\n<li>Changed: The editor preview iframe now enqueues its CSS\/JS via the WordPress enqueue API instead of printing inline \/ tags, per WordPress Plugin Review guidelines.<\/li>\n<li>Removed: ~3,900 lines of vendored third-party code (TGM Plugin Activation).<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>i18n: Wrapped the remaining untranslated UI placeholder and added translator comments for two placeholder strings so all user-facing text is translation-ready. Regenerated the translation template (.pot). No change to plugin behaviour.<\/li>\n<li>Docs: Added a \"Known Limitations\" note documenting that GPX data layers sourced from the Media Library may not render (upstream Content-Type limitation).<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>New: Image and video overlay shortcodes ([leaflet-image-overlay] \/ [leaflet-video-overlay]) with drag-to-move and drag-to-resize handles in the editor preview.<\/li>\n<li>New: Overlay bounds auto-fill centred on the current map view; overlays update live in the editor without an iframe reload.<\/li>\n<li>Improved: Interaction toggles (dragging, keyboard, double-click zoom, etc.) now apply live in the preview.<\/li>\n<li>Fixed: Image-map drag and zoom now sync with the sidebar controls in both the editor preview and the frontend; width is passed to [leaflet-image].<\/li>\n<li>Fixed: Iframe no longer reloads mid-drag, which previously killed map panning.<\/li>\n<li>Hardened: ABSPATH guard added to the generated blocks-manifest.php; Nominatim external service disclosed in the readme.<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Refactor: Internal modularization (no behaviour change). Plugin code is split into focused files under <code>includes\/<\/code> so each feature has one home: shortcode builders, preview endpoint, geocoder, editor assets, file-type filters, TGM config. Main plugin file slimmed from 1450 to 95 lines; render.php from 614 to 105 lines. Frontend output is byte-identical to 1.0.6.<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<p>\\\n* Improved: Replaced \"Anchor position\" dropdown selects with a visual 3\u00d73 grid for marker icon, shadow, and data-layer icon anchors.<\/p>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Fixed: Map container now fills the block wrapper exactly \u2014 width applied to wrapper div, shortcode always gets width=\"100%\" to prevent tile gap.<\/li>\n<li>Fixed: invalidateSize called via WPLeafletMapPlugin.push so Leaflet recalculates tile layout after CSS settles.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Fixed: New blocks now inherit the Default Width from Leaflet Map Settings.<\/li>\n<li>Fixed: Zoom Level slider min\/max now respect the Min Zoom and Max Zoom block attributes.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Fixed: New blocks now also inherit Fit Bounds, Zoom Controls, Scroll Wheel Zoom, Double Click Zoom, Min Zoom, and Max Zoom from Leaflet Map Settings.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Fixed: New blocks now inherit Default Latitude, Longitude, Zoom, and Height from the Leaflet Map plugin Settings page instead of hardcoded placeholder values.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Added: TGM Plugin Activation \u2014 guided one-click install of the required Leaflet Map plugin when not present.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Full feature parity with the Leaflet Map plugin \u2014 all shortcodes wrapped: markers, lines, polygons, circles, GeoJSON\/GPX\/KML data layers, image map, WMS, image overlay, video overlay.<\/li>\n<li>Added: Full internationalisation (264 translatable strings, .pot file included).<\/li>\n<li>Added: wp_set_script_translations() wired for block editor translation loading.<\/li>\n<\/ul>\n\n<h4>0.10.0<\/h4>\n\n<ul>\n<li>Added: <code>[leaflet-image-overlay]<\/code> and <code>[leaflet-video-overlay]<\/code> shortcode support via new \"Overlays\" panel. Pin raster images or videos to geo coordinates with configurable bounds, opacity, interactivity, z-index, CSS class, alt text, and aspect-ratio lock (image only).<\/li>\n<\/ul>\n\n<h4>0.9.0<\/h4>\n\n<ul>\n<li>Added: <code>[leaflet-wms]<\/code> shortcode support via \"Use WMS tile source\" toggle in the Tile Layer panel. Replaces the standard OSM\/raster tile layer with a WMS source. Configurable URL, layer name, and CRS.<\/li>\n<\/ul>\n\n<h4>0.8.0<\/h4>\n\n<ul>\n<li>Added: <code>[leaflet-image]<\/code> shortcode support \u2014 \"Image map mode\" toggle in the Location panel replaces tiles with a flat image on <code>L.CRS.Simple<\/code>.<\/li>\n<li>Added: MediaUpload picker (WordPress Media Library) and plain URL fallback for the image source.<\/li>\n<li>Added: Center X \/ Center Y pixel coordinate fields (replaces Lat\/Lng in image mode).<\/li>\n<\/ul>\n\n<h4>0.7.1<\/h4>\n\n<ul>\n<li>Fixed: Removed unreachable <code>circleMarker<\/code> toggle from Data Layers (WordPress lowercases shortcode attributes; bozdoz checks camelCase \u2014 same trap as <code>touchZoom<\/code>).<\/li>\n<li>Fixed: Help text clarifies bare property name required for \"Single property to display\" (e.g. <code>ciudad<\/code>, not <code>{ciudad}<\/code>).<\/li>\n<li>Fixed: Warning added in \"Default feature style\" panel that styles apply to line\/polygon features only.<\/li>\n<\/ul>\n\n<h4>0.7.0<\/h4>\n\n<ul>\n<li>Added: <code>[leaflet-geojson]<\/code>, <code>[leaflet-gpx]<\/code>, and <code>[leaflet-kml]<\/code> shortcode support via new \"Data Layers\" panel.<\/li>\n<li>Added: Full attribute parity \u2014 source URL, fitbounds, popup template, popup property, table view, full style options, custom point icon with aspect-ratio lock and anchor presets.<\/li>\n<li>Added: 16 new Jest unit tests for <code>buildLayerShortcodes<\/code> (35 total).<\/li>\n<\/ul>\n\n<h4>0.6.0<\/h4>\n\n<ul>\n<li>Added: <code>[leaflet-circle]<\/code> shortcode support with full attribute parity.<\/li>\n<li>Added: 2-click draw mode in the editor preview.<\/li>\n<li>Added: Live radius guide line and draggable center pin post-draw.<\/li>\n<li>Added: m\/km unit toggle (stored in meters).<\/li>\n<li>Added: Per-circle address geocoder.<\/li>\n<\/ul>\n\n<h4>0.5.0<\/h4>\n\n<ul>\n<li>Added: <code>[leaflet-line]<\/code> and <code>[leaflet-polygon]<\/code> shortcode support with full attribute parity.<\/li>\n<li>Added: Click-to-draw mode for lines and polygons in the editor preview.<\/li>\n<li>Added: Per-point address geocoder and crosshair overlay during draw mode.<\/li>\n<li>Added: GitHub Actions CI (PHPStan + PHPCS + Jest).<\/li>\n<\/ul>\n\n<h4>0.4.3<\/h4>\n\n<ul>\n<li>Added: Per-marker \"Search by address\" helper using Nominatim geocoding.<\/li>\n<\/ul>\n\n<h4>0.4.2<\/h4>\n\n<ul>\n<li>Added: SVG marker support \u2014 background color, icon color (theme palette + custom picker), icon CSS class.<\/li>\n<li>Added: Mutual-exclusion guard between SVG mode and custom icon mode.<\/li>\n<\/ul>\n\n<h4>0.4.1<\/h4>\n\n<ul>\n<li>Added: Custom icon support \u2014 Media Library picker, size with aspect-ratio lock, icon\/popup anchor with 9-position presets, optional shadow.<\/li>\n<li>Fixed: Custom icon not visible in editor iframe preview.<\/li>\n<li>Fixed: Content-less markers causing sibling markers to disappear (self-closing shortcode fix).<\/li>\n<\/ul>\n\n<h4>0.4.0<\/h4>\n\n<ul>\n<li>Added: Per-marker advanced controls \u2014 alt text, auto-open popup, draggable, opacity, z-index offset.<\/li>\n<\/ul>\n\n<h4>0.3.x<\/h4>\n\n<ul>\n<li>Added: Shortcode viewer toolbar popover with copy button.<\/li>\n<li>Added: Address geocoding in Location panel (Nominatim, server-side AJAX).<\/li>\n<li>Added: Tile Layer panel with full tile override controls.<\/li>\n<li>Added: Zoom &amp; Bounds panel (min\/max zoom, max bounds).<\/li>\n<li>Added: Interaction controls panel (7 three-state toggles).<\/li>\n<li>Added: Map Controls panel (scale bar, custom attribution).<\/li>\n<li>Changed: iframe-based editor preview with postMessage bidirectional sync.<\/li>\n<li>Fixed: OSM tile 403 errors in the editor.<\/li>\n<\/ul>\n\n<h4>0.2.0<\/h4>\n\n<ul>\n<li>Initial release with dynamic block, render.php shortcode generation, and ServerSideRender preview.<\/li>\n<\/ul>","raw_excerpt":"A Gutenberg block that gives you a full visual editor for all Leaflet Map plugin shortcodes \u2014 no shortcode writing required.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/333007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=333007"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/glycymeris"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=333007"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=333007"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=333007"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=333007"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=333007"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=333007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}