我有一个用于添加图形的多个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));
}
}