Map layer controls: New in Tableau 2021.2
Tableau 2021.2 lets you hand users control over map layers, and you can even persist those settings in custom views.
- Map layer controls appear automatically once you add a second layer by dragging a geometry or mapping field into the view, and they're enabled by default for authors
- The control gives two options per layer: a tick box to show or hide the layer, and a lock to stop interaction so you can select elements underneath it
- Authors can switch the whole control off via Map > Map options > Layer Control, but cannot lock individual layers from being unlocked by users
- Layer controls are great for accessibility and progressive storytelling, such as disabling decade-by-decade layers to show change over time
- On Tableau Server or Online the settings reset on each visit unless saved into a customised view, which persists your chosen layer state as a default
0:00Hey, Tim here. In 2021.2 Tableau have added
0:05the ability to give users the ability to
0:08control
0:08map layers. Essentially, this is a control
0:10that appears whenever you've got map layers
0:13enabled. Now, what I'm actually using here
0:15is a visualization I built in another video
0:17where I was talking about the area
0:18calculations. If you want to see how to
0:20build this, go to
0:21that video. It's literally probably just
0:23been published before this one. But
0:24nevertheless,
0:25I'm going to use this as a starting point
0:26for this feature. Now, what I'm going to do
0:28here is enable map layers. Now map layers
0:31were introduced in, I think in two versions
0:33ago. So you were able to basically layer
0:35maps onto each other. And what I'm enabling
0:37you
0:38to do is to bring lots of different levels
0:39of context, the way you enable that is to
0:41simply drag the geometry field into the
0:44visualization. Again, any other mapping
0:46field will also work.
0:48And as soon as you drop it in, it adds a
0:49layer capability there, you can see it went
0:51orange
0:52there. And actually the new function
0:54appears straight away. This is actually on
0:56by default,
0:57if you're building any mapping layers for
0:59users as an author, be aware that this
1:01comes
1:01enabled by default. So you'll see the map
1:04control is now available there. It's sort
1:06of this little layered icon. And when you
1:09click on it, you actually get two sets of
1:11controls. On the right hand side, you've
1:13got the ability to switch on and switch off
1:15a
1:15specific layer using this tick box and on
1:17the left, you get the ability to lock that
1:19layer. Locking essentially stops you from
1:22interacting with it and ticking the little
1:25sort of square sort of hides it and enables
1:27it. So think of it as an enabled and
1:29disabled
1:30and then stop it from interacting and so on
1:32and so forth. You do get handy hints as you
1:34hover over these as well. So don't worry
1:36too much if you sort of don't remember this
1:38. So
1:38if I just go ahead here and disable this
1:40geometry to you'll see that I get the color
1:43back because
1:43essentially the geometry to was another
1:46layer on top. And it's sort of been stopped
1:48from
1:48showing up now because I've disabled it. If
1:51I take that again, you'll see that it comes
1:53back and actually when I hover over this,
1:55you'll see that the whole thing gets
1:56selected
1:57because you can see everything go black.
1:59Now if I lock this, we'll see that that no
2:01longer
2:01works because my selection is sort of going
2:03through the object that's not working at
2:05all
2:06on that layer. So now you can see I can
2:08select the underneath element in the
2:10visualization,
2:11which is sort of kind of cool. Now, the
2:13other thing you can do is you can lock
2:15everything
2:16and everything's there. But as an author,
2:19you don't have control as to whether
2:21someone
2:22can enable this or can't enable this. So
2:24you can't for example, say, never let a
2:26user unlock
2:26or unlock a specific layer, they just get
2:29all the controls or none at all. If you
2:31want
2:31to disable this for your users, you can of
2:33course do this. If you just go up here to
2:35the top and select map, then you go to Map
2:37options. I know I get confused between
2:39those
2:39two and you'll see here, there's actually
2:41Oh, it's disappeared when I've selected my
2:43little cursor. So I have to do this with
2:45that cursor. So if I just go to Map layers,
2:48actually
2:48Map options, not Map layers, sort of
2:50confusing having so many things using the
2:52same name.
2:53So let's try this again, Map options. And
2:55you can see the layer control is the second
2:57one here on the tip. So now if I tick that,
3:00you'll see that that little square
3:01disappears.
3:02And that now reappears. So that's basically
3:04where we are, you've of course got the
3:06other
3:06controls there, this is just sort of
3:08getting bigger now that we can do different
3:10things
3:10with our visualization. But fundamentally,
3:13layer controls is really, really handy. And
3:15you can use this in lots of sort of use
3:17cases to give users a bit more control. I
3:19actually
3:19think this is important for accessibility,
3:21I think users should have the ability to
3:23choose
3:23this. So I think it makes authors have to
3:25think more critically about the layers they
3:27're
3:27enabling and what they're sort of letting
3:30users do. And also, I think it just adds
3:32another
3:32dynamic that if you're able to sort of
3:35instruct your users through how to use this
3:37effectively,
3:38they can also start telling their own
3:40stories by slowly or progressively
3:42disabling or enabling
3:43certain layers. So you could have a
3:45visualization that starts off with one
3:47layer that covers
3:48everything and then as you disable layers,
3:50you mainly have a progression through a
3:52range
3:52of different things. And so you could for
3:55example, use this to show deforestation,
3:57where
3:57each layer is a different decade and you
3:59can slowly disable and show these layers
4:01over
4:02time. So that's just an idea. I haven't got
4:04an example data to sort of work with. But
4:06nevertheless, I think this feature is
4:07really, really cool and you should check it
4:09out. Hey,
4:10Tim, I just I'm sad it's in this video and
4:12I forgot to show one final feature. And
4:14that's
4:14what happens when you publish a map layer
4:17control enabled visualization to Tableau
4:19server
4:20or Tableau online. So here I've got the
4:22exact same visualization. If I hit on the
4:24map layer
4:25control, you can see that I have that
4:26available to me. Now one of the nice things
4:28is when
4:29we publish this up to Tableau server and
4:31Tableau online, you can actually save those
4:34settings
4:35in a customized view. So it doesn't
4:37remember it as you sort of interact with
4:39things, it
4:39will reset it every time you revisit the
4:41vis. But if you have a customized view
4:43created,
4:43you can actually save these presets. So I'm
4:46going to publish this to my 2020 dot one
4:48hyphen
4:48two folder here. I'm just going to call it
4:50book one. I'm just trying to get this done
4:53so I can get this video up. And once this
4:54is published, it's going to open up a
4:56browser
4:57window. And we're going to take a look at
4:58it and we're going to try and customize
5:00view.
5:01Okay, so we have a customized view here
5:04loading, I just brought it in from my other
5:06screen.
5:07If I just go back to my browser here, you
5:08'll see that this has now been published.
5:10And
5:10this is working nicely. There's no custom
5:13views here. So we're just going to go back
5:15to the visualization, go into sheet one.
5:17And here we have the visualization that we
5:20just
5:20built in desktop. Now what I want to do
5:23though, is I want to get this layer control
5:26set up.
5:26So what I'm going to do is I'm going to des
5:28elect geometry two, just to check that that
5:30's working
5:30here in the browser. And you can see you
5:32get an information icon saying animations
5:35or pause
5:35because this is a complex viz. That alert
5:38is actually also a new feature in a
5:39previous
5:40version of Tableau. Now what I'm going to
5:42do here is I'm going to create a customized
5:44view. And you do that by going to this
5:46option just here where it says view
5:48original. And
5:49I have this enabled. If you can't see this,
5:51this is because the author of the
5:52visualization
5:53has disabled that in the permissions. If
5:55you can't see that, that's just because it
5:57's been
5:58disabled. It's not that you don't have
6:00access to it. So now I can name this view,
6:02I can
6:02call this Tim's view. Okay. And I can make
6:05it my default. So every time I come to this
6:08visualization that remembers that setting,
6:10okay. And I'm going to save this. And now
6:13I've saved Tim's view, it remembered that
6:14setting that I created previously. And we
6:16're
6:16just going to check that now that this is
6:18done. If we go to map layer controls, you
6:20'll
6:20see the geometry is disabled. Now I'm going
6:23to go back to the 2021.2 folder. So I've
6:25completely
6:26left the visualization, I'm going to go
6:28back into book one, and I'm going to go
6:30back into
6:30sheet one. And two things will happen, it
6:32will take me to my customized view, because
6:34I set that as my default. The way I know
6:36that from the get go is that if you see
6:38here, it
6:39says view Tim's and not view original. And
6:42I can see here that the map layer control
6:44is also disabled. So it's remember that
6:46setting, if I go to the top, and I switch
6:48the original
6:49view, which is just here at the bottom, if
6:51I click on that, and just go to that, and
6:54you'll see that actually that map layer
6:55control comes back. And it remembers
6:57whatever was
6:58the default that the author set. So if you
7:00go back on there, you can see that that's
7:01now ticked. So that's just a nice to know
7:04feature map layer controls can be persisted
7:07in custom views, it's just remembers the
7:09setting and you're pretty much good to go.
7:11That's
7:11all I wanted to add. That's pretty much it.
7:13And if you've enjoyed this video, you know
7:14what to do. Let me know in the comments
7:16below. And let other people know and be
7:18sure to check
7:19out all the other videos in 2021.2 as well
7:21as the videos on the channel on Tableau
7:23functions
7:24and lots of different things that I try and
7:25explain for people who are just getting
7:27started
7:27All right.
Tableau release notes “Give users more control of geographic data with the Layer control panel. New to 2021.2, Layer Control is a panel that expands in the view when selected, displaying all the geographic data layers, and giving you quick access to each marks layer.”