使用JavaScript访问MySQL数据库以在Google Maps API V3上添加标记 [英] Accessing MySQL database to add markers on Google Maps API V3 using JavaScript
问题描述
我决定使用webview和Google Maps API v3,因为我想配置地图并从中删除兴趣点。我也选择使用它,因为我想限制地图的缩放和平移功能。
我已经成功完成了这些工作。
现在,我想询问任何人是否可以使用我的MYSQL数据库中的数据向地图添加标记。我的数据库包含以下内容:
- 地点名称
- 经度和纬度值
- 以及对地点的简要描述
我在这里读过一个问题,当点击一个标记时显示一个信息窗口,但是我想知道是否可以在一个infowindow被点击的时候将用户指向一个链接。
任何帮助都会非常感谢。
标题中的问题:
要显示MySQL中的标记,请参阅本文文档的文章部分:
在Google Maps中使用PHP / MySQL 第二个问题
我想知道是否有可能在用户点击infowindow时将用户导向链接。
如果你在一个infowindow中加入了一个链接,它就可以工作。如果您在发布问题时遇到问题,或者显示问题的地图链接。
I am currently developing an Android Application that has Google Maps integrated into it.
I decided to use webview and Google Maps API v3 because I want to configure the map and delete the Points of Interest from it. I also chose to use it because I want to limit the zoom and panning capabilities of the map. I have successfully done these things.
Now, I want to ask anyone if it is possible to add markers to the map using the data from my MYSQL database. My database contains the following:
- The name of the place
- The Longitude and Latitude values
- And a brief description of the place
I've read a question here that says how to display an info window when a marker is tapped, but I am wondering if it is possible to direct a user to a link when an infowindow is tapped.
Any help will be much appreciated. Thanks in advance.
The question in the title: To display markers from MySQL, see this article from the articles section of the documentation: Using PHP/MySQL with Google Maps
The second question
I am wondering if it is possible to direct a user to a link when an infowindow is tapped.
If you put a link in an infowindow, it will work. If you are having problems with that post the code or a link to your map that exhibits the problem.
这篇关于使用JavaScript访问MySQL数据库以在Google Maps API V3上添加标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!