将当前 Google 地图视图保存为图像
我有一个包含一些地址的数据库。对于每个地址,地图的视图都会不同。
有没有办法,对于每个地址,将地图视图保存为图像?
I have a database with some addresses. For each address the view of the map will be different.
Is there a way, for each address, to save the map view as an image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
中心是地图的中心位置。
标记是你想要的地址,所以我把 center=markers 。
缩放是您想要将地图放大到多大程度
调整您想要的图片尺寸。
看看这里
http://code.google.com/intl/el- GR/apis/maps/documentation/staticmaps/
The center is where the map will be centered.
The markers is the address you want so i put center=markers.
Zoom is how close you want to zoom in the map
Size the size you want of the picture.
Take a look here
http://code.google.com/intl/el-GR/apis/maps/documentation/staticmaps/
在这种情况下,您可以使用此处的 Google Static Maps API。
出于存储和带宽目的,您只能存储该位置的 GeoPoint,并且仅在用户请求时渲染图像。
In this case you can use the Google Static Maps API, from here.
For storage and bandwidth purposes you can only storage the GeoPoint of the location and only render the image when the user requests it.
我使用curl调用从创建的$imageUrl获取图像
I used curl call for getting images from created $imageUrl