Good day,
I have these two requirements:
I'm able to achieve requirement #1 with the codes specified in - https://developers.arcgis.com/javascript/latest/sample-code/effect-blur-shadow/
But for #2, I can't seem to find an api that will accept country name of country fid nor any post about this.
The code in the link uses:
var query = {
geometry: view.toMap(event),
returnGeometry: true,
outFields: ["*"]
};
featureLayer.queryFeatures(query);
But on the next requirement, the input country will be from the selected row and not a coordinate from the map.
Anyone know if there's another API for this or if this is possible?
Here's my test page -
Thanks!
Solved! Go to Solution.
Hi Jill,
I'm using a regular html table which displays business data.
I was able to resolve the requirement above though using Query object. Here's a sample code:
queryObject = new Query();
queryObject.where = "COUNTRY = '" + selectedCountry + "'";
queryObject.returnGeometry = true;
queryObject.outFields = ["*"];
query.executeQueryJSON(queryUrl, queryObject).then(function (results) {
if (results.features) {
graphicsLayer.graphics.add(results.features[0]);
}
});
Thanks!
Hi,
Are you using the FeatureTable widget?
This sample demonstrates how to select a feature using the map or the table -
FeatureTable widget with a map
Jill
Hi Jill,
I'm using a regular html table which displays business data.
I was able to resolve the requirement above though using Query object. Here's a sample code:
queryObject = new Query();
queryObject.where = "COUNTRY = '" + selectedCountry + "'";
queryObject.returnGeometry = true;
queryObject.outFields = ["*"];
query.executeQueryJSON(queryUrl, queryObject).then(function (results) {
if (results.features) {
graphicsLayer.graphics.add(results.features[0]);
}
});
Thanks!