TOC Widget 3.0 - exclude layers

1178
6
Jump to solution
08-31-2012 07:49 AM
philippschnetzer
Occasional Contributor III
In the previous TOC (2.5) when you exlcuded a later in the xml it removed it from the TOC but was still visible on the map...in the new version (3.0) an excluded layer is removed from both the TOC and the map.

Is there any way I can use the TOC 3.0 and still remove layers from the TOC but have them remaining on the map?

Thanks
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Phillip,

   That document was for migrating from 1.x to 2.x. All the info you need on the specifics of what you are getting are cover here in the Migrating from 2.5 to 3.0:

http://resources.arcgis.com/en/help/flex-api/concepts/017p/017p00000024000000.htmhttp://resources.ar...

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Philip,

   No that is not possible any more as it was causing me several issues. It actually changed back in 2.5.1 of the widget

* MAJOR CHANGE when a layer of a map service or the whole mapservice is excluded using the excludelayers it
  is excluded from the TOC and the map. This has changed from where it use to be visible in the map even
  though it was excluded from the TOC. *Clarification* If you want to exclude a whole map service from the
  toc and the map then you just remove it from the viewers main config. Currently if you exclude a map service
  and do not specify any sublayers then the mapservice will remain in the map.
0 Kudos
philippschnetzer
Occasional Contributor III
Dang...so would it be possible to port the last version that had that capability so it would work in flexviewer 3?  Or would it be easier to find those sections in the code and try to put them into the 3.0 version?  I really need to make this work so do you have any suggestions for me, Robert?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Phillip,

    You could try and just add the version you are working with (loosing all the new functionality that was introduced in 3.0) and just fix the couple of error you would get as package names and properties have changed a couple of places.
0 Kudos
philippschnetzer
Occasional Contributor III
Robert,

Thanks, I'm going to try to bring your TOC 2.5 in to 3.0.

I faintly recall a url on the forum here somewhere about a doc that you wrote for migrating from 2.5 to 3.0 - could you provide me with that link please?

I am getting the following errors and hope that your doc can help me with:

- Access of possibly undefined property id through a reference with static type com.esri.ags.layers.supportClasses:layerInfo

- Access of undefined property JSON

- Can not resolve a multiname reference unambiguously. JSON


Thanks for your help as always!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Phillip,

   That document was for migrating from 1.x to 2.x. All the info you need on the specifics of what you are getting are cover here in the Migrating from 2.5 to 3.0:

http://resources.arcgis.com/en/help/flex-api/concepts/017p/017p00000024000000.htmhttp://resources.ar...
0 Kudos
philippschnetzer
Occasional Contributor III
Robert,

I have it working now, the projParams threw me for a loop but I lucked out and made it work.  Thanks for your guidance!
0 Kudos