Simple Label Scale

230
1
Jump to solution
05-11-2020 09:12 AM
jaykapalczynski
Frequent Contributor

trying to only show my labels between min and max scale....

I get the labels no matter how far zoomed in or how far zoomed out....thoughts?

        const labelClass = {
            // autocasts as new LabelClass()
            symbol: {
                type: "text", // autocasts as new TextSymbol()
                color: "yellow",
                font: {
                    // autocast as new Font()
                    family: "Playfair Display",
                    size: 8,
                    weight: "bold"
                }
            },
            minscale: 4000000,
            maxscale: 250000,
            labelPlacement: "always-horizontal",
            labelExpressionInfo: {
                expression: "$feature.FIRST_JURI"
            }
        };

        var UrlWebMercator = "https://xxxx/arcgis/rest/services/DGIF_Test/xxx/FeatureServer/1";
        window.countyLayerWebMercator = new FeatureLayer({
            url: UrlWebMercator,
            outFields: ["*"],
            id: "LayerWebMercator",
            labelingInfo: [labelClass],
            visible: true
        });
0 Kudos
1 Solution

Accepted Solutions
jaykapalczynski
Frequent Contributor

For crying out loud....just the Capital S in both maxScale and minScale

            minscale: 4000000,
            maxscale: 250000,


      minScale: 4000000,
      maxScale: 250000,

View solution in original post

1 Reply
jaykapalczynski
Frequent Contributor

For crying out loud....just the Capital S in both maxScale and minScale

            minscale: 4000000,
            maxscale: 250000,


      minScale: 4000000,
      maxScale: 250000,