googleapis is not displaying map randomly some times - google-maps

We are using API for static maps. Some times map is not displayed with the correct information, Instead it displays a crossed image . This is happening randomly for few seconds.
Ex1: https://maps.googleapis.com/maps/api/staticmap?center=51.4666667,-116.5833333&zoom=11&size=380%20x%20380&sensor=false&markers=51.4666667,-116.5833333
Ex2: https://maps.googleapis.com/maps/api/staticmap?center=51.4355096,-0.405238800000006&zoom=13&size=380%20x%20380&sensor=false&markers=51.4355096,-0.405238800000006
Thanks,
Kris

Most websites and applications may use the Google Static Maps API free of charge. However, if you consistently generate a high amount of traffic, usage limits apply and you will need to pay for extra usage. If your site or application generates 25,000 Static Maps image requests or more each day, for more than 90 consecutive days, Google will attempt to get in touch with you to talk about payment. Don't worry, if you go over the limits, Google won't immediately shut off your API access or display error messages on your site.
It is recommended that you sign up for an API key, so that you can track your usage via the Google APIs Console. Please note also that the following additional limits apply to applications that don't use an API key: 1,000 Static Maps image requests per IP address per 24 hour period, and 50 Static Maps image requests per IP address per minute.

Related

Google maps error after some time that is fixed 00.00 Pacific time

We are querying google maps service for static map image that stops working after some time (usually later in a day) with "StaticMaperror/Signature" error but we are not using Signature.
The problem is usually automatically gone after 00.00 AM (Pacific time) next day. There are no limits/thresholds configured on Google console portal for this API/key and it's not clear why we are getting this error after some time as it clearly looks like connected to some threshold/requests limit on on Google console portal
https://maps.googleapis.com/maps/api/staticmap?center=USA&zoom3&size=395x272&maptype=roadmap&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Based on this documentation, you are only allowed up to 25,0000 unsigned(no digital signature) static maps requests per day.
It is possible that you are hitting this limit which causes you to get those errors.
For more than requests 25, 000 requests, you are required to include a digital signature in your Static Maps API request. Here's a guide on how to generate a digital signature.
If you are still having issues or concerns regarding your specific Google Maps project, you can always reach out to Google Maps Platform support.
Hope this helps!

Regarding Places Library for Google Maps API Quota limits

Quick question, just to clarify the wording and meaning (because it's changed a couple of times for Map loading...)
There are the two following statements in the Places API FAQs:
The Google Places API has the following query limits:
Users with an API key are allowed 1 000 requests per 24 hour period.
Users who have verified their identity through the APIs console are
allowed 100 000 requests per 24 hour period. A credit card is required
for verification, by enabling billing in the console. We ask for your
credit card purely to validate your identity. Your card will not be
charged for use of the Places API. While the lower limit is sufficient
for development and testing, we recommend enabling the higher limit
before launching your application. It is possible to request an
additional quota. If granted, the additional quota is free of charge.
If, at some stage in the future, an option becomes available to pay
for an additional quota, that quota will be over and above the
existing free quota, and you will need to sign up for it explicitly.
Note that some services may have a multiplier:
The Text Search service is subject to a 10-times multiplier. That is,
each Text Search request that you make will count as 10 requests
against your quota. The Radar Search Service is subject to a 5-times
multiplier. That is, each Radar Search request that you make will
count as 5 requests against your quota. If you've purchased the Google
Places API as part of your Maps API for Business contract, the
multiplier may be different. Please refer to the Google Maps API for
Business documentation for details.
This implies that use of the Google Places API is restricted to 100,000 queries per day, or 10,000 if you're doing a Text Search.
However, on the Uplift page, it says the following:
If you are developing a web based application that only needs to
search for places, and is not submitting new places or Place Bumps,
you should use the Places library of the Maps API rather than using
the Places API web service. The Places library assigns a quota to each
end user rather than to each key. This means that your available quota
increases with your user base rather than being capped at a fixed
amount.
I am using the Places API in the following way:
https://maps.googleapis.com/maps/api/js?key=XXX&libraries=places
...
service = new google.maps.places.PlacesService(map);
service.textSearch(request, callback);
And also for some details searching and photo searching.
Therefore my question is; Given my usage of the Places API, am I subject to the 100,000 queries limit on my app, or am I essentially uncapped at an app level, as my quota is per end-user? (i.e. per unique IP? if I had 10,000 users I have an effective quota for my entire user base of 100,000*10,000?)
EDIT:
For clarity: if I throw my API key into https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=XXXX, it will increment my Places quota count on the Google API console, however if I run queries through my JS app, I see no quota use change. I want to make sure that i'm not suddenly going to be hit with a massive quota result.
Use of the JavaScript API services, like those provided by the Places library, have quota assigned to each end-user. It's a very similar setup as objects like the google.maps.Geocoder, which has been discussed in a bit more detail in this Geocoding Strategies article.
You may apply for an uplift to the quota so that the restriction is taken away and you have unlimited access:
https://docs.google.com/forms/d/18pkOdu0uofeI8tbQoReDVfkbOIAscLvjiKc9ZP06hEM/viewform
This form is applicable to Android, IOS and Web.

Am I banned from Google Maps?

I have created a GIS application that builds the URL for a Google Static Map.
(example: https://maps.googleapis.com/maps/api/staticmap?center=32.3077562448,36.3423937253&zoom=18&size=1280x1280&scale=2&maptype=satellite&sensor=false).
This application was working perfectly until this morning, when all these URLs started to show the following image.
Has Google banned my IP adress? If yes, how long will the ban last?
You should read the Google Static Maps Usage Limits
The Google Static Maps API has the following usage limits:
25 000 free static map requests per application per 24 hour period.
Additional image requests can be purchased on a per application basis
at the rate currently listed in the FAQ. Additional quota is purchased
through the API Console and requires the use of an API key.
If a user exceeds these limits, the server will return an HTTP 403
status and display the below image to indicate that the quota has been
exceeded:
25 000 requests per day does not seem to be the only limit though. It seems that google does deny access if requests per 15 minutes exceed some 100 or so for a single IP Address. The image you see obviously is a result of these limitations. Usually the limit will be reset soon (after 15 to 60 Minutes).

Is Google Maps blocking me?

I'm programming web application that works with Google Maps and I need to generate PDF output so I decided to use static API. My application will be using set of 1500 small map images (100*100px). I dont want to ask Google for every image thousand times a day so I wrote a script to download all images and save it to my server where images will be used from. After downloading 300 images my server gets this error:
Warning: readfile(http://maps.googleapis.com/maps/api/staticmap?size=100x100&maptype=roadmap&markers=icon:http://mediup.martinstrouhal.cz/arrs/210.png%7Cshadow:false%7C50.078522,14.436551&sensor=false&zoom=16) [function.readfile]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
Does this mean that google is blocking me permanently?
You are missing the API key.
Without including your API key The Streetview Images API is throttled by IP to 1000 images per 24 hours and 5 images per minute, both of which you are likely to hit if you do not use the key. With the key you can pull 25000 images / day
Format should be:
http://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&sensor=false&key=API_KEY
Docs for streetview include how to get an API key.
https://developers.google.com/maps/documentation/streetview/?csw=1
It's likely that Google Maps has a throttle on it that will cut off anyone abusing the API. Since you are just storing the images, put a random wait in between each request and let it run for a long time until you get all the images you need.
It depends on whether you are using the Static Maps API or if you are doing direct tile access.
Direct tile access is prohibited by Google, so they will block you if the server suspects you're pulling down tiles for caching. They don't state the limits on this for security reasons.
Static Maps has a limit of 2500 per day per IP address, but it is throttled as to how many you can pull down per second.
In any case, using Static Maps or direct tile access to save imagery for later use is against Google's ToS.
According to many sources Googled - the ban lasts for 24 hours but found no really official answer on that.
Perhaps you could inform us how long your ban was.

ASP.NET & Google Maps API Error Code "620"on shared hosting

We have a Map It feature on a Real Estate Website and its on a Shared Host, the feature basically shows you the location of a property of works fine for a few hours a day but it stops working later in the day because of error Code "620" for the map request from Google maps API KEY.
we need this issue fix immediately.
Sample could be found here http://www.luxuryrentalsmiamibeach.com/The-Setai-Miami-Beach-13
click on the Map It link to see example
The "Map It" link works flawlessly ATM. The Google error Code 620 means G_GEO_TOO_MANY_QUERIES which either means you had too many API requests per IP per day or in an unspecified time frame.
About the too many API requests per day you cannot do much besides load balancing, changing your IP or paying for the Google Maps API. About the too many API requests per time frame (e.g. 2000 requests per minute) you can do something by delaying your requests.
Also think about caching your results serverside to not put too much strain on the Google servers.
There are several tutorials available on the 620 error and how to circumvent it, just google for it. To get you started you can read "Geocoding multiple addresses"