goiblas / map-block-leaflet Goto Github PK
View Code? Open in Web Editor NEWMap Block Leaflet for WordPress 🗺️
Home Page: https://wordpress.org/plugins/map-block-leaflet
License: GNU General Public License v2.0
Map Block Leaflet for WordPress 🗺️
Home Page: https://wordpress.org/plugins/map-block-leaflet
License: GNU General Public License v2.0
I have used the block on https://taschenbuchladen.de/ and it is not shown anymore. It is visible in the Gutenberg editor though.
For my frontend it shows the "L is not defined" JS erorr.
After upgrading to version 1.5, Wordpress seems unable to detect this plugin.
Specifically, the plugin appears to be installed and activated, but I am unable to find it in the list of blocks. Blocks added with a previous version of the plugin no longer work.
Should be possible to customize the marker
After setting "Options > Map Height" and Publishing/Updating the Post/Page the Map does use correct height, but if you edit the Page/Post the Map Height reverts to "220".
So if you edit something on the page and Update, the Map height reverts.
Guessing the current map height is not checked when editing the Post/Page?
It would be nice to be able to display newlines within the tooltip.
For example, this could be achieved by the wrapping the tooltip text in <p>
tags, and replacing newlines with <br>
.
If the theme use transitions no paint map correctly.
Hello,
the icon marker does not show on the map on the front end.
The map try to load the png from the url of the page.
GET https://gargas-dev-front.149-202-93-199.plesk.page/fr/infos-pratiques/**marker-shadow.png**
Thank you for your work.
Currently, the Leaflet marker displays the address which was entered to locate the marker.
It would be nice to be able to change what is displayed in the marker without changing the location of the marker.
Add option for disable scroll scrollwheel for zoom
example of implementation https://richtabor.com/has-blocks-gutenberg-scripts/
The contents of the tooltip are inserted directly into the page without proper escaping. This means that including quotation marks breaks the loading and rendering of the map. Additionally, inserting a newline also breaks rendering.
It also means that by setting the value of the tooltip as follows, arbitrary javascript can be inserted into the page:
');alert('hi');console.log('unescaped arbitrary code execution!
(You should see an alert, and an entry in the console.)
It seems that "map_block_leaflet_render()" is removed, is there a replacement? I have used it to fill in a custom map by code from custom meta.
Thanks for all the work.
Extend the provider list for the map
WordPress support topic
change the theme through thumbnail of maps
For some reason Wordpress auto-wraps parts of the Javascript code in <p>
Tags. Any tips what I can try to clear this up? I have a current version of WP and your plugin. The content gets no special treatment and is just output with the_content()
.
This of course causes an error and the map never shows on the page.
Update:
I do in fact process the blocks, by passing them through render_block()
inside add_filter('the_content', …)
. I disabled that and the map shows up fine. I don't know why that would be different than what Wordpress does during render anyway, but it fixed the issue. Luckily, I was in a position where removing the filter was possible.
The assets is in all pages. For the moment i use this snippet for remove assets if the block isn't in page.
/**
* Completely remove assets from plugin block leaflet if isn't in page
*/
function disableLeafletAsset()
{
$id = get_the_ID();
if (!has_block('map-block-leaflet/map-block-leaflet', $id)) {
wp_dequeue_script('lib-js-map-block-leaflet');
wp_dequeue_script('lib-js-map-block-leaflet-cluster');
wp_dequeue_script('js-editor-map-block-leaflet');
wp_dequeue_style('css-editor-map-block-leaflet');
wp_dequeue_style('lib-css-map-block-leaflet');
wp_dequeue_style('lib-css-map-block-leaflet-cluster');
}
}
add_action('wp_enqueue_scripts', 'disableLeafletAsset');
Hi,
Thanks for this great plugin.
On a currently in-dev site (using Hestia theme), I'm willing to load a full-width map on a page by using the dedicated option from block toolbar.
On frontend, the container is well updated to expand to full-width through negative left/right margins but the inner map tile is stuck to initial width and there's a grayed empty area.
If I force a new rendering, by resizing window for instance, map tile expands correctly to fill all container.
Is it fixable ?
Thanks !
There's any way we can add more than one marker?
Thanks in advance
My maps use Leaflet 1.5.1 with openstreetmap tiles. They stopped working last week (no tiles showing).
Do I need to update to Leaflet 1.7.1?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.