google-direction

Call requires API level 26 (current min is 23): java.time.Instant#now

你。 提交于 2020-01-25 09:51:08
问题 I'm implementing Google's Directions API. My app supports minSdkVersion 23 and java.time.Instant is not supported here. Is there a solution for this, or should i just check for user's version and allow this functionality if it's version is supported? DirectionsResult directionsResult = DirectionsApi.newRequest(geoApiContext) .mode(TravelMode.DRIVING) .origin(new com.google.maps.model.LatLng(mapFragment.getUserCoords().latitude, mapFragment.getUserCoords().longitude)) .destination

Maps SDK for Android not able to enable in console cloud

拟墨画扇 提交于 2020-01-21 19:17:10
问题 I'm facing the issue while enabling the Maps SDK for Android in cloud console https://console.cloud.google.com/ It will through the following errors screenshot attached I got an error can't complete this transaction after that when I click the form it will take some other page here is the link https://support.google.com/pay/contact/account_verification after I submit my all document ill get the following response from google they posted 28-48 hours we will contact but there is no response

Server-side waypoint limit for Google Directions API

牧云@^-^@ 提交于 2020-01-06 08:18:07
问题 I am trying to access the 23 waypoint limit in the Google Directions API. Based on Google Maps Directions API Standard Usage Limits: 2,500 free directions requests per day, calculated as the sum of client-side and server-side queries. UP TO 23 WAYPOINTS ALLOWED IN EACH SERVER-SIDE REQUEST, or up to 8 waypoints when using the Directions service in the Google Maps JavaScript API. 50 requests per second, calculated as the sum of client-side and server-side queries. I currently have a Server API

Getting No response from google direction api

扶醉桌前 提交于 2020-01-05 08:08:36
问题 I am using google direction api to get direction/routes between two places. When I query http://maps.googleapis.com/maps/api/directions/json?origin=New%20York%20LaGuardia%20Airport%20Marriott,%20Queens,%20NY,%20United%20States&destination=200%20e%2057th%20st%20ny&sensor=false Iam getting Status = NOT_FOUND. But when I search this path from New York LaGuardia Airport Marriott, Queens, NY, United States to 200 e 57th st ny using https://maps.google.com/. Google display a direction path between

My Directions API request is Invalid, but Why?

百般思念 提交于 2020-01-03 05:52:08
问题 http://maps.googleapis.com/maps/api/directions/json?origin=Central+Hong+Kong&destination=Sai+Kung&sensor=false&mode=transit The request works fine without the mode=transit parameter, but the results only include driving directions. With the last parameter added, I get this: "status" : "INVALID_REQUEST" What can I do to make this work? There are definitively transit options available, they are listed in Google Maps. 回答1: INVALID_REQUEST indicates that the provided request was invalid. Common

Change Google map marker orientation according path direction

丶灬走出姿态 提交于 2019-12-27 19:09:32
问题 I'd like to know if it possible to change the marker orientation according the path drawn on the map. Here is a example: As you can see the marker is a car (with front bumper and tail lights). I'd like to orientate the car in the direction the path is going (in this exemple orientate the car around 45 degrees to the right). I'm using DirectionsService to draw the path and I have a random number of point. Sometime only one, sometime 10 points. I'm adding the markers before drawing the paths.

Google Map itinerary from geoJSON file

天涯浪子 提交于 2019-12-25 18:48:32
问题 I'd like to draw an itinerary between 2 markers which are defined in this geoJSON file: { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-73.563032, 45.495403]}, "properties": {"prop0": "value0"} }, { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-73.549762, 45.559673]}, "properties": {"prop0": "value0"} } ] } The two markers are displayed well on the map. Now I want to create an itinerary (car), between those

how to calculate distance and duration for multiple locations using Distance Matrix or other google APIs?

落花浮王杯 提交于 2019-12-25 09:11:36
问题 I want to calculate distance and time for below scenario, Start Point : A A to 1(via)(2 km)(2 min) A to 2(via)(5 km)(7 min) A to 3(via)(8 km)(13 min) A to B(16 km)(22 min) End Point : B because of this I get the path through Distance Matrix, then Google Map returns the shortest established path between points. But I don't want shortest, I want to calculate via. Please tell me hint or proper way. 回答1: public class DirectionsJSONParser { /** * Receives a JSONObject and returns a list of lists

Avoid some coordinates in routes using Google Directions API Android

淺唱寂寞╮ 提交于 2019-12-25 04:42:50
问题 I want to avoid some coordinates while using directions APIs.I have read the below blog https://code.google.com/p/gmaps-api-issues/issues/detail?id=214 Which ensures that Directions API doesn't allow if I want to avoid specific coordinate. Then I have tried with waypoint parameter (Which allow us to get routes that include specific coordinate) with considering same source and destination: 1) First get the routes without adding waypoint https://maps.googleapis.com/maps/api/directions/json

CORS request is not working on google directions API

此生再无相见时 提交于 2019-12-24 06:37:56
问题 Every time I try to get data from the directions API, I get No 'Access-Control-Allow-Origin' header is present on the requested resource. I've tried to do the same request to the geocode API and it works. This is the code that I'm using: var xhr = new XMLHttpRequest(); xhr.open('GET', 'https://maps.googleapis.com/maps/api/directions/json?origin='+encodeURIComponent(data.origin)+'&destination='+encodeURIComponent(data.destination)+'&key='+encodeURIComponent(data.key), true); xhr.send(); 回答1: