AcrGIS Javascript在graphicLayer上添加图形

时间:2017-03-07 21:31:58

标签: javascript esri arcgis-js-api

我有一个用于添加图形的多个featureLayers和一个graphicLayer。但是我无法在此图层中添加图形。有人可以帮助解决我做错的事吗?

       featureLayer.on("click", function (evt) {
        attrs = evt.graphic.attributes;
        if(clickmode == 1)
        {
           var highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255, 0, 0]));
           var location = new Point(evt.mapPoint.x, evt.mapPoint.y, evt.spatialReference);


           graphicLayer.add(new Graphic(location, highlightSymbol));
        }
      }

0 个答案:

没有答案