MapSVG plugin intergation
-
Hi,
does anyone have any experience with the integration of the MapSVG plugin?
I mean successfully loading google maps with MapSVG only after someone has allowed marketing cookies.
Thank you very much for your answers.
-
Hi @soliduser,
Do you have an example page with a Google Map implemented with this plugin, so we can have a look at the current behavior?
We would gladly look into this plugin and whether an integration would be necessary.
Just let me know!
Kind regards,
JarnoHi @jarnovos,
thanks for your interest in helping me with this task.
Here is my page (in slovak language) where MapSVG plugin is deployed:
https://www.afirmax.sk/kde-kupit/Best,
Igor@soliduser I don’t see any direct Google javascript in your source. As the map seems to be calling at least some images from the google apis, this is likely done by the SVGMaps javascript.
As the website is minified, I can’t see what that url is.
But the way to block it, is by adding that url in the script center. If you deactivate the minification we can take a look.
@rogierlankhorst Thank you. I turned off script minification (please take a look). It seems that maps.googleapis.com is calling within the main MapSVG JS class. I tried to block “wp-content/plugins/mapsvg/dist/mapsvg-front.umd.js” (not sure if it is the right one to block) in the script center, but it doesn’t load the map when I click the placeholder on the frontend.
Do you have any console errors when this happens? Possible an inline script also needs to be blocked, to prevent errors on activation.
It looks like it’s not available on the WordPress repository, so I can’t easily test it. I’ll contact the developers to see if they are willing to cooperate on this.
Thank you for contacting developers.
And sorry for my late answer: I have an error message in the console “Uncaught ReferenceError: MapSVG is not defined” even before clicking on the placeholder, because the main plugin class has already been called by JS “window.addEventListener(“load”, function(){MapSVG.version…”.
When I try to block just URL https://maps.googleapis.com, the placeholder seems to work fine (visually :-), but the scripts from Google Maps are already loaded behind the scene before allowing marketing cookies.Three items need to be blocked I think:
– https://maps.googleapis.com
– wp-content/plugins/mapsvg/dist/mapsvg-front.umd.js
– MapSVG.versionAs separate URL’s in the script center.
If you still get an error, the Maps.svg version should wait for mapsvg-front.umd.js, and mapsvg-front.umd.js should wait form maps.googleapis.com. You can configure this in “dependencies”
If we get in contact with the developer, I can test what the best solution is.
Hi @soliduser,
Quick update: we are in contact with the MapSVG developer and they are willing to add an integration with Complianz.
I’ll keep you posted if there are any further updates regarding this!
Kind regards,
JarnoHi @soliduser,
We have been in touch with the developer of MAPSVG, Roman. He started working on an integration, but has not replied to us after several reminders the past two weeks.
We can not complete this integration on our end without the developer’s cooperation. Perhaps you could reach out to MAPSVG as well. Feel free to mention my ticket number, which is #2973339.
We stand by to complete the integration on our end if needed.
Kind regards,
Leon
- The topic ‘MapSVG plugin intergation’ is closed to new replies.