Guest User

Untitled

a guest
May 10th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Error while doing Geocoding using Google Maps API
  2. Uncaught Error: Invalid value for property <address>:
  3.  
  4. function codeAddress(zipcode){
  5. var address = zipcode;
  6. alert("Address is: " +address);
  7. geocoder.geocode( { 'address': address}, function(results, status) {
  8. if (status == google.maps.GeocoderStatus.OK) {
  9. map.setCenter(results[0].geometry.location);
  10. var marker = new google.maps.Marker({
  11. map: map,
  12. position: results[0].geometry.location
  13. });
  14. } else {
  15. alert("Geocode was not successful for the following reason: " + status);
  16. }
  17. });
  18. }
  19.  
  20. <input type="button" value="Geocode" onclick="codeAddress(<%=resultset.getString(3)%>)">
Advertisement
Add Comment
Please, Sign In to add comment