AnsweredAssumed Answered

Fairly new to JS api: need help toggling feature layers served by AGO

Question asked by azendel on Dec 10, 2013
Latest reply on Dec 12, 2013 by azendel
We have an organizational account.  I've created a feature service that shows the same census tracts symbolized different ways (this is just a test scenario).  For each layer in ArcMap, I set up the class breaks symbology and turned off the fields that I didn't want to display.  Then I published the service to AGO and shared the service definition and features with "everyone".  The service is accessible here - at least for now; we'll probably remove this particular demo once we have something working: http://www.arcgis.com/home/item.html?id=deeafd46294240a49f06c8e84e8f09b0

Now we want to be able to display these three layers on top of a basemap (likely one of the ESRI-provided base maps) and allow the map users to toggle the individual layers.  But we don't want to do this in the 'canned' AGO maps -- we don't want to embed this:  http://bit.ly/JceTvp.  We want to create javascript map with some check boxes to toggle the layers on and off, much like this sample.  I understand that there is a difference between a ArcGISDynamicMapServiceLayer and a FeatureLayer.  I've also unsuccessfully tried to create a simple JS map with one base map layer and one of these feature layers.  Are there any good and complete examples that show how we might do this.  Is this even possible with AGO feature services and JS?

Ultimately, we'll need map div's on several web pages that will discuss various demographic and other regional indicators.

Outcomes