使用谷歌地图显示存储在数据库中的位置 [英] using google map to display locations stored in database

查看:163
本文介绍了使用谷歌地图显示存储在数据库中的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用谷歌地图来显示我的数据库中存在的位置,但我不知道它应该如何运作。你能帮帮我吗?我只知道如何从谷歌获取 API密钥。我非常感谢你的帮助。谢谢

Hi, I am trying to use a google map to display locations that exist in my database, but I don't how it should work. Could you please help me with this. I only know how to get the API key from google. Your help will me much appreciated. Thank you

推荐答案

您必须在数据库中存储特定位置的纬度和经度。



please看到这个链接:

http://www.aspsnippets.com/Articles/Show-Google-Maps-using-Latitude-and-Longitude-in-ASPNet.aspx [ ^ ]

和此链接中的ex3:

HTML,ASP.NET,PHP,JSP等中的谷歌地图轻松实现 [ ^ ]
You have to store latitude and longitude of a specific location in Database.

please see this link:
http://www.aspsnippets.com/Articles/Show-Google-Maps-using-Latitude-and-Longitude-in-ASPNet.aspx[^]
and ex3 in this link:
Google Maps in HTML, ASP.NET, PHP, JSP etc. with ease[^]


使用ajax对象li ke

use ajax object like
xmlhttp.open("Get","https://www.google.com/maps/preview?q="+placename,true)
xmlhttp.send(null)
 xmlhttp.onreadystatechange = function () {
                    if (xmlhttp1.readyState == 4 ||xmlhttp.Status="ok") {
                           var x = xmlhttp.responseText;
                            document.getElementById("iframe").innerHTML=x;
                              }
                         }



无需api以及与javascript相关的所有其他详细信息


No need of api and all other details related to javascript


您可以尝试GeoCoding API,用于将搜索到的地址转换为纬度和经度,可用于在Google地图中显示标记。检查链接。



https://developers.google .com / maps / documentation / geocoding / [ ^ ]



另请参阅以下链接,了解如何使用谷歌地图中标记的纬度和经度。



http://www.4guysfromrolla.com/articles/051910-1.aspx [ ^ ]



http:// www。 aspdotnet-suresh.com/2013/05/aspnet-show-multiple-markers-on-google.html [ ^ ]



希望这有助于......
You can try GeoCoding API which converts searched addresses into Latitude and Longitude which ca be used to display the Marks in Google Maps. Check the link .

https://developers.google.com/maps/documentation/geocoding/[^]

Also Refer the below links on how to use the latitude and longitude to marked in google maps.

http://www.4guysfromrolla.com/articles/051910-1.aspx[^]

http://www.aspdotnet-suresh.com/2013/05/aspnet-show-multiple-markers-on-google.html[^]

Hope this helps...


这篇关于使用谷歌地图显示存储在数据库中的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆