查询数据库中的地址并将其显示在谷歌地图上
我有一个数据库,其中的地址需要在谷歌地图上显示,然后在用户使用搜索表单搜索所需的地址后,该数据库会在地图上添加一个标记。我到处都看过,但我不知道如何将谷歌地图链接到数据库以显示地址并显示标记。如何连接搜索表单来查询数据库,然后将其显示在谷歌地图上?我研究了静态地图并添加标记,但我找不到如何做到这一点。我已经搜索了好几个月了,这是我完成这个项目所需的最后一条信息。有人可以指导我或告诉我该怎么做吗?我现在愿意献出我的右臂来获取这些信息。先感谢您。
I have a db with addresses I need to display on a google map that would then add a marker to the map after the user has used the search form to search for the desired address. I have looked everywhere and I do not know how to link the google map to the db to show the address and display a marker. How do I connect the search form to query the db and then display it on a google map? I have researched static maps and adding markers but I cannot find how to do this. I have been searching for months and months and this is the final peice of info i need to complete this project. Can someonen please direct me or tell me how to do this? I would give my right arm for this information by now. Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看一下这个 API,它将根据地址返回坐标:http:// code.google.com/apis/maps/documentation/geocoding/
之后,查看此处,并在地图上插入静态地图的坐标:http://code.google.com/apis/maps/documentation/staticmaps/
如果您不知道如何执行所有这些操作,我建议您阅读一些 PHP/MySQL 教程。
Take a look at this API, it will return coordinates based on an address: http://code.google.com/apis/maps/documentation/geocoding/
After that, look here, and insert the coordinates on the map for a static map: http://code.google.com/apis/maps/documentation/staticmaps/
If you don't know how to do all this, I recommend doing some PHP/MySQL tutorials.