| 开发者 | glycymeris |
|---|---|
| 更新时间 | 2026年7月7日 18:35 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
[leaflet-wms]) — toggle in Tile Layer panel; configure source URL, layer name, and CRS.[leaflet-image]) — replace tiles with a flat image (floor plans, diagrams, custom maps) on L.CRS.Simple.[leaflet-marker]):
[leaflet-line]):
[leaflet-circle]):
[leaflet-geojson], [leaflet-gpx], [leaflet-kml]):
{property} interpolation, popup property, table view.[leaflet-image-overlay], [leaflet-video-overlay]):
.pot file included).cartoblocks-for-leaflet folder to /wp-content/plugins/, or install the plugin through the WordPress plugins screen.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.
Yes. Each block is fully independent — different coordinates, zoom levels, markers, layers, and settings.
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.
Whatever you have configured in the Leaflet Map plugin settings. By default, OpenStreetMap tiles.
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).
Note: if you leave the WMS Source field empty, the Leaflet Map plugin falls
back to a free public demo WMS service (ows.mundialis.de, operated by
terrestris GmbH), which displays a "terrestris" watermark and QR code overlay
on the map. This is not added by CartoBlocks for Leaflet — enter your own WMS
URL to remove it.
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.
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 L.CRS.Simple — markers, lines, circles, and polygons remain usable, and coordinates become pixel positions.
Yes. Use the "Overlays" panel to pin raster images or videos to geographic coordinates using SW/NE bounds.
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.
Click the <> 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.
Yes. All user-facing strings are wrapped in __() with the cartoblocks-for-leaflet textdomain. A .pot file is included in the languages/ directory.
build/ JavaScript and CSS from source, per WordPress Plugin Review guidelines. Added the Plugin URI header pointing to the same repository.exit, matching the rest of the codebase.cartoblocks-for-leaflet) for a more distinctive name, per WordPress Plugin Review guidelines. Updated the Contributors list and plugin metadata.includes/ 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.
= 1.0.6 =\
[leaflet-image-overlay] and [leaflet-video-overlay] 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).[leaflet-wms] 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.[leaflet-image] shortcode support — "Image map mode" toggle in the Location panel replaces tiles with a flat image on L.CRS.Simple.circleMarker toggle from Data Layers (WordPress lowercases shortcode attributes; bozdoz checks camelCase — same trap as touchZoom).ciudad, not {ciudad}).[leaflet-geojson], [leaflet-gpx], and [leaflet-kml] shortcode support via new "Data Layers" panel.buildLayerShortcodes (35 total).[leaflet-circle] shortcode support with full attribute parity.[leaflet-line] and [leaflet-polygon] shortcode support with full attribute parity.