Select to view content in your preferred language

Highlight, instead of placing a PictureMarkerSymbol on, a queried feature when the page is refreshed

194
2
Jump to solution
08-26-2024 09:21 AM
andrewc213
Emerging Contributor

I have a FeatureLayer containing parcels that is displayed in a MapView. This FeatureLayer pulls its data from a specific URL. I have a LayerSearchSource that uses the same URL. When I enter a valid query for a parcel (ten digits), the red pin icon (PictureMarkerSymbol) that I assigned to the resultSymbol attribute of the LayerSearchSource appears on the queried parcel:

andrewc213_0-1724689151980.png
An entered query will be appended to the URL of the webpage. When the page is refreshed, the MapView zooms back to the queried parcel and the red pin is dropped on in.

However, I want to use highlights instead of resultSymbols. In the above scenario, I would like automatic highlights to appear when a valid parcel is queried, and when the page is refreshed (with a valid query string in the URL), like so:

andrewc213_1-1724689252561.png

What is the best way to accomplish this? I'm using TypeScript ReactJS.

0 Kudos
1 Solution

Accepted Solutions
JoelBennett
MVP Regular Contributor

It seems the simplest thing to do, at least to accomplish this visually, would be to use a SimpleFillSymbol with your resultSymbol instead of a PictureMarkerSymbol.  Would that not accomplish what you're trying to do?

View solution in original post

0 Kudos
2 Replies
JoelBennett
MVP Regular Contributor

It seems the simplest thing to do, at least to accomplish this visually, would be to use a SimpleFillSymbol with your resultSymbol instead of a PictureMarkerSymbol.  Would that not accomplish what you're trying to do?

0 Kudos
andrewc213
Emerging Contributor

That's actually exactly what I was looking for; I wasn't aware of the existence of FillSymbols, and using the SimpleFillSymbol accomplishes exactly what I needed. Thanks a million.

0 Kudos