Select to view content in your preferred language

Change Textbox in Sidebar with Map Toggle

136
3
Jump to solution
2 weeks ago
MarissaEnglish
New Contributor

I have a page on my experience builder project with two maps that can be toggled back and forth and a sidebar with a textbox at the top and the map legend below it. Just like the legend changes with the map toggle feature, is there a way to add a trigger where the selection of the different map switches to a different text box?

I am trying to avoid having 2 separate pages for both maps just so the user does not have to scroll down to find the text that goes with the 2nd map.

I have attached a photo with an example of the layout I am working with.Screenshot (31).png

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Frequent Contributor

I've been messing around with Dynamic Text for a while trying to hack out a solution for this and I couldn't make it work. Maybe it would be possible if your maps are of different geographic areas. But assuming they are not, I agree with @AustinAverill. Your best option would be to use a Section Widget and multiple Views containing a Map Widget and it's surroundings and using a Button Widget to switch between them.

For some more details, here's how I would do it:

  1. Take one of the maps out of your Map Widget and add a Button Widget.
  2. Build out your application as you want it for the visible map.
  3. Shrink down your Sidebar Widget. Everything you want to switch out should be within this Sidebar.
  4. Add a Section Widget and place the Sidebar inside it.
  5. Make the Section Widget and the contained Sidebar Full Size.
  6. In the Section Widget, use Duplicate View. This should make a copy of everything within the Section Widget with all of the Settings preserved.
  7. In View 2, change the map inside the Map Widget, the text in the Text Widget and another changes you want.
  8. Set up both Button Widgets to Link to the other View and give them appropriate labels.
GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
3 Replies
AustinAverill
Frequent Contributor

AFAIK there is no way to make textboxes dynamic in this way. The best solution would be to house each map in a separate view of a section with its associated surrounds. This would allow the user to flip back and forth between the two views pretty quickly without having to load new pages in the experience. This does require some duplication of widgets, etc though.

0 Kudos
JeffreyThompson2
MVP Frequent Contributor

I've been messing around with Dynamic Text for a while trying to hack out a solution for this and I couldn't make it work. Maybe it would be possible if your maps are of different geographic areas. But assuming they are not, I agree with @AustinAverill. Your best option would be to use a Section Widget and multiple Views containing a Map Widget and it's surroundings and using a Button Widget to switch between them.

For some more details, here's how I would do it:

  1. Take one of the maps out of your Map Widget and add a Button Widget.
  2. Build out your application as you want it for the visible map.
  3. Shrink down your Sidebar Widget. Everything you want to switch out should be within this Sidebar.
  4. Add a Section Widget and place the Sidebar inside it.
  5. Make the Section Widget and the contained Sidebar Full Size.
  6. In the Section Widget, use Duplicate View. This should make a copy of everything within the Section Widget with all of the Settings preserved.
  7. In View 2, change the map inside the Map Widget, the text in the Text Widget and another changes you want.
  8. Set up both Button Widgets to Link to the other View and give them appropriate labels.
GIS Developer
City of Arlington, Texas
0 Kudos
AustinAverill
Frequent Contributor

Instead of button widgets, you can also use the views navigation widget. This is basically preconfigured for quickly flipping views at the json level. But which ever way floats your boat.

0 Kudos