schlot

agsjs.dijit.TOC not displaying layer's symbology if not visible at startup

Discussion created by schlot on Oct 7, 2013
I have been using the TOC dijit for several projects now and it's really great!   This is the first project I have with a layer that only displays once the user zooms closers.   In my service, layer[0] are points drawn with a small gray dot.  As the user zooms to a closer scale, these simple dots turn off and layer[1] takes over, drawing a more complex symbol, classifying these by type instead. I should mention that Layer [0] and Layer [1] reference the same data, the difference is in how they are symbolized and their scale thresholds.

My issue is in how the TOC dijit behaves.  The symbols for layer[1] never get loaded, I assume because this layer isn't visible at startup.  However, it's recognizing it's there, because the check box does get created.  I'm able to switch layer[1] on/off, but without the symbology to guide the user of what each symbol means on the map, it's not much good.

I downloaded the most recent files back in August, so I think I'm working with the latest and greatest.  Has this always been the behavior of this TOC?  Is it a problem because layer[0] and layer [1] are referencing the same data?

I'm tempted to try out the new scale dependent renderer that was released at 3.7, but I'm afraid that wouldn't play well with this dijit either.

Outcomes