Hi, everybody.
I would like to have a list of several maps and when I click one item, the map is showed in the map widget.
Anyone knows if there is a way to do this? I think I need a turn around. Something like an html list to add all maps but then I don't know how to specify the target window.
Or maybe if a service have several maps I can improve the configurations to do this. I really don't know. Any help?
Thanks
Luís
Solved! Go to Solution.
You might want to look at Experience Builder. Use a section widget to create multiple views. Each view would be a different map and then the view navigation widget would be your list of maps.
You can't really do this with a Map widget, as the widget will have a fixed source. You could, however, use an Embed widget. Together with a Data Expression for your list.
Create a list and use the following Data Expression. Extend the features array and adjust the map names and itemIDs as needed.
return FeatureSet(Text(
{
fields: [
{name: 'map_name', type: 'esriFieldTypeString'},
{name: 'itemid', type: 'esriFieldTypeString'}
],
geometryType: '',
features: [
{attributes: {
map_name: 'First Map',
itemid: '2a0707009029489298f304fbf86641a3'
}},
{attributes: {
map_name: 'Second Map',
itemid: 'f558f04d000e4699a44561559ccae363'
}},
{attributes: {
map_name: 'Third Map',
itemid: '24d2a083327443dab1100fa68baafa14'
}}]
}))
Then you can configure your list to show the map name.
Next, create an embedded content widget, link it to the same datasource, and set the URL to
https://arcgis.com/apps/mapviewer/index.html?webmap={itemid}
Don't forget to add a filter action to the list! Now click your map list and watch the embed update!
You'll notice, of course, that the whole interface needs to load for each map, which could be jarring. You might not want the menus to appear. I'd suggest wrapping each map in a Minimal app or something, and using the embed to display those instead. You could also adjust the expression to hold the entire URL, in the event that not all items are in the same type of app.
Thank you very much.
I'll try this 👌
You might want to look at Experience Builder. Use a section widget to create multiple views. Each view would be a different map and then the view navigation widget would be your list of maps.
Thank you, Jennifer.
That looks like an easy solution that fits the needs. Nice 😉