AnsweredAssumed Answered

Simple Zoom

Question asked by jay.kapalczynski on May 19, 2020
Latest reply on May 19, 2020 by jay.kapalczynski

Just looking for a simple zoom ... 

I don't think I need to query anything....I am adding a feature to a graphics layer....then want to zoom to that Graphics Layer

 

Thoughts?

 

    var mapright = new Map({
        basemap: "dark-gray",
        layers: [resultsLayer2, resultsLayer4]
    });

    var viewright = new MapView({
        container: "viewDivright",
        map: mapright
    });


    function displayResultsUniqueID(results) {

        var features2 = results.features.map(function (graphic) {
            graphic.symbol = {
                type: "simple-fill",  // autocasts as new SimpleFillSymbol()
                color: [51, 51, 204, 0.9],
                style: "solid",
                outline: {  // autocasts as new SimpleLineSymbol()
                    color: "white",
                    width: 1
                }
            };
            return graphic;
        });
        window.resultsLayer2.addMany(features2);

        viewright.goTo(features2.Extent);
    }

Outcomes