steinj14

setting scale dependency for webmap with json

Discussion created by steinj14 on May 22, 2013
Hi, I'm using the basic viewer template but creating the webmap via json (not ArcGIS online). I'm trying to set the minScale for a specific layer so it doesn't draw until you zoom in. My code is below, but the layer is still drawing at full extent. Is there something I'm missing?

Thanks,
Joan

{
           "url": "http://gis.tpcmaps.org/ArcGIS/rest/services/LandUse/Existing_Land_Use/MapServer/0",
            "visibility": false,
            "opacity": 0.75,
            "minScale": 2400,
            "maxScale": 0,
            "title": "Existing Land Use",
            "id": "elu",
            "popupInfo": {
         "title": "Existing Land Use",
         "fieldInfos": [
           {
             "fieldName": "ObjectID",
             "label": "ObjectID",
             "isEditable": false,
             "tooltip": "",
             "visible": true,
             "stringFieldOption": "textbox"
           },
           {
             "fieldName": "Shape",
             "label": "Shape",
             "isEditable": false,
             "tooltip": "",
             "visible": false,
             "stringFieldOption": "textbox"
           },
           {
             "fieldName": "JURISDICTION",
             "label": "Jurisdiction",
             "isEditable": false,
             "tooltip": "",
             "visible": true,
             "stringFieldOption": "textbox"
           },
           {
             "fieldName": "ELUSHADE",
             "label": "Existing LU",
             "isEditable": false,
             "tooltip": "",
             "visible": true,
             "stringFieldOption": "textbox"
           },           
           {
             "fieldName": "ELU2_DESC",
             "label": "Description",
             "isEditable": false,
             "tooltip": "",
             "visible": true,
             "stringFieldOption": "textbox"
           }           
         ],
            "description": null,
            }

Outcomes