google-direction

Swift Google Directions API JSON - EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

青春壹個敷衍的年華 提交于 2019-12-11 05:59:15
问题 I am trying to get directions data using Google API, but it's keep crashing. Here is my code: let baseURLDirections = "https://maps.googleapis.com/maps/api/directions/json?" var selectedRoute: Dictionary<NSObject, AnyObject>! var overviewPolyline: Dictionary<NSObject, AnyObject>! var originCoordinate: CLLocationCoordinate2D! var destinationCoordinate: CLLocationCoordinate2D! var originAddress: String! var destinationAddress: String! func getDirections(origin: String, destination: String,

Finding address by distance value, in Google Maps Api?

北城以北 提交于 2019-12-11 02:29:54
问题 I want to find a specific address that, is neither user-configurable nor static or known in advance. In other words I want my application to be able to calculate what address is placed in a distance away from a known location. Is there a way to define the address or lat/lng, of a place which is placed in a specific distance away from a known location(specific address or lat/,lmg point in map already known). I mean by using the Google Maps Api, can i define what's the address of a place that

Issue streaming directions for Google Maps API v2 Android

空扰寡人 提交于 2019-12-10 15:48:24
问题 So part of my application builds a navigation directions string and then attempts to parse the JSON and draw the polyline routes on my map. I first build my string using Location variables or Locale constants. I end up with something like https://maps.googleapis.com/maps/api/directions/json?origin=Full Frame Documentary Film Festival, Durham, 27701&destination=601 W Peace St, Raleigh,27605&sensor=false&key={API_KEY} there is no new line (I added it for readability) and the {API_KEY} is my

Google direction api request invalid in ios5

旧时模样 提交于 2019-12-10 10:49:52
问题 Here is my request: https://maps.googleapis.com/maps/api/directions/json?origin=49.276951,-123.128559&destination=49.277874,-122.912404&mode=transit&sensor=false The result is: { "routes" : [], "status" : "INVALID_REQUEST" } It worked before, but it does not work when i used it today. why is that? Note: it works fine when i change it to mode=walking 回答1: https://maps.googleapis.com/maps/api/directions/json?origin=49.276951,-123.128559&destination=49.261566,-123.138399&mode=transit&sensor

Adding InfoWindow on Google directions route

扶醉桌前 提交于 2019-12-09 11:46:17
问题 I am trying to add an InfoWindow to directions route. there are lots of examples out there for adding InfoWindow on an event listener on a marker. But how can I move the InfoWindow to show on the actual planned route from one marker to another. Someone already tried to ask this question before but no response (InfoWindow on Directions Route). Anyway I did a lot of googling and only found one question similar to this but than again there is no response to that. I tried infowindow.open(map,this

how to Draw train route map between source and destination in android [duplicate]

霸气de小男生 提交于 2019-12-07 18:38:41
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Android draw route on a Mapview with twoo POI-s I draw route map between two areas using Google direction API, but I am thinking to draw train route between two stations in android. Can anyone help me? 回答1: I guess you will be interested in Google TRANSIT and not google direction. See this page and this too. 回答2: Google does not provide an official API for getting transit directions or to describe routes, you

How to set travel mode to “Flight” in google map direction API .

别等时光非礼了梦想. 提交于 2019-12-07 17:15:30
问题 I'm using google map direction API in our application. Map with directions working well with traveling modes like Driving,Walking,Transit and Bicycling. But it not showing flight directions when we enter two cities from different countries. So for showing flight directions what should i do? Please help. 回答1: There is no FLIGHT TravelMode in the Google Maps Javascript API v3. google.maps.TravelMode constants The valid travel modes that can be specified in a DirectionsRequest as well as the

how to Draw train route map between source and destination in android [duplicate]

霸气de小男生 提交于 2019-12-06 06:39:02
This question already has an answer here : Closed 7 years ago . Possible Duplicate: Android draw route on a Mapview with twoo POI-s I draw route map between two areas using Google direction API , but I am thinking to draw train route between two stations in android. Can anyone help me? Waza_Be I guess you will be interested in Google TRANSIT and not google direction. See this page and this too. Google does not provide an official API for getting transit directions or to describe routes, you need to source the data from somewhere else. 来源: https://stackoverflow.com/questions/8500051/how-to-draw

How to set travel mode to “Flight” in google map direction API .

為{幸葍}努か 提交于 2019-12-06 05:18:53
I'm using google map direction API in our application. Map with directions working well with traveling modes like Driving,Walking,Transit and Bicycling. But it not showing flight directions when we enter two cities from different countries. So for showing flight directions what should i do? Please help. There is no FLIGHT TravelMode in the Google Maps Javascript API v3. google.maps.TravelMode constants The valid travel modes that can be specified in a DirectionsRequest as well as the travel modes returned in a DirectionsStep. BICYCLING Specifies a bicycling directions request. DRIVING

How can I get directions for multiple waypoints with different transit methods using the Google Directions Service?

萝らか妹 提交于 2019-12-05 10:43:52
So I understand how to use the Google Directions service to add waypoints and to change the transit mode but is it possible to do both with the same API call? I'm trying to get directions that will involve walking, then biking, and then some more walking but I'm not sure how to do it using one API call. I know I can split it up into a few but it will then force me to process Google's response vs using the setDirections method. These are the docs I'm going from: https://developers.google.com/maps/documentation/javascript/directions but is it possible to do both with the same API call? Not at