I have a table that selects data and also highlights the data on the map. When I use the highlightSelectRoom.remove (); it only removes the last highlighted object and not all of them.
here is my code that selects the data in the map when the table row is selected:
function zoomSingleRoom (id)
{
require ([
"esri/rest/query",
"esri/rest/support/Query",
"esri/layers/FeatureLayer"],
function (query, Query, FeatureLayer)
{
console.log ("zoomRoom");
view.whenLayerView (roomsOrgsLayer).then (function (layerView)
{
var query = roomsOrgsLayer.createQuery ();
query.objectIds = [id];
query.where = "1=1";
roomsOrgsLayer.queryFeatures (query).then (function (results)
{
const features = results.features;
graphicsLayer = results.features;
highlightSelectRoom = layerView.highlight (results.features);
});
});
});
}
I call on the highlightSelectRoom.remove () using a button and that also clears the selected rows in the table. Any ideas?
Thanks!