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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:31:53+00:00 2026-06-01T21:31:53+00:00

I need a google map module in my site.The map should shown according to

  • 0

I need a google map module in my site.The map should shown according to the postcotcode.the postcode will automatically convert to its address/latitude & longitude.

  • 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-06-01T21:31:54+00:00Added an answer on June 1, 2026 at 9:31 pm

    Well I did that in PHP .. Please find the code .. do an AJAX call and that will return latitude and longitude .. like

    $address = $this->input->post('address');
            $output = array();
    
            $address = str_replace(" ", "+", $address);
            $region = "IND";
            $json = file_get_contents("http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&region=$region");
    
            $json = json_decode($json);
    
            if (!empty($json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'})) {
                $output['latitude'] = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};
    
                $output['longitude'] = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};
    
    
    return $output;
            }
    

    Then set place with the returned latitude & longitude with google map API

    //var latlng = new google.maps.LatLng(-104.017031, 15.373535);
           var latlng = new google.maps.LatLng(latitude,longitude);
            var map = new google.maps.Map(document.getElementById('map'), {
            center: latlng,
            zoom: 13,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        });
    
    
         var marker = new google.maps.Marker({
            position: latlng,
            map: map,
            title: 'Set lat/lon values for this property',
             raiseOnDrag: true,
            draggable: true
        });
        google.maps.event.addListener(marker, 'dragend', function(a) {
            console.log(a);
    
            $('#latitude').val(a.latLng.lat().toFixed(4));
            $('#longitude').val(a.latLng.lng().toFixed(4));
    
           // var div = document.createElement('div');
           // div.innerHTML = a.latLng.lat().toFixed(4) + ', ' + a.latLng.lng().toFixed(4);
           // document.getElementsByTagName('body')[0].appendChild(div);
        });
    

    Please include google map.js file in your page

    Hope this helps

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

Sidebar

Related Questions

I am working with google map. According to requirements i need to set different
I write my first module on nodejs. I need parse my site from google
I need to show the google map based on the address of a contact
I need to draw multiple routes on a google map. By googeling around i
http://railskits.com/map/ Would you like to launch your own google map mashup? Need a way
I have an application based on google map, in which I need to use
Programaticly, I need to include a google Maps map to automaticly generated pdf files.
i am develope web application for factory i need to add google map with
I need to use the google map directions to show the directions between two
I need lat and lng of a point on a google map. It has

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.