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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:27:35+00:00 2026-05-31T17:27:35+00:00

All the simple examples of geocoding load a hard-coded long/lat pair and then, after

  • 0

All the “simple examples” of geocoding load a hard-coded long/lat pair and then, after the map is displayed, they load the arbitrary user-supplied address. Unfortunately for me, this means the hard-coded location always appears first and then the map shifts to the user-supplied address. What I’d like to find out is how to geocode an arbitrary address first, then initialize the map to the location in one step, so that when the map appears on the screen it is already showing the correct location.

I’ve been unable to deduce how this could be done from the API docs, however. All the examples show “new google.maps.Map()” being called prior to geocoding and it appears you have to already have a location to create the map, so it’s impossible to geocode before displaying the map. On the other hand, it seems to me this would be the most common way to use a google map, so surely there’s some way to do it?

Is this possible and does anyone have an example they could point to? 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-31T17:27:36+00:00Added an answer on May 31, 2026 at 5:27 pm

    If I understood you correctly, I created a simple page here

    http://jsfiddle.net/4QGKq/1/

    1. There’s a hardcoded human readable address in the HTML (“Sardegna”)
    2. The geocoder figures out LatLng from Sardegna
    3. Map is created and centered there.

    To change the default map center, change the address in the Source HTML panel, not the textbox, then click on the blue “Run” button.

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

Sidebar

Related Questions

Here's a very simple Prototype example. All it does is, on window load, an
I am new to XML and have been trying some simple examples and they
I can get simple examples to work fine as long as there's no master
I am trying to work through simple examples to see all the changes in
I've been looking all over for a simple example of how to have an
I am using running a simple find all and paginating with willpaginate, but I'd
Really simple question - how do I do a search to find all records
A basic simple question for all of you DBA. When I do a select,
So all I need is a simple function that sets it up (eating incoming
If all that you're doing is a simple one-pass iteration (i.e. only hasNext() and

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.