Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 687095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:05:31+00:00 2026-05-14T02:05:31+00:00

I have a PHP photo gallery that reads the GPS coordinates from images. I’d

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:05:31+00:00Added an answer on May 14, 2026 at 2:05 am

    The following are a few examples that you may help you getting started:


    Using the Google Maps API v2:

    <!DOCTYPE html>
    <html> 
    <head>
       <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false" 
               type="text/javascript"></script>
    </head> 
    <body onunload="GUnload()">
       <div id="map" style="width: 400px; height: 300px"></div> 
    
       <script type="text/javascript"> 
          var map = new GMap2(document.getElementById("map"));
          map.setCenter(new GLatLng(51.49, -0.12), 8);
       </script> 
    </body> 
    </html>
    

    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:

    <!DOCTYPE html>
    <html> 
    <head>
       <script type="text/javascript" 
               src="http://maps.google.com/maps/api/js?sensor=false"></script>
    </head> 
    <body>
       <div id="map" style="width: 400px; height: 300px"></div> 
    
       <script type="text/javascript"> 
          var myOptions = {
             zoom: 8,
             center: new google.maps.LatLng(51.49, -0.12),
             mapTypeId: google.maps.MapTypeId.ROADMAP
          };
    
          var map = new google.maps.Map(document.getElementById("map"), myOptions);
       </script> 
    </body> 
    </html>
    

    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:

    <img src="https://maps.google.com/maps/api/staticmap?center=51.49,-0.12&zoom=8&size=400x300&sensor=false" style="width: 400px; height: 400px;" />
    

    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:

    Using the Static Maps API


    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a photo gallery script in PHP and have a single directory where
I have a simple form that generates a new photo gallery, sending the title
My problem is that I have a PHP that lists images in a folder
I have got a PHP image gallery, which has about 20000 photo files. I
I am building a small gallery that will only have 20 or so images
I have a photo gallery that has a previous and a Next link. When
I'm using the photo slider code from here: http://tympanus.net/codrops/2010/10/07/slider-gallery/ and trying to modify it
So have rewritten my ugly php URL to something prettier: RewriteEngine On RewriteRule ^main/photo([^/\.]+)/?.html$
I have php code that puts some values into an Array as follows: $hunter=addslashes($MessageArray[1]);
I have PHP script works without problems, like this : while($row4 = mysql_fetch_array($result4)) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.