bozdoz / wp-plugin-leaflet-map

Add leaflet maps to Wordpress with shortcodes
https://wordpress.org/plugins/leaflet-map/
GNU General Public License v2.0
140 stars 71 forks source link

Feature Request: GDPR compliant with Tile Proxy and local JS #178

Open ahobitt opened 1 year ago

ahobitt commented 1 year ago

Thank you for the great plugin! With a few additions, I am now using it in a DSGVO-compliant way, so that no more data is sent by the user.

I used the Tile Proxy PHP and hosted all JS and CSS files locally.

Would it perhaps be an option to integrate this directly into this plugin?

bozdoz commented 1 year ago

I would love to hear about what you did! Perhaps it's worth adding to the FAQ, as a How-To

bozdoz commented 1 year ago

If we can get a FAQ perhaps we can resolve #159

ahobitt commented 1 year ago

OpenStreet Maps Proxy/Cache

I don't like content blockers and I don't need to get consent for any cookies. I have gone a different way so that I can include the OSM maps for the user completely (my opinion) DSGVO compliant.

Step 1: The OSM Proxy/Cache Script

On a subdomain of my project I installed this Tile Proxy It's really simple and serves that the visitor of the website (client) doesn't have to communicate with the OSM server, but only with my subdomain. In addition, this script can also cache a map area for an adjustable time (keyword OSM bounding box).

Step 2: Wordpress Plugin Leaflet Maps

As already mentioned, the Wordpress plugin Leaflet Maps is used here. Its settings have to be adjusted briefly: In the Wordpress backend under Leaflet Map Settings we have to change the map tile url. The original URL is the URL of the OSM server. D262CCFC-9E36-4FEF-84B9-03836304E344

Step 3: Host leaflet.js locally (optional)

The plugin uses (logically, given the name) the leaflet.js library. By default, this is delivered via the content delivery network (cdn) unpkg.com. I would also like to host this library (and the associated CSS file) locally. So download the package from leafletjs.com and unpack it on my own webspace. Then adjust the Javascript and CSS URL in the plugin settings: DB5954DF-B6BA-4348-BE95-3A82D333D578

ahobitt commented 1 year ago

If we can get a FAQ perhaps we can resolve #159

It also solves this request. Of course, the opt-in banner is also a possibility.