I'm trying to limit the amount of information returned from a get by using the extended properties and projections (property-KEY), but I get the same information regardless of what I specify in the get request.
For example, from OAuth playground
//www.google.com/m8/feeds/contacts/default/thin?v=3.0&max-results=10&q=mytest#gmail.com
//www.google.com/m8/feeds/contacts/default/property-familyName?v=3.0&max-results=10&q=mytest#gmail.com
//www.google.com/m8/feeds/contacts/default/full?v=3.0&max-results=10&q=mytest#gmail.com
Am I interpreting the API correctly for projections? I expected to get only the family-Name when I specify a projection of property-familyName?
Related
I would like to develop a service, using Google Distance Matrix API, where a user can enter their current location and a map will be displayed showing how many other users from their group have addresses in the same general area. For privacy reasons, I do not want to show any other details (location, name, address etc.) of those other users just the number of people.
In order to ascertain this information I was intending to make a call to the API and displaying under the map of their area a message like "There are 5 other people within a 3 minute drive of your address".
Can anybody tell me whether this meets the API limitation:
The Google Maps Distance Matrix API may only be used in conjunction with displaying results on a Google map. It is prohibited to use Google Maps Distance Matrix API data without displaying a Google map
If my requirements of the API are not acceptable, could anybody suggest another publicly available API that I could use in its place?
Thanks!
Yournavigation Api gives you distance from given points.
Try this request example.
You can find their usage policy here.
They said that there are no limitations on usage, except those regarding overload:
The routing API is open and freely available for everyone under the condition that you don't overload the server. Overloading the server in this context means: more then 1 request per second for sustained periods of time. Bursting multiple requests for short time-periods is not a problem though
I am using google api "place auto-complete" to show the address suggestions based on user's input. My rest api call is as below. It's returning me the results but in a random order. I want to sort the result based on the distance from given location. Is there a parameter to specify that in request or how can i do that? (i don't want to use google place search api as i just need it for auto-complete.)
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Amoeba&types=establishment&location=37.76999,-122.44696&key=YOUR_API_KEY
There is no parameter to order places autocomplete results by the distance from the given point.
I can see that somebody has already filed this feature request in Google issue tracker:
https://issuetracker.google.com/issues/65241727
Feel free to add a comment on the feature request to explain your use case and star the feature request to add your vote.
This is method I use to get more relevant results on Google Autocomplete API.
Set "location" and "origin" parameters to the user location.
Set radius to 500
This does not limit the request but prioritizes the response based on the user location.
You can also increase the relevancy further by sorting the "distance_meters" field on the response.
I'd like to programatically get a list of all of the valid place types for search requests. I can look at the list here, but would like to be able to query the server and get a json list so I can keep it up to date automatically instead of having to check the linked page periodically.
Is there an API for that?
I am using the Google Maps API for my backend service written in Java.
I want to use a full address (1000 Generic Street, Generic Town, Texas) in the API; however, I am getting back null responses from the api call when using 1000+Generic+Street,+Generic+Town,+Texas in the ORIGIN space. What am I doing wrong?
Even when I use WACO,+TEXAS I get null responses.
Here is the API call:
https://maps.googleapis.com/maps/api/directions/json?origin=ORIGIN&destination=DESTINATION&key=0000
Here is an example:
https://maps.googleapis.com/maps/api/directions/json?origin=1800%20Manor%20Road,%20Austin,%20TX%2078722&destination=6501%20Memorial%20Drive,%20Houston,%20TX%2077007
If you have a valid key use it otherwise just remove &key=0000 until you get a valid key
More Info here
I have implemented Google Places API with autocomplete and Google Geocoding Api. The problem is that it seems that the results do not work correctly.
Sometimes some of the choosen results from the autocomplete list do not geocode at all, all i get is the status ZERO_RESULTS.
I know that there could be some problems regarding the fact that Google Autocomplete uses also Places, while Google Geocode uses only postal codes, but how could i limit autocomplete to give me only postal codes results.
Place Types
You may restrict results from a Place Autocomplete request to be of a certain type by passing a types parameter. The parameter specifies a type or a type collection, as listed in the supported types below. If nothing is specified, all types are returned. In general only a single type is allowed. The exception is that you can safely mix the geocode and establishment types, but note that this will have the same effect as specifying no types. The supported types are:
geocode instructs the Place Autocomplete service to return only geocoding (address) results. Generally, you use this request to disambiguate results where the location specified may be indeterminate.
establishment instructs the Place Autocomplete service to return only business results.
the (regions) type collection instructs the Places service to return any result matching the following types:
locality
sublocality
postal_code
country
administrative_area1
administrative_area2
the (cities) type collection instructs the Places service to return results that match either locality or administrative_area3.
Hope this helps
https://developers.google.com/places/documentation/autocomplete
There is no way to achieve it via an Autocomplete.
When you type in a autocomplete the API first will request the predictions, but not the details.
This means that at the time when you see the predictions it's still not clear if there are details available for this place.
There are cases when the particular place can't be found. I'm sure when it would be possible for google to exclude the missing places they wouldn't return them at all.
The only workaround I see would be to create the autocomplete on your own by requesting both, predictions and details , before you apply the predictions. But note: each time the user types into the input this will count as 6 requests(assuming 5 predictions will be returned)