Is it possible to add custom attributes to objects in the directions widget?

285
0
10-17-2017 10:03 AM
JohnCaldwell1
New Contributor

I've been using the directions widget through an iframe on our site.  I need to be able to track the stops that are sent through the plugin and be able to guarantee I can identify a stop when it comes back out. 

So for example, I add 3 stops using addressing using the function call directions.AddStop().  At that point the items ObjectIDs correspond directly with the order that they are added in even though the addresses are slightly different (such as "Lane" being converted to "Ln" or "Drive" to "Dr" ), so I am able to identify what the original stops were by using this ID.  As soon as the user reorders the stops the object ids change and I can no longer use this method to identify the new stop order vs the old stop order.

What would be beneficial and I need to know if it's possible is for me to be able to give a stop a unique identifier that I can set before the stops are optimized that way when they are finished I can guarantee that I have the correct stop from the results that are returned from directions.on("directions-finish").

Tags (1)
0 Kudos
0 Replies