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 6341027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:56:52+00:00 2026-05-24T19:56:52+00:00

How can I input a set of coordinates and have Google maps show a

  • 0

How can I input a set of coordinates and have Google maps show a location. This is all to be done through javascript (ie: no user interface)

Any help is appreciated

  • 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-24T19:56:53+00:00Added an answer on May 24, 2026 at 7:56 pm

    Note: If you already have a latitude/longitude, see Alteveer’s answer.

    You’ll need to need to use a geolocation service to get the latitude/longitude. Google Maps has one built in:
    http://code.google.com/apis/maps/documentation/javascript/services.html#Geocoding

    Here’s an example of how to use it:

    <!-- Placeholder for the Google Map -->
    <div id="map" style="height: 512px;">
      <noscript>
        <!-- http://code.google.com/apis/maps/documentation/staticmaps/ -->
        <img src="http://maps.google.com/maps/api/staticmap?center=1%20infinite%20loop%20cupertino%20ca%2095014&amp;zoom=16&amp;size=512x512&amp;maptype=roadmap&amp;sensor=false" />
      </noscript>
    </div>
    
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
    
    // Define the address we want to map.
    var address = "1 infinite loop cupertino ca 95014";
    
    // Create a new Geocoder
    var geocoder = new google.maps.Geocoder();
    
    // Locate the address using the Geocoder.
    geocoder.geocode( { "address": address }, function(results, status) {
    
      // If the Geocoding was successful
      if (status == google.maps.GeocoderStatus.OK) {
    
        // Create a Google Map at the latitude/longitude returned by the Geocoder.
        var myOptions = {
          zoom: 16,
          center: results[0].geometry.location,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map"), myOptions);
    
        // Add a marker at the address.
        var marker = new google.maps.Marker({
          map: map,
          position: results[0].geometry.location
        });
    
      } else {
        try {
          console.error("Geocode was not successful for the following reason: " + status);
        } catch(e) {}
      }
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my form I have a set of input boxes where a user can
If I am creating say a input field through MXML , I can set
I have a text-box into which a user can input a comment. The comment
I'm trying to get edit text to behave in this way: User can input
I have a UIWebView where user can input stuff by a native keyboard. Is
I have a very large input set that looks something like this: Label: foo,
I have a field where the user can input text and I want them
The input can set the placeholder, but if the user focus on that input
I have created an edit text box where the user can input information. As
We are building a service that uses location-based pricing. The user can input an

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.