umap
umap copied to clipboard
GPS doesn't work in iframe element
GPS works fine on umap instances but has no effect when the map is embedded in a website with iframe.
Hi, I have the same problem, GPS works fine on map but when the map is embedded in a website with iframe, the button doesn't work. Please, help us to fix it 😄
Could you share a link where to reproduce the issue ?
@yohanboniface https://saloni.ca/
Firefox displays an error:
Safari is more verbose:
I would say we need to explicitly allow the geolocation as a feature policy for the iframe: https://udn.realityripple.com/docs/Web/HTTP/Headers/Feature-Policy/geolocation
@panosalevropoulos can you try to change from:
<iframe frameborder="0" allowfullscreen="" src="[https://umap.openstreetmap.fr/en/map/thessaloniki-lost-city-_663542#16/40.6330/22.9465?scaleControl=true&miniMap=false&scrollWheelZoom=true&zoomControl=true&allowEdit=false&moreControl=true&searchControl=true&tilelayersControl=false&embedControl=false&datalayersControl=true&onLoadPanel=caption&captionBar=true](view-source:https://umap.openstreetmap.fr/en/map/thessaloniki-lost-city-_663542#16/40.6330/22.9465?scaleControl=true&miniMap=false&scrollWheelZoom=true&zoomControl=true&allowEdit=false&moreControl=true&searchControl=true&tilelayersControl=false&embedControl=false&datalayersControl=true&onLoadPanel=caption&captionBar=true)"></iframe>
To:
<iframe allow="geolocation" frameborder="0" allowfullscreen="" src="[https://umap.openstreetmap.fr/en/map/thessaloniki-lost-city-_663542#16/40.6330/22.9465?scaleControl=true&miniMap=false&scrollWheelZoom=true&zoomControl=true&allowEdit=false&moreControl=true&searchControl=true&tilelayersControl=false&embedControl=false&datalayersControl=true&onLoadPanel=caption&captionBar=true](view-source:https://umap.openstreetmap.fr/en/map/thessaloniki-lost-city-_663542#16/40.6330/22.9465?scaleControl=true&miniMap=false&scrollWheelZoom=true&zoomControl=true&allowEdit=false&moreControl=true&searchControl=true&tilelayersControl=false&embedControl=false&datalayersControl=true&onLoadPanel=caption&captionBar=true)"></iframe>
(allow="geolocation" added)
@davidbgk I added allow="geolocation" but it doesn't seem to work.
@panosalevropoulos did you do it on https://saloni.ca/ because I cannot see the modification?