The default esri SceneView (3D only) provides the NavigationToggle component which toggles between "Pan" and "Rotate" mode.
I have a task to update the appearance (using our own custom png images) and tooltip styles for this component. The core question is, is there a relatively simple way to specify my own buttons/images for the NavigationToggle interface, and also to specify the tooltip styles for the same?
I have created a CodePen which removes the esri built-in NavigationToggle and makes a naive attempt to implement my own by toggling the value of view.navigation.browserTouchPanEnabled. https://codepen.io/lawken/pen/RwmLaYV Of course, it doesn't work, but maybe this is enough of a platform to support discussion of the right way forward. The production version of this is a bit more complicated, of course, being in an Angular app, using Material for button styles, but if I can figure out how to customize the NavigationToggle in the CodePen, I can transfer the concept to the app.
Thank you.
Solved! Go to Solution.
I found the solution. https://codepen.io/lawken/pen/eYaGVEb?editors=1000
The main thing is to:
2 thoughts:
You might want to look at building your own custom UI element that covers what you need. You can use the NavigationToggleViewModel to handle the logic and build a custom UI around that. You can do it in your framework of choice or a vanilla HTML/JS element.
I'll take a look at that, in case hiding the built-in NavigationToggle turns out to be more difficult than expected.
Thanks for the response.
I found the solution. https://codepen.io/lawken/pen/eYaGVEb?editors=1000
The main thing is to: