问题
This is my code :
var request = {
origin: start,
destination: end,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
directionsService.route(request, function (response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
}
});
now, I'd like to put a marker after 200km from the point origin: start
: is it possible?
回答1:
Here is an example that puts two markers on a route (one at 9.5km and one at 64.8km):
http://www.geocodezip.com/v3_GoogleEx_directions-waypoints_kmmarkersC.html
(so, yes, it is possible)
This example was created before the geometry library was released, and might be able to be re-written to use that.
来源:https://stackoverflow.com/questions/12692824/is-it-possible-to-put-a-marker-after-some-km-from-the-start-point-in-a-directi