How to link two Distance Cost Elements?

Created by Angel Mavare, Modified on Wed, 1 May at 10:11 AM by Angel Mavare

Introduction   


With this script we can copy the arrival address of a Distance cost element to the departure address of a second Distance Cost element. It is necessary to have experience manipulating HTML to follow this tutorial


This is useful for cases in which the user needs to calculate Scales between one direction and another.






How To Use It 


1. First we need the IDs of the elements that will be copied, you can inspect the entries from your browser and get them. They usually have a format like this "itemcreate_0_0_0_1"

2. Once you have the ids of your elements, copy the following script somewhere on your page. You can do this using the HTML element of your wordpress editor.


<sccript>
    const distanceAddressId1 = 'itemcreate_0_0_0_6_2';
    const distanceAddressId2 = 'itemcreate_0_0_0_15';
    sccCopyDistanceAddress(distanceAddressId1, distanceAddressId2);
</script>

Once you have everything ready, test its operation. Remember that you can contact us if you have questions about these advanced topics.



Additional Information


All Elements & Features

Learn more about All Elements
Learn more about All the Features

Need Support?


Ask a question or request support

Request a feature or give feedback





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article