ChangeWebMap Widget

8934
15
02-06-2016 09:48 AM
Labels (1)

ChangeWebMap Widget

The ChangeWebMap Widget for ArcGIS Web AppBuilder allows users to switch the map content to another web map.

Using the Widget

The ChangeWebMap Widget is an in-panel widget that will be displayed in the toolbar of your WebApp Builder application. Click the  icon icon display the Change Web Map panel.

Configure Icon

Public Content Tab

The Public Content tab lists the web maps that are accessible to every one. When configuring the ChangeWebMap widget, the site administrator can filter the list of available web maps to a particular group or type.

My Content Tab

The My Content tab lists the web maps that are accessible to the current user. The first time the tab is displayed, you will need to sign into your Portal account.

Configure Icon

Once logged in, the web maps accessible to your account will be displayed in the My Content tab.

Configure Icon

Changing the Web Map

To change the map contents to another web map, click the web map in the list.

Select Web Map

You will be prompted to Zoom In.

Prompt to Zoom

Choose No to keep the current map extents or Yes to zoom to the extents of the new web map.

Click the More Details link to open a browser window to the information page for the web map.

Widget Setup

Source code and installation instructions may be found at GitHub - softwhere/ChangeWebMap-Widget

Download

Thanks to the City of Garland, Texas for sponsoring the initial development of the ChangeWebMap Widget and releasing it to the community.

Labels (1)
Tags (1)
Comments

Thank you David for all your contributions.  You've been busy!  Added to the Web AppBuilder Developer Edition - Customization Resource List​  I'm hoping to grab them as I get notified....if I missone by the end of the day, let me know.  Also, it would be great if you create a "collection" page like some of the others have done.  Especially helpful is Robert's that includes the last update date for each (although, maybe not as simple to update with guthub links).

Thanks for the suggestion, Rebecca. I created a blog post that lists all the custom widgets for WAB

https://community.esri.com/people/softwhere/blog/2016/02/06/custom-wab-widgets

Thanks...I added it a a "pinned" site.  One other suggestion on that summary page...change the title to include you name or some other nickname, or something to separate it from other titles.  If you look on my resource list, you can see the auto-name for the link is just "Custom WAB Widgets"  which is a bit too generic.  Once you change it and refresh my page, it should automatically update there too.

I'm trying to test this out with my app and it doesn't appear to work with the Local Layer Widget.  Am I missing something that would keep this from switching the webmap like it was designed to?

The issue I'm having is the endless "trying to load" map loading icons.  Any thoughts?

thanks, now i can use the widget in my portal. which I want to ask, can I include the basemap of the group or from my organization?

I love this widget, modified it slightly so the prompt is a bit more intuitive, and my users love it. I just discovered an unintended consequence: It seems to break the select widget.

If you switch maps after making a feature selection, then it selects features, but doesn't display the selection (tells you how many records, lets you see them in the table, etc, but you can't tell on the map what's been selected. Even if you switch back to the same map, it still won't show the selection. Refreshing the map, and going back to it's last state will allow selection to resume normally, but then another map change, and it's gone.

My intent was to build our entire web map architecture around this function, but select can be a pretty important tool to give up in order to do it.

Any clues about how to fix that? (seems to happen on several browsers...)

Thanks!

This is Exactly what i was Looking for! Thanks for your work and sharing it within the Community. I do have a question. is it possible to limit the Maps that the user can see? We have a lot of stored web maps within our account and i don't necessarily want the users to see all of the maps we have within our portal. is it possible to pick and choose what maps the user is allowed to switch from?

Michael,

I use tags to organize the use of this widget. Currently, I use it on only two WebApps, but each one has the scope limited to maps with the presence of a specific tag that makes the appropriate web maps available to that webapp. It works quite well.

I also made a slight modification to the code to make the choice clearer when it prompts whether to stay at the current location or zoom to the new map’s default extent.

I would love to have someone with the necessary skills enhance this widget to also be able to jump to the same extents in ANY webapp, not just change web maps within the same webapp. So if anyone out there is interested and able to add that functionality, I bet the community would love it!

Tom Shindler

GIS & Permit System Coordinator

tshindler@co.clallam.wa.us <mailto:tshindler@co.clallam.wa.us>

360-417-2260

Mike,

I did some testing on our main webapp that uses this widget and observed this behavior. I guess our map is new enough that users hadn’t bumped into this problem enough to complain, so I had not noticed it. It appears that you can change maps all you want, and the select will work the first time, until a map change after that first select, then never again. It appears to be only a display issue, since the records are being counted, and will show up on the table.

I wonder if someone who understands the programming better could include code that would re-establish this functionality with each map change. It would probably involve taking a bit of the DNA from the select widget, and inserting it into the change map widget.

What probably wouldn’t work is to maintain a selected set through a map change. That would require the layers with selected features to be on both maps, and probably visible on both maps, etc. Probably too many variables to trap them all.

Maybe we could go together on funding an enhanced version of this tool that would preserve select functionality, and also enable my wish list item of switching not just the embedded web map, but also jumping to the same extents in a whole different webapp. That functionality could be captured from the share widget.

Any widget programmers out there want to take this on?

Tom

Tom Shindler

GIS & Permit System Coordinator

tshindler@co.clallam.wa.us <mailto:tshindler@co.clallam.wa.us>

360-417-2260

I love this widget and use it for a historical parcel viewer. however every time the map is changed the splash screen (our disclaimer) is shown again. is it possible to just get the splash on the loading of the application but not every time the webmap changes?

Great widget and concept.  One issue that is causing a problem, when you LOG IN via the my content half of the popup, the PUBLIC side does not refresh. 

In my example, the PUBLIC only allows  group shared maps. If you are not logged in, which is the default, then you see nothing. once i log in on the My Contant tab, that is fine, i see my content, but go back to the Public, that LIST does not refresh.

Anonymous User

Nice widget. I was able to configure it with web app builder 2.11 (latest version). It works well. On launching the webapp I am signed-in using a windows log-in (have enterprise logins setup with AGOL). However I can only access webmaps that I own in my content. I cannot access webmaps that have been shared with me through public/private groups or that have shared with the organization. Is there a way to configure the app to pickup webmap content that (owned by other members) is shared through a group. 

Hi,

I tried to add the ChangeWebMap widget to a web app built in ArcGIS Enterprise 10.9.1, but end up with a "Create Widget Error". Error.PNGAs there a way to adapt the widget to this now version of WAB?

Any help would be highly appreciated!

Thanks, Gilles

@GillesLavandier did you ever get this working in 10.9.1?

Hi @GillesLavandier and @LindseyStone, do you have any information about this topic?

Version history
Last update:
‎02-06-2016 09:48 AM
Updated by:
Contributors