谷歌地图图像不加载PDF
Google Map Image not loading on PDF
我正在Symfony2中将html转换为PDF的功能上工作。所有用html写的东西,比如图像/文本都显示在新生成的PDF上,但谷歌地图不显示在PDF上。我从下面的脚本绘制地图。
function initializeMap( ) {
var mapOptions = {
zoom: 17,
center: new google.maps.LatLng(propLatLng.lat(), propLatLng.lng()),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
googleMap = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
var marker = new google.maps.Marker({
position: propLatLng,
map: googleMap,
title: propAddress
}); }
有下面的div到我的html。
<div id="map_canvas" style="width:900px;height:700px;"></div>
地图正在加载到html中,但不显示在PDF中。它显示了空白的空间。请帮助。
我可以在PDF上显示带有标记的谷歌地图:
<div class="print-show">
<img src="http://maps.googleapis.com/maps/api/staticmap?center=yourLatitude,yourLongitude&zoom=16&scale=false&size=900x600&maptype=roadmap&format=png&visual_refresh=true&markers=size:mid|color:red|label:|yourLatitude,yourLongitude"/>
</div>
编辑:静态地图图像可以以任何大小返回,最大640 x 640像素。
https://developers.google.com/maps/documentation/maps-static/intro相关文章:
- 在iframe中加载pdf时,iframe未触发加载事件
- 等待图标,用于通过 ashx 处理程序在浏览器中加载 pdf
- 使用react webpack文件加载器提供静态pdf
- 当浏览器请求部分内容范围请求时,如何检测pdf何时加载到iframe中
- 加载PDF文件/网址在Safari浏览器中显示黑屏
- 通过 Javascript 打印在 IFrame 中加载的 PDF
- 使用2个下拉选项构建表单,用于加载特定的PDF
- 将 pdf 加载到 Blob 并创建网址
- PHP/HTML:下载PDF链接处理页面加载
- 如何在显示 pdf 文件之前加载加载程序图像
- 如何在不使用 PDFtron 中使用 XOD 的情况下直接加载.PDF文件作为 initialDoc
- JQuery 数据表延迟加载导出数据到 pdf、excel 等,不显示所有记录
- 加载从跨文档消息传递中作为事件数据获得的 pdf
- 如何异步加载 PDF 页面
- 从网址加载带有中文文件名的 pdf
- 如何获取垂直列表以将PDF加载到iFrame中
- 检测PDF文件是否已完全加载
- 如何刷新/重新加载application/pdf
- 如何在javaScript中生成PDF后停止加载效果
- 在浏览器页面中禁用PDF加载