Hi, I am new to ArcGIS javascript API, any help on the below questions will be appreciable.
a) Is there any way to buffer the distance between 2 destinations?
b) How to add multiple destinations ?
Thanks in advance.
Regards
Murali
Murali,
This should work for question 2:
Here is the api for directions:
Directions | ArcGIS API for JavaScript
What do you mean by buffer? distance?
Thanks. But I need to load the destinations while loading the widgets, not by clicking Add destination? Is there any way to do that?
Regarding buffer & distance,
Let me explain more about my requirement.
a) I have to buffer the distances between two given location.
Ex: If I enter Location 1 as start destination and Location 2 as stop destination, I need to buffer the distance between the locations. Since directions object is not returning geometries, how to buffer the distance is there any possibilities for that?
Murali,
The BufferParameter class can take an array of geometries to buffer.
Is there any way to buffer the distance between 2 destinations?
I don't understand this question can you provide more detail or clarification?
Yes, BufferParameter class can take an array of geometries to buffer. But I want to buffer the distance between the given destination.
Let me explain more about my requirement.
a) I have to buffer the distances between two given location.
Ex: If I enter Location 1 as start destination and Location 2 as stop destination, I need to buffer the distance between the locations. Since directions object is not returning geometries, how to buffer the distance is there any possibilities for that?
Murali,
You would take the two points and create a Polyline from then and then send that Polyline geometry to the GeometryService lengths method first and then based on that result then do the buffer.
Yes, I too thought about that but I may not have point to draw Polyline. I may have name or address of the start and end locations. Is there any way to create points for the given name or address.
Thanks for your reply.
Since directions object is not returning geometries
Why is the directions object not returning the geometries?
I didn't find any directions method returns geometry for start and end destination
Murali,
Sure the Directions dijit has a directions-finish event that returns a RouteResult object which has stops property