driving-directions

Google Maps Directions in current traffic with waypoints

♀尐吖头ヾ 提交于 2021-02-04 19:11:14
问题 I am using the google maps api to get directions with the durationInTraffic option. var request = { origin: start_address, destination: end_address, waypoints: waypts, durationInTraffic: true, optimizeWaypoints: true, travelMode: tmode }; directionsService.route(request, function(response, status) { .... This is working fine with a start and end address with no waypoints, as seen below: My problem is that when i add a waypoint to to route then the "time in current traffic" estimate is no

Google Maps Directions in current traffic with waypoints

邮差的信 提交于 2021-02-04 19:10:14
问题 I am using the google maps api to get directions with the durationInTraffic option. var request = { origin: start_address, destination: end_address, waypoints: waypts, durationInTraffic: true, optimizeWaypoints: true, travelMode: tmode }; directionsService.route(request, function(response, status) { .... This is working fine with a start and end address with no waypoints, as seen below: My problem is that when i add a waypoint to to route then the "time in current traffic" estimate is no

Google Maps Directions in current traffic with waypoints

不想你离开。 提交于 2021-02-04 19:08:12
问题 I am using the google maps api to get directions with the durationInTraffic option. var request = { origin: start_address, destination: end_address, waypoints: waypts, durationInTraffic: true, optimizeWaypoints: true, travelMode: tmode }; directionsService.route(request, function(response, status) { .... This is working fine with a start and end address with no waypoints, as seen below: My problem is that when i add a waypoint to to route then the "time in current traffic" estimate is no

Directions API total distance & duration with waypoints

白昼怎懂夜的黑 提交于 2020-04-11 07:40:22
问题 I am getting directions including waypoints from Directions API in my Android app. It contains multiple "leg" segments which has its own distance and duration. Is there a way to sum all distances and durations get the total values? Example: Stripped json segment from Direction API legs": [ { "distance": { "text": "389 km", "value": 389438 }, "duration": { "text": "6 hours 31 mins", "value": 23452 } }, { "distance": { "text": "0.5 km", "value": 487 }, "duration": { "text": "2 mins", "value":

Directions API total distance & duration with waypoints

生来就可爱ヽ(ⅴ<●) 提交于 2020-04-11 07:40:10
问题 I am getting directions including waypoints from Directions API in my Android app. It contains multiple "leg" segments which has its own distance and duration. Is there a way to sum all distances and durations get the total values? Example: Stripped json segment from Direction API legs": [ { "distance": { "text": "389 km", "value": 389438 }, "duration": { "text": "6 hours 31 mins", "value": 23452 } }, { "distance": { "text": "0.5 km", "value": 487 }, "duration": { "text": "2 mins", "value":

Changing titles of endpoint markers in a Google Maps route

亡梦爱人 提交于 2020-01-17 04:36:06
问题 I have a simple test webpage, which displays driving directions: It works well, but my problem is that the start and end markers of the shown route have the meaningless titles "A" and "B". I would like to use ReverseGeocoding to fetch the titles of the 2 route endpoints. So I have prepared the following code and the addresses are fetched correctly and are printed out using console.log : <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta

Directions and Route in iPhone using Bing Map

末鹿安然 提交于 2020-01-03 17:08:08
问题 Can we load a Bing Map in iPhone and show Route between source and destination points thourgh some waypoints. 回答1: Check out the route-me project: route-me This supports slippy map display of all kinds of maps (including Bing Maps) and also allows you to draw routes on top. However you need to make sure to have the right to use the maps in that way (make sure to check the license agreement with Bing Maps). 回答2: Great Blog post with resources for iPhone <-> Virtual Earth Dev Bing SDK for

Calculating the driving distance between two points using PHP only (Bing maps)

独自空忆成欢 提交于 2020-01-01 21:37:09
问题 I'd like to work out the distance between two points. No map. No javascript. Just the distance. I understand Google maps prohibits this and it's against their terms of service. But Bing Maps doesn't have this restriction. I want to give the points in a general format, i.e "Cambridge" "Church Street, Newcastle" How would I go about doing it? As basic as possible. It's for a mobile device. 回答1: 1.) Sign up for a Bing Maps key at http://www.bingmapsportal.com. A key is a alphanumeric string of

Is there any way to determine the driving time between two locations using Apple's Maps API?

流过昼夜 提交于 2019-12-31 02:25:29
问题 I am evaluating using google's Distance Matrix / Places / Maps API, versus Apple's Maps api for an iOS app. I am looking at the MKDirectionsRequest class, and I can't seem to find a way to determine what the driving time is between the two points. If this is possible using the apple Maps API, could someone please point me in the right direction? I am hoping it would be possible to accomplish this just using Apple's API, but it looks like this is only going to be possible with Google's API.

how to use method in AsyncTask in android?

痴心易碎 提交于 2019-12-30 07:11:29
问题 In my application I use JSON webservice to get data from Google Navigation api . I use the code is below. I got the following exception android.os.NetworkOnMainThreadException . How to use AsyncTask? here is my code. Thanks.`public class MainActivity extends MapActivity { MapView mapView ; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); System.out.println("*************1**************1"); setContentView(R.layout.activity_main); System.out.println("*******