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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:04:40+00:00 2026-05-28T11:04:40+00:00

I have a postcode held in a field with ‘addr_postcode’ I need to get

  • 0

I have a postcode held in a field with ‘addr_postcode’ I need to get the Lat / Long for this post code and write the values to ‘adds_c_lat’ and ‘adds_c_long’ what is the best way to achieve this?

I think I need to use the Google API to do this as per this example but I cannot see how to get each value separately and write it into the fields

Example: http://viralpatel.net/blogs/2009/07/google-map-geocoding-tutorial-example.html

Thanks

Justin

  • 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-28T11:04:41+00:00Added an answer on May 28, 2026 at 11:04 am

    So the example code you gave from the tutorial has this.

    function geoCode(post) {
        geocoder.getLatLng(post, function(point) {
            if (!point) {
                alert(place + " not found");
            } else {
                $(".my-data-long").val(point.x);
                $(".my-data-lat").val(point.y);
            }
        });
    }
    function parsePost() {
        var post = $input.val();
        if (post.length === 5) {
            geoCode(post);
        } // end if length === 5.  If length !== 5 (i am assuming postcode = zip code)
    }
    var $input = $(".my-geo-input");
    geocoder = new GClientGeocoder();
    $input.keypress(parsePost); 
    

    All i am doing is just using jquery to check to see if the post code meets the requirements on keypress and on change, if there is a valid post code in there, then i simply fire the goeCode method which will fill in the data fields in the html.

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

Sidebar

Related Questions

I have the following code: $postcode = $form->createElement('text', 'postcode'); $postcode->setLabel('Post code:'); $postcode->addValidator('regex', false, array('/^[a-z]{1,3}[0-9]{1,3}
I need to split a UK postcode into two. I have some code that
I have a table of contacts and a table of postcode data. I need
i have this MySQL statement from a search page, the user enters there postcode
I have this table/data structure: ID Area Postcode ------------------------ 1 Area 1 EN1 1NE
I have this function that checks a UK postcode. The problem is that it
I have written the following jquery code block. When a postcode is changed on
I have a simple form: <form id=formTest name=formTest action= method=get> <input id=txtPostcode name=Postcode type=text
I have the following code: var request = new GeocodingRequest(); request.Address = postcode; request.Sensor
I have a table with postcode districts such as SA1,SA3,SA11, LL41,NP20 and I need

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.