Select to view content in your preferred language

Change mouse pointer image for Measurement widget

56
5
Jump to solution
2 hours ago
berniejconnors
Frequent Contributor

We have upgraded from WAB to ExB but many users are complaining about the shape of the mouse pointer during measurement operations.  I can see why they are complaining.  The fat lines in the cross obscure the point you are trying to click on (snapping is not an option):

measurement_pointers.png

How hard is it to customize the shape of the pointer in the measurement widget?  I would prefer something like this:

berniejconnors_0-1764079650675.png

Thanks,

Bernie.

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Frequent Contributor

The process would go something like this:

  1. Turn the Measurement Widget into a Custom Widget.
  2. Find the function that fires when the measurement starts and add a CSS cursor property. You might be able to add it to the DOM node that contains the Map, but there might be a re-render issue with that. Applying it to the HTML or body class should be stable. Alternatively, you might be able to change the cursor directly in the Widget, but I expect this is controlled on the backend by the API.
  3. Find the function that stops the measurement and remove your cursor property.
GIS Developer
City of Arlington, Texas

View solution in original post

5 Replies
JeffreyThompson2
MVP Frequent Contributor

The process would go something like this:

  1. Turn the Measurement Widget into a Custom Widget.
  2. Find the function that fires when the measurement starts and add a CSS cursor property. You might be able to add it to the DOM node that contains the Map, but there might be a re-render issue with that. Applying it to the HTML or body class should be stable. Alternatively, you might be able to change the cursor directly in the Widget, but I expect this is controlled on the backend by the API.
  3. Find the function that stops the measurement and remove your cursor property.
GIS Developer
City of Arlington, Texas
berniejconnors
Frequent Contributor

Thanks @JeffreyThompson2.  We currently do not use the Developer Edition of ExB.  But I recently heard it is possibl to have a custom widget without deploying the Developer Edition.  Have  you attempted this?

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

If you are on ArcGIS Enterprise 11.X or higher, you can register and use a Custom Widget in your Enterprise Portal. You will still need Developer Edition to create and compile the Widget. 

GIS Developer
City of Arlington, Texas
0 Kudos
berniejconnors
Frequent Contributor

We currently publish all of our ExB apps through AGOL.  Is it possible to register and use a custom widget with ExB apps hosted in AGOL?

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

There is no support for Custom Widgets in ArcGIS Online. You will need to create an application in Developer Edition and host it on your own web server.

GIS Developer
City of Arlington, Texas