小编Ash*_*raw的帖子

如何在Leaflet中加载Google Maps基础层(2018年6月之后)?

我的网站上有一张传单地图,使用Google卫星图像作为基本地图.2018年6月11日之后,无法使用api密钥访问Google地图图块.目前可以使用以下javascript通过Leaflet JS访问切片.

googleSat = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',{
    maxZoom: 20,
    subdomains:['mt0','mt1','mt2','mt3']
});
Run Code Online (Sandbox Code Playgroud)

如何在2018年6月11日之后加入我的api密钥以便能够继续访问Leaflet的地图图块?

maps google-maps leaflet

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

google-maps ×1

leaflet ×1

maps ×1