google-maps-direction-api

Why I get this error when on google map "Failed to load DynamiteLoader: java.lang.ClassNotFoundException: Didn't find class?

a 夏天 提交于 2019-12-06 22:33:48
问题 I am trying to draw path between two latitude,longitude. Here is my MapsActivity.java. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); // Obtain the SupportMapFragment and get notified when the map is ready to be used. SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); find = (Button) findViewById(R.id.btnFindPath); or =

How do we get the shortest distance route from point A to B by default from Google Direction API

非 Y 不嫁゛ 提交于 2019-12-03 12:25:32
How do we get the shortest distance route from point A to B by default from Google Direction API suggested alternative routes? By default it gives us shortest duration routes depending upon the current traffic conditions. I have noticed that google responds with multiple alternative routes if you turn on "provideRouteAlternatives=true", I was wondering if we could send a parameter to Google API so that it will always return shortest distance route by default As Rameshwor has mentioned, the suggested route returned by Google may be optimised for journey time rather than journey distance. If one

Google Directions API

做~自己de王妃 提交于 2019-12-02 17:45:48
In the JSON output, there is a field "maneuver" within a "step". In this "turn-left", "turn-right", "turn-slight-left", etc. Example is here Where could I find the definition of the "maneuver" field, and the list of possible values? There is no relevant description here Thanks in advance Here is a visual for the lazy ones :) Can't believe google did not document this yet... UPD Believe it or not, but finally they documented it! Please see here . according to this gmaps-api-issue I think google not in hurry to document this part of api :( But I can help with this issue at least with following..

Google directions api overview polyline not working

只愿长相守 提交于 2019-11-29 18:09:31
I'm trying to show a path from the google maps directions api on a google maps static map. The url for the directions api call looks like this: https://maps.googleapis.com/maps/api/directions/json?origin=lübeck&destination=hamburg&key=MY_API_KEY I get a valid json response containing all the informations. I then want to show the encoded polyline for the path overview on a static map with this api call: https://maps.googleapis.com/maps/api/staticmap?sensor=false&size=860x600&path=enc:THE_ENCODED_POLYLINE The static map won't show the path. I suspect that the encoded polyline returned by the

Google Direction API and Google Maps App showing different routes for same destination

ⅰ亾dé卋堺 提交于 2019-11-29 17:59:49
I am working on an app in which I have to show shortest route. I am using Google Direction API but the result is different from Google Maps app for same destination and travel mode. https://maps.googleapis.com/maps/api/directions/json?origin=19.107163,72.862375&destination=19.106995400000002,72.8643029&sensor=false&mode=driving&alternatives=true&key=XXXXXXXXXXXXXXXXXX Since alternative is true I am already using shortest route from available routes (response). Note : - When I enter lat lng of origin and destination in the map app it shows same result. It shows different result only when we

Android Google Maps Direction Api - Api key restriction not working

喜欢而已 提交于 2019-11-28 13:40:47
When we are setting a Key restriction to NONE for Google Maps Direction Api, It works fine. But When we set Key restriction to Android apps and provide a proper Package name & SHA-1 certificate - It says Request Declined from Google Api response. Any known solution to this? Directions API is a web service. The restrictions that will work with an API keys for web services are IP restrictions. It is supposed that web services requests are executed on your backend servers. If you need to restrict an API key, the workaround is to create an intermediate server. Your Android application should send

Google Directions Api returning 0 routes

烂漫一生 提交于 2019-11-27 16:08:39
We are calling the google directions api to calculate round trip values. In general it works perfectly. I have however come across a use case where it fails to come up with any route. However when we use the js google.maps.DirectionsService version with the same origin, destination, waypoints, and travelMode it works. The failing call is: https://maps.googleapis.com/maps/api/directions/json?origin=-33.92873,18.458879&destination=-33.92873,18.458879&waypoints=via:-33.9403,18.666731&mode=driving&key= The response is { "geocoded_waypoints" : [ {}, {}, {} ], "routes" : [], "status" : "ZERO_RESULTS

Android Google Maps Direction Api - Api key restriction not working

北慕城南 提交于 2019-11-26 17:14:03
问题 When we are setting a Key restriction to NONE for Google Maps Direction Api, It works fine. But When we set Key restriction to Android apps and provide a proper Package name & SHA-1 certificate - It says Request Declined from Google Api response. Any known solution to this? 回答1: Directions API is a web service. The restrictions that will work with an API keys for web services are IP restrictions. It is supposed that web services requests are executed on your backend servers. If you need to