Google Distance Matrix API - Usage in Python client - google-distancematrix-api

We are using Google Maps API - Distance Matrix API.
We have imported googlemaps in code and added the key and then tried the Distance Matrix API with the two basic parameters - Origin list and Destination list. Here Origin and Destination list are same, so as to make a matrix of distances between the areas.
Our Query: In the Google support documentation we found that the API will support 25 origins and 25 destinations in a single call. But for us in a single API call, only 10 origins and 10 destinations are working. If we add one more area to both origin and destination the API throws the following error - googlemaps.exceptions.ApiError: MAX_ELEMENTS_EXCEEDED.
Let me know why?
Thanks in Advance.

Related

Is there a way to get train lines that connect to a given Place of type 'train_station' [duplicate]

I've seen that you can retrieve nearby subway stations for a location using the Google Maps Places API, as explained here:
Google Maps: Retrieve nearby subway station's latitude and longtitude?
But in addition to that data, I would also like to retrieve the subway lines available at that station. Is this possible?
Currently the Places API doesn't expose this information for transit stations. There is a feature request in Google issue tracker to make it possible to retrieve lines numbers for each stop. You can find this feature request at
https://issuetracker.google.com/issues/35827961
Please feel free to star this feature request to express your interest and subscribe to further notifications from Google.

Geo Service wfs : How call by range?

I'm using the API WFS from the French Government to get geographical data. This API use OGC. (https://geoservices.ign.fr/documentation/donnees-ressources-wfs.html)
"IRIS2000" is an acronym which stood for "Islands Grouped for Statistical Information" and which referred to the target size of 2,000 inhabitants per elementary mesh. It is the basic building block for the dissemination of infra-municipal data.
I would like to get all Iris2000 data, but the API deliver 1000 objects maximum by request.
They are 49404 differents Iris2000 and I don't find the range parameter.
Could you help me please ?
WFS is a public international standard, check the specification at http://docs.opengeospatial.org/is/09-025r2/09-025r2.html.
I believe you are looking for paged request support, that is, the startIndex and count parameters: http://docs.opengeospatial.org/is/09-025r2/09-025r2.html#50

Google Places API inconsistency

Adding expected types parameter changes response result in unexpected way.
Request 1: https://maps.googleapis.com/maps/api/place/search/json?location=38.4551,-122.672045&radius=100&sensor=false&key=
Request 2: https://maps.googleapis.com/maps/api/place/search/json?location=38.4551,-122.672045&radius=100&sensor=false&types=park&key=
Both requests should return place with name: "Howarth Park" since it is of a type park. And the funny thing is that increasing radius=500 will bring back the expected result. But then how come it is returning it in the first place with no types parameter and the same radius?
This is due to the way the Google Places API processes Search Requests.
The Places API will return up to 20 establishment results within the specified radius. Additionally, area identity results may be returned to to help identify the area the establishments are located.
If no type has been specified in the Places API Search Request, these area identity results are not strictly limited to the radius specified in the request, however when a type has been specified, additional area identity results are strictly limited to the radius specified in the request.

Inadequate Google Places API response?

I'm trying to implement google places functionality in BlackBerry application. The problem is that google places api respond differently on the same request. For example, this request
https://maps.googleapis.com/maps/api/place/search/json?location=43.6775,-80.7339&radius=500&types=food&sensor=false&key=AIzaSyANf2IAm0cdm5FYFo7_uvMRfCNaVjBI5HE
sometimes returns quite big json array with around 20 places, but sometimes just "status" : "ZERO_RESULTS". What's the reason? I tried to send request from pc browser, the same picture.
Reason is very simple, in the above url you are searching for places in a radius of 500m around given location. Try increasing radius parameter(0~50000).
Also try using many place types.
eg:- &types=food|train_station|other_one|yet_another_one

Get all addresses for specific place/company

What I'm trying to do is collect all addresses for list of companies and trying to get it with Google Map Api.
For example when I search for "Burger King" at maps.google.com I recieve 600k+ results:
20 pages of detailed results I can use
Way more "pointers" on map - but they come with images as part of map data - so can't parse it.
There is new Google Places API - I'm not sure if it fit my requirements - I need to specify coordiantes+radius there so I can't get data for whole US or World.
My question is - if there any way to get that kind of data with Google API or are there any other reliable sources?
Thanks!

Resources