[英]how to display map in iframe having latitude and longitude
我已经在数据库中保存了两个参数(经度和纬度),如何仅使用html5 widhout jQuery或javascript在iframe中生成地图(谷歌)
Google offers a "Static Maps API" which seems to cover everything you need: Google提供了一个“静态Maps API”,该API似乎可以满足您的所有需求:
https://developers.google.com/maps/documentation/staticmaps/ https://developers.google.com/maps/documentation/staticmaps/
For example, a map centered on 40°N 70°W would look like: 例如,以40°N 70°W为中心的地图如下所示:
http://maps.googleapis.com/maps/api/staticmap?center=40,-70&zoom=5&size=600x300 http://maps.googleapis.com/maps/api/staticmap?center=40,-70&zoom=5&size=600x300
So you just put in the coordinates and give the address to your iframe. 因此,您只需输入坐标并将地址提供给iframe。 For the exact configuration, all other possible parameters are explained in the API documentation. 对于确切的配置,API文档中说明了所有其他可能的参数。 The given example already uses "zoom" and "size". 给定的示例已使用“缩放”和“大小”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.