Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 Forbidden strict-origin-when-cross-origin #335

Open
TKouchoanou opened this issue Jun 1, 2022 · 0 comments
Open

403 Forbidden strict-origin-when-cross-origin #335

TKouchoanou opened this issue Jun 1, 2022 · 0 comments

Comments

@TKouchoanou
Copy link

do you know what caused this error in the browser following a request like https://maps.wikimedia.org/osm-intl/15/16593/11272.png?
Error : strict-origin-when-cross-origin

my dependencies": {
"leaflet": "^1.5.1",
"leaflet-control-geocoder": "^1.8.2",

}

my code

import L from 'leaflet'
import 'leaflet-control-geocoder';

function() {
            let address = $(this).data('departure-address');
            let id = $(this).attr('id');
            geocoder.geocode(address, function(results) {
                if(!results[0]) return;
                let lat = results[0].center.lat;
                let lng = results[0].center.lng;
                let map = L.map(id, {
                    attributionControl: false,
                    zoomControl: false
                }).setView([lat, lng], 15);
                L.tileLayer('https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png').addTo(map);
                L.marker([lat, lng], {icon: greenIcon}).addTo(map);

                if (window.matchMedia("(max-width: "+utilities.breakpoints.lg+")").matches) {
                    map.dragging.disable();
                    map.touchZoom.disable();
                    map.doubleClickZoom.disable();
                    map.scrollWheelZoom.disable();
                    map.boxZoom.disable();
                    map.keyboard.disable();
                    if (map.tap) map.tap.disable();
                }
            });
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant