【发布时间】:2019-06-25 14:30:38
【问题描述】:
角度误差
Google Maps Platform 拒绝了您的请求。无效的请求。 意外的参数“amp%3Bkey”。
在控制台中
获取 https://www.google.com/maps/embed/v1/place?q=19.499201,77.656332&key=APIKEY 400
HTML 代码
<iframe width="100%" height="150" frameborder="0" style="border:0" [src]="location(details)"></iframe>
TS 代码
location(details:any){
let location = `https://www.google.com/maps/embed/v1/place?q=${details.longitude},${details.latitude}&key=<apiKey>`;
return this.sanitizer.bypassSecurityTrustResourceUrl(location);
}
我正面临
的问题bypassSecurityTrustResourceUrl 函数转换字符串',' 逗号到“%3B”
.
【问题讨论】: