简体   繁体   English

如何在具有经度和纬度的iframe中显示地图

[英]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.

相关问题 如何在Google地图上显示多个经度和纬度 - How to display multiple Latitude and Longitude on Google Map 如何在一个 map 中显示 3 个纬度和经度(标记)? - how to display 3 latitude & longitude (Marker) in one map? 即使纬度和经度具有相同的值,我如何在谷歌 map 上显示所有标记? - How do i display all markers on google map even if latitude and longitude having same values? 如何将地址转换为经度和纬度,然后在页面上显示地图 - How to convert an address to longitude and latitude then display a map on the page 如何在JPG地图上叠加经度和纬度标记? - How to overlay Longitude & latitude markers on JPG map? 如何获得谷歌地图中心的经纬度 - How to get latitude and longitude of center of google map 如何将Google地图集中到纬度和经度位置? - How to center a Google Map to a latitude and longitude location? 如何获取位于Map的指针的经纬度? - How to get latitude and longitude of poiner located on Map? 如何从 object 中的数组获取经纬度数据并将其显示为 output 上的 google map 链接 - How to get longitude and latitude data from an array inside object and display them as google map link on output 从数据库中获取多个经度并在Google地图上显示其标记 - fetch multiple latitude and longitude from database and display their marker on google map
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM