A principio ele mostra Mas depois dá este erro Ou este erro
No servidor está dando este erro.
O Chave key está liberada
main.cb562ea7df40e3f09b5f.bundle.js:2 Refused to load the script 'https://maps.googleapis.com/maps/api/js?v=quarterly&callback=agmLazyMapsAPILoader&key=AIzaSyCD54jiJhEBda5MtJkgFJB-hfR6dv5V9jw&language=pt' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
main.cb562ea7df40e3f09b5f.bundle.js:2 ERROR Error: Uncaught (in promise): Event: {"isTrusted":true}
at x (main.cb562ea7df40e3f09b5f.bundle.js:2)
at x (main.cb562ea7df40e3f09b5f.bundle.js:2)
at main.cb562ea7df40e3f09b5f.bundle.js:2
at e.invokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at Object.onInvokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at e.invokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at t.runTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at y (main.cb562ea7df40e3f09b5f.bundle.js:2)
at t.invokeTask [as invoke] (main.cb562ea7df40e3f09b5f.bundle.js:2)
at u (main.cb562ea7df40e3f09b5f.bundle.js:2)
Pergunta
Netsoft
Estou usando o AgmCoreModule, para marcar endereços no google maps.
No module, no import
imports: [
AgmCoreModule.forRoot({
apiKey: 'xxxxxxxxxxx'
}),
]
no export
exports: [
AgmCoreModule
]
No ts
texto = 'teste';
lat = -19.91506;
lng = -44.00752;
zoom = 15;
No html
<agm-map [latitude]="lat" [zoom]="zoom" [longitude]="lng">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map>
A principio ele mostra
Mas depois dá este erro
Ou este erro
No servidor está dando este erro.
O Chave key está liberada
main.cb562ea7df40e3f09b5f.bundle.js:2 Refused to load the script 'https://maps.googleapis.com/maps/api/js?v=quarterly&callback=agmLazyMapsAPILoader&key=AIzaSyCD54jiJhEBda5MtJkgFJB-hfR6dv5V9jw&language=pt' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
main.cb562ea7df40e3f09b5f.bundle.js:2 ERROR Error: Uncaught (in promise): Event: {"isTrusted":true}
at x (main.cb562ea7df40e3f09b5f.bundle.js:2)
at x (main.cb562ea7df40e3f09b5f.bundle.js:2)
at main.cb562ea7df40e3f09b5f.bundle.js:2
at e.invokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at Object.onInvokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at e.invokeTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at t.runTask (main.cb562ea7df40e3f09b5f.bundle.js:2)
at y (main.cb562ea7df40e3f09b5f.bundle.js:2)
at t.invokeTask [as invoke] (main.cb562ea7df40e3f09b5f.bundle.js:2)
at u (main.cb562ea7df40e3f09b5f.bundle.js:2)
O que pode ser ?
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.