1

After searching zip code through geocoder i want to show boundary around that zip code region as shown in google maps. i have search 02201 as example in maps.google.com and it shows boundary around the whole zip region which indicates all the area under that zip range. here is my code which search zipcode using geocoder and i want to add boundary around that zip region.that i want to implement. please provide any solution. please see this link for image http://i46.tinypic.com/beyerq.jpg

function codeAddress() {
    var address = document.getElementById("address").value;
    geocoder.geocode( { 'address': address}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
        map.setCenter(results[0].geometry.location);
         map.fitBounds(results[0].geometry.viewport);
        var marker = new google.maps.Marker({
            map: map,
            position: results[0].geometry.location
        });
      } else {
        alert("Geocode was not successful for the following reason: " + status);
      }
    });
  }
j0k
  • 22,600
  • 28
  • 79
  • 90
pranay verma
  • 19
  • 1
  • 1
  • 3
  • Did you even search this website first? – MrUpsidown Oct 24 '12 at 14:37
  • 3
    try to improve the format of your post by putting your description above the code sample. Next describe what your code sample does (it's not clear) and why it doesn't work. Tell us what you've tried so far, including at least googling the topic or reading documentation. If you want others to put effort into answering you, you have to put in effort first :) good luck. – Morgan T. Oct 24 '12 at 14:41
  • sorry to miss understand you, – pranay verma Oct 25 '12 at 09:26
  • please tell me if you get the question or not? – pranay verma Oct 25 '12 at 13:37

1 Answers1

2

Sounds like you are trying to do something like this, but with a query to show only the specified zip code polygon. Like this similar post or this one.

Community
  • 1
  • 1
geocodezip
  • 158,664
  • 13
  • 220
  • 245