I have a little problem about Google Maps. I'm using Geocoding (xml) for getting address from Google Map. I give the address and Geocoding gives me long-latt values.
And when I try to bind many location Google map just shows 11 location, not more.
And it gives an warning like
"Over query limit"
How can I solve this problem?
Google limits the number of geocoding requests per second. You can either wait or cache the results somewhere in your own database.
See this related question.
Related
I am using Google Maps Geocoding Api in one of my applications in order to get addresses from a user address search term. It was working fine but now it returns only one result every time. There is also an open issue here:
Open issue with Geocoding API
Do you have any idea of what is may happenning?
From what I can see, if the search is quite generic then google returns only one result.
I use the Place Autocomplete API (https://maps.googleapis.com/maps/api/place/autocomplete) trying to get the same results as in Google Maps. Until a few days ago the result where pretty the same, but now they differ significantly: In Google Maps I get the same results as before, but in Place Autocomplete API sometimes I don't get even one result anymore.
Example: Using https://maps.googleapis.com/maps/api/place/autocomplete/json?input=wanko%20ainring&language=de&components=country:de&key=mykey I get zero results. Typing in "wanko ainring" in Google Maps I get one result with an address.
Has something internally changed in the Place Autocomplete API or am I doing something wrong?
Or maybe I should generally ask: How do I get the same results in Place Autocomplete API as in Google Maps?
Thanks for any comment.
We have a page that accepts a city, state combination or a zip code. Upon submit, it passes that information to the Geocode Webservice for Google Maps and returns a list of store location results based on the information passed. We sporadically have issues with bots hitting that page multiple times and then Google shuts down our usage of the geocode webservice for the day. Is there a way to ask Google to restore this more quickly? How should we handle this?
Use the client-side geocoder, the limits there will be based on the client not the server.
Geocoding Strategies
As specified on in the documentation, "Use of the Google Geocoding API is subject to a query limit of 2,500 requests per day (User of Google Maps API for Business may perform up to 100,000 requests per day.)"
There's a nice article on Geocoding Strategies which discusses caching and other options to optimize geocoding. The "Quota Considerations" section should be useful.
Remember to use client-side geocoding if at all possible, so that the quota limit will be counted per client, instead of per service/server. If you're still hitting the limits, you might need to go for the Business version and pay for a larger limit.
We have a pharmacy search application. We are trying to get the the input address from
user and find pharmacies around that address in a user specified raduis.
We are planning to geo code the address entered by user from a third party service.
After getting the geocodes we will search for pharmacies in our DB around that address and
display the results. With each result there will be a link which will open a new tab/window of maps.google.com displaying the location.
If we use the google geocoding API service to get geocodes will they charge for it ? I am not showing the map on my UI. Is that ok or violating the google terms ? Is the 2500 requests/day applicable for this scenario as well ? I am seeing that MapQuest is a service which will return only geocodes.
Thanks,
Avinash.
Double check with Google's Terms of Service, but generally they begin denying your API requests after you reach your limit. If you are a repeat offender, they may permanently prevent your IP from using their API. The limit is on the calls that you make to the Geocoding API and is unrelated to whether you display a map using their maps api. The following includes strategies for how to work within these limits: https://developers.google.com/maps/articles/geocodestrat
MapQuest just released their Open Geocoding Web Service, which is built using data provided by the OpenStreetMap community, and (currently) does not have a limit on the number of geocoding requests that can be made.
What is the best way to plot points on a Google map? I have a bunch of addresses (about 300) stored in my database, and right now I am outputting each address into a JS array and plotting each address by looping over the array and running a function that geocodes the address and creates a new marker. However, I'm not sure if that is the best approach. Any thoughts?
Your problem is the geocoding part. Geocoding 300 addresses in one go is slow, and you would quickly hit the daily limit.
You should consider doing the geocoding on the server-side, and caching them in your database, or somewhere else. The Google Maps API Terms of Use appear to permit the caching of geocoding results "for the purpose of improving the performance of your Maps API Implementation" (Section 10.3).
If the addresses are relatively constant, then the repeated geocoding isn't terribly efficient. You could geocode each once and submit to Google Maps only the latitude and longitude for plotting. See the KML upload information.
What I ended up doing was geocoding the addresses upon address insertion into my databas using a web service called Tiny Geocoder: http://tinygeocoder.com/.
For the existing addresses I already had, I ran a script that used this same service to loop over my result set, geocode each address, and store the lat/long in the database. It took awhile but it got the job done.