How do I highlight features on a featurelayer after query is run?
You need to set the outSpatialReference to the views spatialReference
Ok I have begun looking into adding graphics, but after adding graphics to the "map.graphics.add(graphic)" I see no changes being reflected on the map. I check the console for the geometry and it seems to have data present for each graphic but I am not sure if they are being displayed elsewhere or there is another issue preventing the graphics from being displayed. The query is successful and returns 63 results.
Evon,
Sorry I did not see any tags or text saying that. Currently there is no selectFeatures method on FeatureLayer so the option you have is to add a graphic based on the geometry result from the query with your desired symbology assigned.
I am using API 4.2 though
You can use featurelayer.selectFeatures
As in this sample: Select features within a two minute drive time | ArcGIS API for JavaScript 3.19
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.