dgoldb2@luc.edu

Single checkbox for large and small scales of same feature

Discussion created by dgoldb2@luc.edu on Nov 1, 2012
Latest reply on Dec 6, 2012 by geos_rfleet
I can't figure out how to have a single checkbox control the visibility of two layers, where one is the large scale version and one is the small scale version.
           var mapservice = "http://147.126.65.155/gis/rest/services/tft/tft_maine/MapServer";

           var superMarket1 = new esri.layers.FeatureLayer(
               mapservice+"/4",
               {
                   id : 'superMarket1',
                   mode : esri.layers.FeatureLayer.MODE_SNAPSHOT,
                   opacity : 1
               });
           var superMarket2 = new esri.layers.FeatureLayer(
               mapservice+"/5",
               {
                   id : 'superMarket2',
                   mode : esri.layers.FeatureLayer.MODE_SNAPSHOT,
                   opacity : 1
               });


[HTML]<li class="TOCThemeItem"><input class="list_item" id="superMarket1" value="superMarket1" onclick="layerVisibility();" type="checkbox">Supermarket</li>[/HTML]

Outcomes