Select to view content in your preferred language

Feature Label MinScale Issue

3019
10
Jump to solution
04-24-2017 02:19 PM
LloydBronn
Frequent Contributor

I'm trying to have my feature layer labels show up at a certain zoom level. I can set maxScale and get results, but minScale doesn't work. 

var labelColor = new Color("#00F");
          var font = new Font();
          font.setFamily("arial");
          font.setSize("10pt");
          
          var textSymbol = new TextSymbol();
        textSymbol.setFont(font);
          
          var basin = "{Name}";
    
        var json = {
          "labelExpressionInfo": {"value": basin + " Basin"},
            "minScale":3
        };

        
        var labelClass = new LabelClass(json);
        labelClass.symbol = textSymbol;
        waterbasins.setLabelingInfo([ labelClass ]);‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
10 Replies
LloydBronn
Frequent Contributor

I changed the rest of my lines to set the renderer, so it does work. 

0 Kudos