google maps api terms - google-maps

I'm trying to use google maps API and have a question:
google says (http://www.google.com.ua/intl/en/enterprise/mapsearth/products/mapsapi.html) that if I use google maps I have restrictions for those services:
1) geocoding service
2) directions service
3) distance matrix service
4) eleveation service
but what about simple API? I mean are there any restrictions if I use lets say only function that adds marker to a map and function that shows the place on the map where particular point is located?
Thanks. Sorry for noob question but I've read terms and conditions few times and still not sure about the answer.

The restrictions i know about:
Not more than eight waypoints per route
Limited request-rates. It will be slow enough if you request one direction in one second.
No implementation on serverside. You will have to implement the Google API on clientside.
From Google:
2,500 directions requests per day.
When the mode of transportation is driving, walking, or cycling, each directions search counts as a single request.
Searching for transit directions counts as 4 requests.
Individual requests for driving, walking, or cycling directions may contain up to 8 intermediate waypoints in the request. Waypoints can not be specified for transit requests.
Concerning simple API:
There are no restrictions. :)

Related

Can you get an ideal route of multiple destinations using a single API call?

I'm trying to see if there's a way in a single API call to find the ideal route, order not mattering, between X destinations.
For example, the program has 3 destinations, Jeff's house, Amy's house, and Valerie's house. Don't really care the order we go in, but we'd like to visit each house with the least amount of driving.
Right now, I have it set up such that we try every ordering of destinations, and settle on the one with the fastest time. But having so many API calls seems inefficient, but I can't see a way in the API to do what I want. Is what I want presently possible in the google maps API?
You can use Waypoints in Directions API web service which returns a route that includes pass throughs or stopovers at intermediate locations.
By default, the Directions service calculates a route through the
provided waypoints in their given order. Optionally, you may pass
optimize:true as the first argument within the waypoints parameter to
allow the Directions service to optimize the provided route by
rearranging the waypoints in a more efficient order.
Sample request:
https://maps.googleapis.com/maps/api/directions/json?
origin=Adelaide,SA&destination=Adelaide,SA
&waypoints=optimize:true|Barossa+Valley,SA|Clare,SA|Connawarra,SA|McLaren+Vale,SA
&key=YOUR_API_KEY
Note that requests using waypoint optimization are billed at a higher rate.
If you will be using client-side Maps JavaScript Directions Service. Refer to this documentation and example.
Hope this helps!

Understanding Requests from Google Places API for Web w Place Autocomplete

We are considering using Google Places API for a new web application project and I believe we are vastly underestimating the number of requests we would use.
We would be using place search, Maps JavaScript API map load to grab Place IDs from Google as well as Place Autocomplete to help users find the defined location. So my questions are:
Would the Autocomplete be considered a request on every keystroke?
Would if also be a request when we select the suggestion (Places API)
and update to Map?
I have seen that with the premium Plan autocompletes use 0.1 Maps API Credit, while JavaScript API map load is 1 and Places API is 2 credits. Trying to understand how to count before the 150k limit and after
As mentioned in the comment of your question, Google is making some drastic changes to their collective maps API usage rates. Starting June 11th, the new pricing will go into effect.
Would the Autocomplete be considered a request on every keystroke?
As of now, places autocomplete is counted on every keystroke. Starting June 11th, you have the option to switch to session-based billing. They have different pricing rates which can be see in the pricing sheet link. Depending on your application, you'll want to use the option that minimizes API calls. I think if your use case is one time selecting of location by your users then you're better off with billing by keystroke.
Would if also be a request when we select the suggestion (Places API)
and update to Map?
Selecting a suggestion from Places API would not incur an API request (requesting the suggestions does), but updating a google map using the Map API would use an API request.
The 150k daily limit is going away in favor of the new billing rates, so I would suggest you look into that now. There are some free unlimited services still offered, like the Google Maps Embed API. Loading a map using the Embed API is not counted towards any billing (as of now).

Google Maps -> Making a circular route based on given distance?

Trying to avoid reinventing the wheel here.
Anyone knows of any API that lets one create a route that starts and ends at the user's position, given as parameter the distance required for the route?
For example, you want to take a walk. A walk of a total of 5KM from home and back to home. Any API that will work with Google Maps to offer routes?
Thanks, as always.
You can implement this with the use of Google Maps API Directions Service which receives direction requests and returns computed results.
Furthermore, with this API, you can create a route that starts and ends at the user's position by Using Waypoints in Routes .
As mentioned,
Travel time is the primary factor which is optimized, but other factors such as distance, number of turns and many more may be taken into account when deciding which route is the most efficient.
Please note, however, that the use of Directions service must be in accordance with the policies described for the Google Maps Directions API.

Reached Limit using Google Geocoding Web Service

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.

Do the markers in my Google Map count against web service requests per day?

I realize this is a pretty basic question, but I appreciate any advice you have to offer!
I wasn't clear on the rules after reading the information at https://developers.google.com/maps/licensing. It says:
Geocoding Web Service 2500 requests per day, 100 000 requests per day
Directions Web Service 2500 requests per day with 10 waypoints per request
My web app creates a JSON object with latitudes and longitudes. I load these lats and longs into the Google Map, which creates markers for each. This is a directions app.
Based on the above, if I create a driving route and then load all of my markers on the map (2200 in total), does this count as a single request? Or, will these markers be requests themselves?
Markers created from static data that you have the longitude/latitude for do not count against any quotas.
If, however, you had addresses instead of lat/lngs for the locations, and you used the Geocoding web service (not the same as the Geocoding JS service, see below) then it would count against that quota. But geocoding all the locations each time the map loaded would be a bad practice anyway -- you should cache your geocoded results for some short while, according to terms.
However, based on your tags, it sounds like you are using the JS Maps API v3. In this case you probably are not using any of the web services anyway (for example you're likely using the google.maps.DirectionService rather than the Directions Web Service), and as such the quotas you mentioned for the web services do not apply.
Instead, the main usage limit you will need to think of will be the 25k/day (for 90 consecutive days) for map loads.