Masking layers in AGOL

4511
10
Jump to solution
05-19-2020 04:52 PM
JocelynTutak
New Contributor II

Is layer masking available in AGOL? I'm building a map for use in a Story Map, and I'd like to mask a few of the layers by another polygon layer in the map. In Pro I'd use layer masking via the masking drop down menu (by clicking on the layer to be masked in the contents pane. It's on the Feature Layer super tab, on the Appearance tab, in the Drawing group). Is there any way to do something similar online, or do I need to create clipped versions of the layers I want to mask?

1 Solution

Accepted Solutions
PWhelpdale
New Contributor

Just to update this for anyone else searching for this now. The new 'blending' option under the properties for a layer allow you to chose a range of options - one of which does a 'mask' function. Just ensure the polygon you want to use as a mask has a fill symbol set (i.e not transparent) and choose 'Destination In' or 'Destination Atop'. More details can be found here https://doc.arcgis.com/en/arcgis-online/create-maps/use-blend-modes-mv.htm

View solution in original post

10 Replies
BenSmith6
New Contributor III

Hi Jocelyn,

From what I can tell trying to do the same thing, no masking isn't an option on a standard feature service.

However, depending on your licencing level (hopefully someone can verify what level is needed) you can create "view layers" from the feature layer overview.

These can then be filtered by fields or geographical area from within the classic web map viewer, from what I can see there's no functionality for it in the new map viewer.

 

All that being said, you can only do this with your organisation's layers at best, something like living atlas data cannot be used. And you have to do this for each individual layer within a feature layer, which get's pretty dull after 3/4 layers. The ability to set a geographical display area or use a mask layer in the webmap would make this so much easier.

Hope that helps you out a little!

0 Kudos
PWhelpdale
New Contributor

Just to update this for anyone else searching for this now. The new 'blending' option under the properties for a layer allow you to chose a range of options - one of which does a 'mask' function. Just ensure the polygon you want to use as a mask has a fill symbol set (i.e not transparent) and choose 'Destination In' or 'Destination Atop'. More details can be found here https://doc.arcgis.com/en/arcgis-online/create-maps/use-blend-modes-mv.htm

KateCarlson
Occasional Contributor

Thanks for this tip! It works, and I would like to add that in some cases you will need to add the layers to a group. I needed to mask a color coded raster to a polygon, all the while keeping my pixel color categories in view. The layers need to be in a group for this to work, otherwise, the pixels take in the color of the masking polygon and do not retain the categorical colors. I used 'Source In'. I am very excited about this! 

TimDuhamel_AT
New Contributor II

Thanks Kate for the tip about using Groups. I was trying to do some composite blending between two vector layers but my result was masking out the basemap. When I added my two vector layers into a group together, my blending effects were constrained to the group, and I could achieve my desired effect.

0 Kudos
AbiMansley
New Contributor II

Hello - just wondering - does anybody know how to make the masked layer semi-transparent?  I have followed the instructions here (Thank you!) and have it working "desination atop" fine, but it seems so raw!  Is there any way to make it so that the mask is sort of cloudy - but still enables the viewer to concentrate on the map area in question, but see it in context?  

0 Kudos
BernSzukalski
Esri Frequent Contributor

See if this example is what you are after: https://www.arcgis.com/apps/mapviewer/index.html?webmap=398294b197dc4daf814ce9061950eae7

If it is, it's covered in the Apply local focus to Living Atlas content using blending and effects blog article in the Use blending with duplicate layers and effects section.

While the title might make is seem it covers Living Atlas content, you can of course apply those same techniques to any of your maps/layers.

AbiMansley
New Contributor II

Thank you - that worked great - I really liked it!  (see map1)  But, when I moved to my webmap app version, all the lovely styling was gone!  (map2 screenshot).  I am guessing the blending and shadow don't work when you then try to make your map shareable with colleagues using the webmap app?  Thanks v much though for the styling help.  

0 Kudos
BernSzukalski
Esri Frequent Contributor

I can't tell what "webmap app" you are using, but the thing to remember is that these blending and effects capabilities are only supported in the new Map Viewer (not Map Viewer Classic) and only in the newer apps (since they all share the underlying latest JSAPI 4.x). For example, you map will work just in Instant Apps, Experience Builder, ArcGIS Dashboards, and ArcGIS StoryMaps but the effects/blending and group layers are not supported in older configurable apps or in Web AppBuilder.

Here's a quick test case using the Basic Instant App:

Camp Fire Focus (Destination In) - Basic Viewer (arcgis.com)

AbiMansley
New Contributor II

Thank you - I got them working great in a StoryMap I have instead and am really pleased.  I will ask someone in my organisation which of the apps are new enough.  Thanks.  

0 Kudos