Select to view content in your preferred language

Distance Measurement Component - change initial tool display

182
3
Jump to solution
3 weeks ago
PeteVitt
Frequent Contributor

Hi  - is there any way to change the initial display for the Distance Measurement 2D Component to use an icon (like the default calcite measure-line icon) instead of the large button labeled 'New Measurement'?  I've tried specifying the icon in the html markup like below, but I still get the 'New Measurement' button on my map. The map on my application is fairly small so I don't have a lot of real estate for the big button

 <arcgis-distance-measurement-2d position="top-right" icon="measure-line"></arcgis-distance-measurement-2d>
 
 
 
Thanks
 
Pete

 

0 Kudos
1 Solution

Accepted Solutions
Justin_Greco
Frequent Contributor

That icon property just controls the icon when the component is inside an expand component.  It doesn’t affect the new measurement button.

View solution in original post

3 Replies
PeteVitt
Frequent Contributor

I see that the Distance Measurement 2D widget has not been deprecated yet:  https://developers.arcgis.com/javascript/latest/components-transition-plan/

maybe this is why the icon property isnt working for the component?

Pete

 

0 Kudos
Justin_Greco
Frequent Contributor

That icon property just controls the icon when the component is inside an expand component.  It doesn’t affect the new measurement button.

PeteVitt
Frequent Contributor

Thanks Justin - so it sounds like I just need to put the meas tool inside an expand component to get the behavior I want

0 Kudos