Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle geocoder failing due to over_query_limit
    primarykey
    data
    text
    <p>I'm filling four form fields using reverse geocoding. The form fills correctly but then I receive an error stating OVER_QUERY_LIMIT. On checking the JS console of chrome I see that five identical calls have been made before I received the error message. I'm unsure why my code is making several requests. Could someone please point out what I should change in my loops in the codeLatLng function. That's most likely where the problem is.</p> <pre><code>var geocoder; function getCity() { geocoder = new google.maps.Geocoder(); } if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(successFunction, errorFunction); } //Get the latitude and the longitude; function successFunction(position) { var lat = position.coords.latitude; var lng = position.coords.longitude; //alert("Success funciton" + lat + " " + lng); codeLatLng(lat, lng) } function errorFunction(){ AppMobi.notification.alert("For the best user experience, please ensure your device GPS and geolocation settings are enabled.","Geolocation disabled","OK"); } function codeLatLng(lat, lng) { //alert("codeLatLng fn started"); var latlng = new google.maps.LatLng(lat, lng); geocoder.geocode({'latLng': latlng}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { console.log(results) if (results[1]) { //formatted address //alert(results[0].formatted_address) //Complete address $("#address1").val(results[0].formatted_address); } else { alert("No results found. Please enter the data manually."); } } else { alert("Geocoder failed due to: " + status +". Please enter the data manually." ); } }); </code></pre> <p>Many Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload