danswill
asked on
Google Maps API limit
Hello!
I'm building a mapping tool for an internal project and I'm running into some complications. I'm trying to map a couple hundred of properties and I'm only able to map 10 at a time.
How can I increase the maximum results in Google’s geocoding API? Our application sometimes returns 1000 addressed and we want to get the longitude and latitude in a single request. Unfortunately we only get 10 results per request and the rest if showing an over query error.
Here's the code that I'm currently using:
//data = results from a json request - depending on the user input sometimes the query returns more than 10 addresses.
$.each(data, function(i, item) { geocoder.geocode( { 'address':item}, function(results, status) { //alert(status); if (status == google.maps.GeocoderStatus .OK) {
var coords = results[0].geometry.locati on
map.setCenter(results[0].g eometry.lo cation);
marker = new google.maps.Marker({
position: results[0].geometry.locati on,
map: map,
animation: google.maps.Animation.DROP ,
icon: base_url+'public/assets/im g/home-2.p ng'
});
}
else
{
if(status == google.maps.GeocoderStatus .ZERO_RESU LTS)
zeroResults++;
if(status == google.maps.GeocoderStatus .OVER_QUER Y_LIMIT)
overQuery++;
if(status == google.maps.GeocoderStatus .REQUEST_D ENIED)
requestDenied++;
if(status == google.maps.GeocoderStatus .INVALID_R EQUEST)
invalidRequest++;
error++;
}
});
});// end $.each
I'm building a mapping tool for an internal project and I'm running into some complications. I'm trying to map a couple hundred of properties and I'm only able to map 10 at a time.
How can I increase the maximum results in Google’s geocoding API? Our application sometimes returns 1000 addressed and we want to get the longitude and latitude in a single request. Unfortunately we only get 10 results per request and the rest if showing an over query error.
Here's the code that I'm currently using:
//data = results from a json request - depending on the user input sometimes the query returns more than 10 addresses.
$.each(data, function(i, item) { geocoder.geocode( { 'address':item}, function(results, status) { //alert(status); if (status == google.maps.GeocoderStatus
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
All the info available I posted already. More technical details you can probably get by contacting their sales department, as provided in the link I posted too.
ASKER