directions

Google Maps directions V3: Multiple directions on a map

时光总嘲笑我的痴心妄想 提交于 2019-12-08 06:35:03
问题 I am trying to render multiple directions(well, their Polylines, essentially) on a single instance of a map. In the prior version of the maps API, I did something like //directions[] stores the GDirections objects //x[] is an array of Elements extracted from an XMLHTTPResponse object //iterating over the values in x[] GEvent.addListener(directions[i], "load", function() { var polyline = this.getPolyline(); map.addOverlay(polyline); polyline.setStrokeStyle({opacity:0.2}) }); directions[i].load

Identify when MKRoutestep finishes

喜夏-厌秋 提交于 2019-12-07 13:53:02
问题 I am trying to implement a turn by turn navigation system in iOS using MKDirections API. I am able to get the directions of the route and can draw the polyline on the map, and when navigation starts the app start showing the instructions using the MKRouteStep object in Steps array. Now the problem is , since the distance in the MKRouteStep object is the distance that the user covers while traversing the path of the step I am unable to identify how to calculate this distance. Is there any way

Google Maps Directions intent for bicycle

天涯浪子 提交于 2019-12-06 15:20:19
问题 When using an intent to launch navigation via Google Maps Directions, is there a way to specify you want a route for walking / bicycle? 回答1: See https://developers.google.com/maps/documentation/directions/ By changing the mode and avoid parameters, the initial request can be modified to return directions for a scenic bicycle journey that avoids major highways. https://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&avoid=highways&mode=bicycling&key=API_KEY

Estimated Time Between two Locations in iOS [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-06 15:13:40
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . What is proper way to get ETA (estimated time arrival) from AnyLocation to MyCurrentLocation? I want, when use tap on any annotation, then I have to set details on the Footer according to that annotation and user's current location. Please see below image for better understanding.

Google Directions API failing to return results in iOS

六月ゝ 毕业季﹏ 提交于 2019-12-05 21:43:25
I’m trying to use Google Directions API. I have the SDK all set up. I have enabled Google Maps SDK for iOS under the Services in the developer console. Below is the URL I've built to get the directions. There are two types of keys in the developer console. First I tried with the Key for iOS apps. https://maps.googleapis.com/maps/api/directions/json?origin=-37.814107,144.96328&destination=-31.953004,115.857469&key=<Key for iOS apps> But I got the error This IP, site or mobile application is not authorized to use this API key . When I searched for a solution to this error I saw in a few

Google API (directions) - creating routes that avoid certain points [duplicate]

浪子不回头ぞ 提交于 2019-12-05 17:46:46
This question already has an answer here: Blacklisting specific roads from Google Maps/Mapquest? 4 answers Google Maps API does not seem to provide a means to create routes that avoid or tend to avoid certain points. Has anyone worked on something like this? I want to create exception rules on routes. For example: show routes that do not have traffic signals. Lightman I had the same problem and this is by far the best solution i have found. "As mentioned in another answer, this functionality is not directly available in the Google Maps API. However, I've been thinking about it, and had a

Demo for Displaying Multiple Google Directions (Google Maps API v3)

早过忘川 提交于 2019-12-05 10:47:43
Hey all, is there a functioning demo out there for displaying multiple directions routes on a single Google map? The other question on stack links to a set of snippets…I feel like I'd be able to work better I just saw a functional script in action. Thanks much! Using the snippets from the other post, I got what I wanted. Not only did I achieve multiple directions displays on the same map, but there are also unique waypoints to each directions object. Link to the demo 来源: https://stackoverflow.com/questions/5451770/demo-for-displaying-multiple-google-directions-google-maps-api-v3

swift get directions in maps app

筅森魡賤 提交于 2019-12-05 00:48:07
问题 I have an app that displays multiple locations in multiple mapviews. How can I add a button that allows the user to open one of these locations in their maps app and to get directions to it? 回答1: If you got an MKPlaceMark you can use an MKMapItem and open the Map-app with the location as launchOption : var mapItem = MKMapItem(placemark: yourPlaceMark) mapItem.name = "The way I want to go" //You could also choose: MKLaunchOptionsDirectionsModeWalking var launchOptions =

Google Maps Directions intent for bicycle

◇◆丶佛笑我妖孽 提交于 2019-12-04 23:05:17
When using an intent to launch navigation via Google Maps Directions, is there a way to specify you want a route for walking / bicycle? Tim See https://developers.google.com/maps/documentation/directions/ By changing the mode and avoid parameters, the initial request can be modified to return directions for a scenic bicycle journey that avoids major highways. https://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&avoid=highways&mode=bicycling&key=API_KEY Travel Modes When you calculate directions, you may specify the transportation mode to use. By default,

Estimated Time Between two Locations in iOS [closed]

若如初见. 提交于 2019-12-04 22:07:03
What is proper way to get ETA (estimated time arrival) from AnyLocation to MyCurrentLocation? I want, when use tap on any annotation, then I have to set details on the Footer according to that annotation and user's current location. Please see below image for better understanding. I saw this What is proper way to get ETA (estimated time arrival) from any location to my current location and this calculate time taken to cover a journey in Apple Maps But they didn't solved my problem using this. I am getting always Null response using this. I put my code below:- double latitude = -0.075410;