zipcode - Is it possible to send a zip code to maps V3 API to return a map centered on that zip code? -
i need display map on web page - have user's address info, security purposes need map centered on centroid point of zip code or city, not specific address.
is possible submit zip code google maps v3 api , have return map of postal code / zip-code?
or have first geocode zip code , submit lat/long?
this how doing using yahoo...
//assign zipcode database zipcode variable zipcode = ouser("zipcode") <script type="text/javascript" src="http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=x"> </script> // create container <div id="map" class="map"> <script type="text/javascript"> // create map object var map = new ymap(document.getelementbyid('map')); // display map centered on zipcode map.drawzoomandcenter("<%=zipcode%>", 5); </script>
if go google.com/maps , enter 5 digit zip code, website return map centered on central point of zip code. script above did same thing on website (until yahoo discontinued map service).
i’d same thing using google api – i’ve seen far indicates have send long/lat string of zip-code centroid point api - fine (we have zip-code/long/lat table in database) – requires more server work on our end – or on google’s if geocode zipcode on fly). i’d keep efficient possible , send postal_code if possible.
can done?
thanks,
- michael
Comments
Post a Comment