directions

Google Maps API directionsService.route different from Google Maps Directions

时间秒杀一切 提交于 2019-11-30 20:45:02
I'm using Google Maps JS API to search for nearby places, i.e. restaurants based on my LatLng : var request = { location: myLocation, rankBy: google.maps.places.RankBy.DISTANCE, types: ['bar', 'cafe', 'food', 'liquor_store', 'lodging', 'meal_delivery', 'meal_takeaway', 'night_club', 'restaurant'], keyword: ['bar', 'pub'] }; searchService.nearbySearch(request, callback); I get the Results Array and want to show directions to the first place from the array : var request = { origin: myLocation, destination: bars[0].geometry.location, travelMode: google.maps.TravelMode.WALKING }; directionsService

Android indoor directions with Google api

前提是你 提交于 2019-11-30 16:45:16
I currently have an app which displays a map fragment and can display navigation to a given point. The indoor maps is enabled and the building I'm trying to use does have indoor maps, but it only navigates to outside the building even when the transport mode is set to walking. Is there currently any way to do this? It seems that the Google Maps Android API does not support this feature for now. Even if you select the correct travel mode , which should be walking, the route is traced on the nearest road and not on the indoor path. I'm also waiting for this option to be released, since it is

Google Maps API [Directions API] Waypoints limitation?

跟風遠走 提交于 2019-11-30 13:51:10
Documentation says that waypoints limit is 8 points. But I have to draw a line with more than 8 waypoints. How to do that? Try sending multiple requests. The Google Maps Api V3 says : MAX_WAYPOINTS_EXCEEDED indicates that too many DirectionsWaypoints were provided in the DirectionsRequest. The maximum allowed waypoints is 8, plus the origin, and destination. Maps API Premier customers are allowed 23 waypoints, plus the origin, and destination. You can go for API Premier but i guess it will cost you about 10.000$ a year 来源: https://stackoverflow.com/questions/4418875/google-maps-api-directions

Google Maps API directionsService.route different from Google Maps Directions

此生再无相见时 提交于 2019-11-30 05:36:39
问题 I'm using Google Maps JS API to search for nearby places, i.e. restaurants based on my LatLng : var request = { location: myLocation, rankBy: google.maps.places.RankBy.DISTANCE, types: ['bar', 'cafe', 'food', 'liquor_store', 'lodging', 'meal_delivery', 'meal_takeaway', 'night_club', 'restaurant'], keyword: ['bar', 'pub'] }; searchService.nearbySearch(request, callback); I get the Results Array and want to show directions to the first place from the array : var request = { origin: myLocation,

Google Maps API [Directions API] Waypoints limitation?

喜欢而已 提交于 2019-11-29 19:49:16
问题 Documentation says that waypoints limit is 8 points. But I have to draw a line with more than 8 waypoints. How to do that? 回答1: Try sending multiple requests. 回答2: The Google Maps Api V3 says: MAX_WAYPOINTS_EXCEEDED indicates that too many DirectionsWaypoints were provided in the DirectionsRequest. The maximum allowed waypoints is 8, plus the origin, and destination. Maps API Premier customers are allowed 23 waypoints, plus the origin, and destination. You can go for API Premier but i guess

Google directions don't work

夙愿已清 提交于 2019-11-29 16:08:48
I try to make directions for my current position and marker coordinate. so i get latitude and longitude using getcurrentposition. then, i mark it. function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var node = new google.maps.LatLng(-7.276442,112.791174); var mapOptions = { zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map'), mapOptions); directionsDisplay.setMap(map); navigator.geolocation.getCurrentPosition(function(position) { pos = new google.maps.LatLng(position.coords.latitude, position.coords

how to draw a google maps waypoint with multi-colored polylines

房东的猫 提交于 2019-11-29 12:22:53
Hi I try to draw polylines with directions waypoints on google maps . I tried something like that. My draw I want to draw the routes with different colors like this. Google maps directions example ss I wrote this sample code . function initMap() { var directionsService = new google.maps.DirectionsService; var directionsDisplay = new google.maps.DirectionsRenderer; var map = new google.maps.Map(document.getElementById('map'), { zoom: 6, center: {lat: 41.85, lng: -87.65} }); directionsDisplay.setMap(map); calculateAndDisplayRoute(directionsService, directionsDisplay); } function

Google directions don't work

99封情书 提交于 2019-11-28 10:03:21
问题 I try to make directions for my current position and marker coordinate. so i get latitude and longitude using getcurrentposition. then, i mark it. function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var node = new google.maps.LatLng(-7.276442,112.791174); var mapOptions = { zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map'), mapOptions); directionsDisplay.setMap(map); navigator.geolocation

Displaying multiple routes using Directions API in Android

独自空忆成欢 提交于 2019-11-28 07:47:29
I am using this class to display a route on a map. The problem is that it only displays one route. What I want to do is display multiple alternate routes on the map. Even thought the server response has multiple routes, it only parses the first route and displays it. What changes should I make to display all the routes that the google server returns.Here is my class. public class GMapV2Direction { public final static String MODE_DRIVING = "driving"; public final static String MODE = "walking"; public final static String MODE_WALKING = "walking"; public GMapV2Direction() { } public Document

Get stopover towns using the Google Maps API (directions)

左心房为你撑大大i 提交于 2019-11-28 07:39:06
I am new to the Google Maps API (3.0). I would like to get stopover cities based on a direction query to the Maps API and did not find any documentation on this specific topic so far. https://developers.google.com/maps/documentation/javascript/directions#Steps I am getting a direction based on Address A and address B. I would like to know every city that a user would cross during his journey. I found some information about way points (stopovers) but these relate to every stop or street change. I couldn't find any core object so far... What I would do: Use the RouteBoxer to find bounds