I have a PHP photo gallery that reads the GPS coordinates from images. I’d like to modify it to use the coordinates and include a google map on the photo page. Is there a simple way to display a google map on an HTML page by supplying just this pair of information?
Thanks.
The following are a few examples that you may help you getting started:
Using the Google Maps API v2:
You simply need to change the latitude and longitude in the
GMap2.setCenter()method. The last paramater is the zoom level.Using the Google Maps API v3:
When using version 3 of the Maps API, you would need to pass your parameters as options to the
google.maps.Map()constructor. The above example should be self explanatory.Using the Static Map API:
The Static Map API, as luca suggested might be a very good idea.
Simply pass the the latitude and longitude paramaters in an image tag, as in the example above. It would display the map below, directly rendered from Google: