-1
Ich verwende den Service, um Google Maps Javascript SDK vorab abzurufen. Da Service-Mitarbeiter fetch
verwenden Ich halte diesen Fehler -Übergreifende Anfrage zum Abrufen des Google Maps-SDKs
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Wie aktiviere ich CORS auf Google Maps SDK?
UPDATE
ich sw-toolbox bin mit und in meinem Dienst Arbeiter habe ich den folgenden Code -
import toolbox from 'sw-toolbox'
toolbox.precache([
'/',
'/bundle.js',
'/manifest.json',
'/ola_icon.png',
'/favicon.png',
'https://maps.googleapis.com/maps/api/js?key=myapikey&callback=initMap'
])
Können Sie uns Ihren Code zeigen? – Marco