Select to view content in your preferred language

eLayerList Widget

1127
3
08-27-2014 06:30 AM
NolanAlbarelli
Occasional Contributor

I have queried a service to just show a few ships of interest.  The problem is, when I try to expand the "+" next to the layer label in the eLayerList Widget, it makes the layer list essentially crash.  Has anyone else seen this?  When I try to expand the layer, I can see the sublayer appear at the top of the layer list behind the first operational layer.  At that point, no layers can be turned on or off and the viewer requires a refresh to work.

This must be a bug, right?

Thanks!

-Nolan

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Nolan,

   I have never seen this. can you explain in more detail this statement:

I have queried a service to just show a few ships of interest

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nolan,

  Yes that explains it. You can not query a layer in the url for that layer like you are attempting. To limit the features that are returned by a layer in a map service you should be using the definitionexpression attribute on the layer tag using either a layer type of (type="feature") if you want to just add the one layer from the map service or  something like this if you want to keep the layer type as dynamic:

<layer label="USA Federal Lands-Reservations"
  type="dynamic" visible="false" alpha=".7"
  url="http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer">
  <sublayer id="2" definitionexpression="AGBUR = 'BIA'"/>
</layer>

0 Kudos
NolanAlbarelli
Occasional Contributor

thanks robert!

0 Kudos