arcgis for js 闪烁

2021-05-28 00:01

阅读:737

标签:selected   lan   cte   pat   content   mat   use   rto   task   

$(document).ready(function () {
    function checkKey(evt) {
        var keyID = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);
        alert(keyID);
    }
    require([
        "dojo/parser",
        "esri/map",
        "esri/geometry/Extent",
        "esri/SpatialReference",
        "esri/dijit/Scalebar",
        "esri/dijit/OverviewMap",
        "esri/layers/ArcGISDynamicMapServiceLayer",
        "esri/tasks/QueryTask",
        "esri/tasks/query",
        "esri/symbols/SimpleMarkerSymbol",
        "esri/symbols/CartographicLineSymbol",
        "esri/symbols/SimpleFillSymbol",
        "esri/layers/GraphicsLayer",
        "esri/graphic",
        "esri/geometry/Geometry",
        "esri/InfoTemplate",
        "dojo/_base/Color",
        "dojo/_base/lang",
        "dojox/gfx/fx",
        "dijit/layout/LayoutContainer",
        "dijit/layout/ContentPane",
        "dojo/dom",
        "dojo/domReady!"],

    function (parser, Map, Extent, SpatialReference, Scalebar, OverviewMap, Dynamic, QueryTask, Query, SimpleMarkerSymbol, CartographicLineSymbol, SimpleFillSymbol, GraphicsLayer, Graphic, Geometry, InfoTemplate, Color, lang, fx, LayoutContainer, ContentPane, dom) {
        map = new Map("map", {
            //basemap: "national-geographic",
            center: [-72.923611, 41.31],
            zoom: 11,
            logo: false
        });

        function showResultsFlash(featureSet) {
            // alert("flash");
            // remove all graphics on the maps graphics layer
            map.graphics.clear();

            // assign featureSet array to a single variable.
            var resultFeatures = featureSet.features;

            // Loop through each feature returned
            for (var i = 0, il = resultFeatures.length; i 

  

  function gridSelect(e) {
        var graphicFlash;
        var gridId = e.currentTarget.id;
        var selectedGrid = dijit.byId(gridId);
        var row = selectedGrid.row(e);

        graphicHighlight = findGraphicByAttribute(row.data);

        if (graphicHighlight !== null) {
            switch (graphicHighlight.geometry.type) {
                case "point": case "multipoint":
                    graphicFlash = new esri.Graphic(graphicHighlight.geometry, symbolFlashPoint)
                    break;
                case "polyline":
                    graphicFlash = new esri.Graphic(graphicHighlight.geometry, symbolFlashPolyline);
                    break;
                case "polygon": case "extent":
                    graphicFlash = new esri.Graphic(graphicHighlight.geometry, symbolFlashPolygon);
                    break;
            }
            map.graphics.add(graphicFlash);
        }

        var shape = graphicFlash.getDojoShape();
        var animStroke = fx.animateStroke({
            shape: shape,
            duration: 500,
            color: { end: new dojo.Color([0, 0, 0, 0]) }
        });
        var animFill = fx.animateFill({
            shape: shape,
            duration: 500,
            color: { end: new dojo.Color([0, 0, 0, 0]) }
        });
        var anim = dojo.fx.combine([animStroke, animFill]).play();
        var animConnect = dojo.connect(anim, "onEnd", function () {
            map.graphics.remove(graphicFlash);
        });
    }

  

arcgis for js 闪烁

标签:selected   lan   cte   pat   content   mat   use   rto   task   

原文地址:https://www.cnblogs.com/zany-hui/p/14791072.html

上一篇:jquery的下载

下一篇:htmlToTex


评论


亲,登录后才可以留言!