How to add or show the border of the Google maps v3 zip code

After searching for a zip code through a geocoder, I want to show the border around this zip code area, as shown on google maps. I have an example search 02201 on maps.google.com and it shows a border around the entire zip area that indicates the entire area under that zip range. here is my code that is looking for zipcode using a geocoder, and I want to add a border around this zip.that area that I want to implement. Please provide any solution. 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); } }); } 
+1
source share
1 answer

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

+2
source

Source: https://habr.com/ru/post/1443651/


All Articles