yii2 mpdf,不显示Google Maps静态卫星视图

时间:2018-07-23 15:09:00

标签: php google-maps yii2 mpdf

我使用https://developers.google.com/maps/documentation/maps-static/dev-guidempdf库生成的pdf上使用此代码插入地图

<img width="200" height="200" src="https://maps.googleapis.com/maps/api/staticmap?center=-19.0365720000,-65.2531240000&zoom=16&size=200x200&maptype=roadmap&scale=2
&language=spanish&markers=color:red%7Clabel:Cliente%7C-19.0365720000,-65.2531240000&key=my-key">

但是,我需要卫星视图,在文档上进行了搜索,并找到了要更改的参数

maptype = satellite

<img width="200" height="200" src="https://maps.googleapis.com/maps/api/staticmap?center=-19.0365720000,-65.2531240000&zoom=16&size=200x200&maptype=satellite&scale=2&language=spanish&markers=color:red%7Clabel:Cliente%7C-19.0365720000,-65.2531240000&key=my-key">

我认为这是mpdf库的错误,因为当我在html文件上使用代码时,效果很好,

对错误有一些了解吗?

1 个答案:

答案 0 :(得分:0)

问题的答案:我正在使用mpdf https://github.com/kartik-v/mpdf的非官方存储库,我查看了正在使用的库的github,然后阅读了新内容“改为使用mpdf / mpdf存储库”,因此,我下载了官方库https://github.com/mpdf/mpdf并测试了我的代码,没关系!