I am the developer of the mapping plugin “Leaflet Maps Marker” (http://wordpress.org/extend/plugins/leaflet-maps-marker/) and found a conflict with w3tc plugin:
If w3tc is active and a CDN (like Amazon Cloudfront) is set up, my layer maps break, as w3tc removes the trailing slash from my icon-dir constants:
iconUrl: (feature.properties.icon != '') ? 'http://www.mapsmarker.com/wp-content/uploads/leaflet-maps-marker-icons/' + feature.properties.icon : 'http://www.mapsmarker.com/wp-content/plugins/leaflet-maps-marker/leaflet-dist/images/marker.png',
iconUrl: (feature.properties.icon != '') ? 'http://cdn.mapsmarker.com/wp-content/uploads/leaflet-maps-marker-icons' + feature.properties.icon : 'http://www.mapsmarker.com/wp-content/plugins/leaflet-maps-marker/leaflet-dist/images/marker.png',
Here is the code I use within my plugin to create the output above in case this helps you with analyzing:
$lmm_out .= " iconUrl: (feature.properties.icon != '') ? '" . LEAFLET_PLUGIN_ICONS_URL . "/' + feature.properties.icon : '" . LEAFLET_PLUGIN_URL . "leaflet-dist/images/marker.png" . "',".PHP_EOL;
The current workaround I give is to add
to the list of rejected files within the w3tc CDN configuration. This is not optimal, as I would like my plugin to work out of the box without any additional configuration needed.
I would really appreciate your help with this issue. If I can assist you in any way, let me know!
- The topic ‘plugin conflict with Leaflet Maps Marker (CDN/js issue)’ is closed to new replies.