How to code switching view for multi-source maps?

360
1
12-12-2022 12:09 PM
clc
by
New Contributor III

Hi, I am working on a custom widget that will be used in an experience created with the Foldable template and 2 sources for the map widget (a webmap and a webscene of my area). Of course, it is very easy to switch views using the switch map tool that appears "magically" at the bottom left, but I would like to code the view switch in the widget.  Right now, when I want to perform the switch, I know how to determine if the active view is 2d or 3d. I tried to change the state of my active view by changing its property isActive as well as other crazy ideas... all with any success.

Thanks for any suggestion.

Also, I used console.log to inspect my view and noticed that in the JimuMapTools section there is no mention of a switch map tool

1 Reply
MichaelLev
Occasional Contributor III

Maybe EXB does not support exchanging 2D and 3D in same page, andthe way is that the widget will direct to a different page which has the wanted sources?

I am newbie to EXB so I will be happy to know  if the above makes sense at all, and what is the solution indeed.

0 Kudos