Hidding classification field

1640
17
Jump to solution
10-28-2016 07:52 AM
deleted-user-0W0-oLHxDjCX
New Contributor III

Hi everyone.

I was using LayerListWidget of WAB and would like to know if it is possible to hide classification field on legend representation.

Best regards

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
deleted-user-CQZbjNeBXm49
Occasional Contributor III

Ezequias,

In order for this to work, you need to add the layer (url) as part of your content as a "Dynamic Layer" like this http://webadaptor.domain.com/arcgis/rest/services/foldername/servicename/MapServer (Then give it a proper name) and not like this http://webadaptor.domain.com/arcgis/rest/services/foldername/servicename/MapServer/0 before adding it to a map in portal. See images below:

That is the way it works

Baba

View solution in original post

17 Replies
RobertScheitlin__GISP
MVP Emeritus

Ezequias,

   A screenshot would help.

0 Kudos
deleted-user-0W0-oLHxDjCX
New Contributor III

0 Kudos
deleted-user-CQZbjNeBXm49
Occasional Contributor III

Ezequias,

If you mean the "field_name_0" then you need to remove that before publishing the layer by "double clicking (on the TOC in ArcMap) on "field_name_0", which will turn it into a textbox and removing it completely (press delete) then click out. See images:

Baba

RobertScheitlin__GISP
MVP Emeritus

I agree with Baba, if you are using ArcGIS server to publish the mapservice. But if you just add the url to a web map in the AGOL map viewer to build a web map then you do not get this option (at least I can not find a way). So the need to remove the classification field name in code becomes necessary. The issue is that the field name is part of the Legend portion of the LayerList widget and there is no particular class that can be used to get that exact dom element so you can set its css to not be visible. I will look into this further but it is not looking good.

deleted-user-0W0-oLHxDjCX
New Contributor III

Thank you for the repply but it actually it does not work when you are mapping quantities. Are you agree with me Robert Scheitlin, GISP‌?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ezequias,

  Baba's way will work fine for mapping quantities assuming that you are publishing your own map service and using that service in your web map.

0 Kudos
deleted-user-0W0-oLHxDjCX
New Contributor III

I would like to see it working because we tried it here and it doesn't work at all.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ezequias,

  Sure it works here is a screenshot of it working:

deleted-user-0W0-oLHxDjCX
New Contributor III

Have you tried for quantities classification Babatope Adebajo?

0 Kudos