Select to view content in your preferred language

Symbology Does not Display in Legend

2946
1
07-14-2015 12:16 PM
ChrisSergent
Deactivated User

My symbology is not displaying in my legend.

Here is an excerpt of the Legend code:

app.legend = new Legend({
            map: app.map,
            layerInfos: [{
                title: app.supportLayer.name,
                layer: app.supportLayer
            }, {
                title: app.signLayer.name,
                layer: app.signLayer
            }]
        }, "legend");
        app.legend.startup();
        // TODO: other widgets, et

And my full code sample can be found at:

csergent45/streetSigns at 1e5ccad65dbcdb7c427a2d248dd98a3d8a48e532 · GitHub

This code is in the app folder with the name: main.js

Tags (2)
0 Kudos
1 Reply
ChrisSergent
Deactivated User

I actually had to comment out the console.log line to remove it's error as shown below:

/* Evaluate if any web services are not running */
        app.map.on("layer-add-result", function (evt) {
            //console.log(evt);
         
            var evalLayers = evt.layer.valueOf();


            if (evalLayers._div == null) {
               
                /* Page Redirect */
                window.location.assign("http://www.w3schools.com")
            }
           
        });

and I had to change the name of a button that was not on the HTML form:

// Changed name to correct button name
        on(dom.byId("btnSignPrevious"), "click", function () {
            console.log("Previous Works");
            var query = new esriQuery();
            var queryTask = new QueryTask(config.signLayerUrl);
            query.returnGeometry = false;
            query.outFields = ["*"];
0 Kudos