AnsweredAssumed Answered

FeatureLayer & MapImageLayer - Bootstrap checkboxes buttons to toggle layers

Question asked by matias16 on Feb 13, 2016
Latest reply on Feb 14, 2016 by matias16

Hello everyone!

 

I'm a total beginner in web maps and I don't know how to create bootstrap checkboxes buttons to toggle my FeatureLayer and MapImageLayer

 

 

I found an example: Edit fiddle - JSFiddle . This works, but with ArcGISDynamicMapServiceLayer.

 

Could anyone help me?

 

My layers:

 

            map.on("load", function() {             var mil = new esri.layers.MapImageLayer(               {                 'opacity': 0.3               });             map.addLayer(mil);             var mi = new esri.layers.MapImage({               'extent': { 'xmin': 24.8312980522177, 'ymin': 60.1396272514532, 'xmax': 25.2344061856669, 'ymax': 60.2895551888062},               'href': 'https://aalto.maps.arcgis.com/sharing/rest/content/items/28b2611073c4482aabf85fec5c75454f/data'             });             mil.addImage(mi);             });             var viewpoints = new FeatureLayer("https://services3.arcgis.com/DrStYMBZkn3kRBe9/arcgis/rest/services/view_points/FeatureServer/0", {outFields: ["*"]});             map.addLayer(viewpoints);

Outcomes