google-direction

Array to create multiple routes on Google Maps v3

ⅰ亾dé卋堺 提交于 2019-11-27 04:43:44
问题 I have a Google Maps project, and I want to do an array to create multiple routes using directions. For example, I click on the map and appear a marker named "A", and when I click the second time, display a marker named "B". Ok, this is working. But when I click the third time I want to display a new "A" point and the fourth time a new "B", don't need to erase the other route. I want only to display multiple routes, I know that I need to create an Array, but i don't know where i put the array

Google Maps API Version difference

不打扰是莪最后的温柔 提交于 2019-11-27 00:15:33
I'm trying to show route between two places, I want to used Google Places API V3 for route steps between two points. Before I was using Old Google Maps API , and following request gives perfect result: http://maps.google.com/maps?f=d&hl=en&saddr=19.5217608,-99.2615823&daddr=19.531224,-99.248262&ie=UTF8&0&om=0&output=kml Output : Now I try to replace this with New Google Maps API, and following request gives wrong result, In both case i'm using same source and destination, but result gives different behavior on Google Map: http://maps.googleapis.com/maps/api/directions/json?origin=19.5217608,

Change Google map marker orientation according path direction

喜夏-厌秋 提交于 2019-11-27 00:15:11
I'd like to know if it possible to change the marker orientation according the path drawn on the map. Here is a example: As you can see the marker is a car (with front bumper and tail lights). I'd like to orientate the car in the direction the path is going (in this exemple orientate the car around 45 degrees to the right). I'm using DirectionsService to draw the path and I have a random number of point. Sometime only one, sometime 10 points. I'm adding the markers before drawing the paths. Here is how I'm drawing the path: // Intialize the Path Array var path = new google.maps.MVCArray(); //

Direction api: check if a place falls in the route path between 2 places

南楼画角 提交于 2019-11-26 20:15:28
问题 I am using Google Direction API to plot the route path between 2 places A and B. I am able to do this. Now, I have a requirement to check if given a place C falls in the route path of A and B. Here is the snapshot of the route path that I have generated from my code. Here is the corresponding code: function initialize() { var input = document.getElementById('searchTextFieldSource'); var input1 = document.getElementById('searchTextFieldDestination'); var autocomplete = new google.maps.places

Exceed 23 waypoint per request limit on Google Directions API (Business/Work level)

馋奶兔 提交于 2019-11-26 18:46:01
I would like to use the google directions API to develop route planning software for a company that handles snowplows in the winter and landscaping in the summer. One of the customers requirements is that he be able to calculate routes with at least 30 ( preferably more ) waypoints. According to the documentation (quoted below) even Google Maps API for Work customers are limited to just 23 waypoints per request. Use of the Google Directions API is subject to a query limit of 2,500 directions requests per day. Individual directions requests may contain up to 8 intermediate waypoints in the

How to decode the Google Directions API polylines field into lat long points in objective-C for iPhone?

♀尐吖头ヾ 提交于 2019-11-26 17:34:55
问题 I want to draw routes on a map corresponding to directions JSON which I am getting through the Google Directions API: http://code.google.com/apis/maps/documentation/directions/ I have figured out how to extract the latitude and longitude from the steps field, however this doesn't follow curvy roads very well. I think what I need is to decode the polyline information, I found Googles instructions on how to encode polylines: http://code.google.com/apis/maps/documentation/utilities

Supply API key to avoid Hit Limit error from Maps Service in Apps Script

我只是一个虾纸丫 提交于 2019-11-26 17:20:13
问题 I have a Google Sheet where we are fetching the driving distance between two Lat/Lng via the Maps Service. The function below works, but the matrix is 4,500 cells, so I'm getting the "Hit Limit" error. How can I supply my paid account's API key here? Custom Function function drivingMeters(origin, destination) { if (origin=='' || destination==''){return ''} var directions = Maps.newDirectionFinder() .setOrigin(origin) .setDestination(destination) .getDirections(); return directions.routes[0]

Google Maps API Version difference

大城市里の小女人 提交于 2019-11-26 09:19:28
问题 I\'m trying to show route between two places, I want to used Google Places API V3 for route steps between two points. Before I was using Old Google Maps API, and following request gives perfect result: http://maps.google.com/maps?f=d&hl=en&saddr=19.5217608,-99.2615823&daddr=19.531224,-99.248262&ie=UTF8&0&om=0&output=kml Output : Now I try to replace this with New Google Maps API, and following request gives wrong result, In both case i\'m using same source and destination, but result gives

Exceed 23 waypoint per request limit on Google Directions API (Business/Work level)

浪子不回头ぞ 提交于 2019-11-26 06:34:16
问题 I would like to use the google directions API to develop route planning software for a company that handles snowplows in the winter and landscaping in the summer. One of the customers requirements is that he be able to calculate routes with at least 30 ( preferably more ) waypoints. According to the documentation (quoted below) even Google Maps API for Work customers are limited to just 23 waypoints per request. Use of the Google Directions API is subject to a query limit of 2,500 directions