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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:03:44+00:00 2026-06-06T16:03:44+00:00

I wonder if there is a way to use zipcode instead of Lat and

  • 0

I wonder if there is a way to use zipcode instead of Lat and Lng, using this snippet or using Geocoding Requests.

    <script type="text/javascript">
        function initialize() {
            var latlng = new google.maps.LatLng(22.1482635,-100.9100755);
            // var latlang = new google.maps.zipcode(7845); <- Is there a way to do that?
            var myOptions = {
                zoom: 8,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };

            var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
            var marker = new google.maps.Marker({
                position: latlng,
                map: map,
                title:"zipcode"
            });

        }
    </script>
  • 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-06T16:03:45+00:00Added an answer on June 6, 2026 at 4:03 pm

    You can use the Google GeoCode API to request the latitude and longitude for the zipcode and go from there.

    The API Request URL would look like this if you wanted to do this directly or via some other medium

    http://maps.googleapis.com/maps/api/geocode/json?address=50323&sensor=false

    Where 50323 is your zip code.

    Or you could use the google Javascript API to do this all via jQuery.

    var geocoder; //To use later
    var map; //Your map
    function initialize() {
      geocoder = new google.maps.Geocoder();
      //Default setup
      var latlng = new google.maps.LatLng(-34.397, 150.644);
      var myOptions = {
        zoom: 8,
        center: latlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
      }
      map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    }
    
    //Call this wherever needed to actually handle the display
    function codeAddress(zipCode) {
        geocoder.geocode( { 'address': zipCode}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            //Got result, center the map and put it out there
            map.setCenter(results[0].geometry.location);
            var marker = new google.maps.Marker({
                map: map,
                position: results[0].geometry.location
            });
          } else {
            alert("Geocode was not successful for the following reason: " + status);
          }
        });
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder if there's some way of doing this, or even if it should
I wonder whether there is a way to use fastzip to zip a directory,
I wonder if there's a way to use scheduled tasks with SQL Azure? Every
I wonder if there is a way to use the fancybox with Image maps?
i wonder if there is a way to change the use audio port for
I wonder if there is a way to use ungreedy matching in JavaScript? I
I wonder if there is better way of validating text box than using KeyDown
after using this excellent peace of software called FireWatir, I wonder if there is
I wonder if there is a way to use a custom string value (e.g.
I wonder if there is a way to reduce compilation time when using Ajc

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.