Accessing MySQL database to add markers on Google

2019-07-31 08:15发布

问题:

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:

  1. The name of the place
  2. The Longitude and Latitude values
  3. 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.

回答1:

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.