1、在视图mapView 上添加的点线面
// 删除所有
mapView.graphics.removeAll();
// 删除一个
const pointGraphic = new Graphic({geometry, symbol})
mapView.graphics.remove(pointGraphic);
// 删除多个
mapView.graphics.removeMany([pointGraphic, polylineGraphic]);
2、GraphicsLayer图层上的点线面
const pointGraphicLayer= new GraphicsLayer(); // 图层
// 删除所有
pointGraphicLayer.removeAll();
// 删除一个
const pointGraphic = new Graphic({geometry, symbol})
pointGraphicLayer.remove(pointGraphic);
// 删除多个
pointGraphicLayer.removeMany([pointGraphic, polylineGraphic]);