I am wondering if there is a way to have the line segment length show up dynamically in the widget and on the map when using the measure widget for Web Appbuilder. I have some users who want to have the text on the map be dynamic as they draw and then once they click on the map to put a vertex down then the line segment text will show up on the map. Also a total length is needed.
This shows the line segment value but still does not add the text to the map.
Solved! Go to Solution.
You are right, I went with only showing the total length of the line, but you could rewrite the code to show you the length of each segment.
The way I would do it is whenever the user clicks on the map it uses those coordinates to produce a point which will be used to place the lable for the length of the line segment, which will be placed once the user clicks again.
click -> get lable point -> click again -> place measurement -> save new label point ->... -> double click place total measurement + pleace measurement of last measurement.
I hope this somewhat explains my thought process.
Maybe in the future release I will add this to my draw tool.
Excellent! I had created a similar widget for the FlexViewer and had meant to create something similar for WAB, but had some other projects in my way until now. I hope this works well for you.