Is there a way to unhighlight the search result from a feature layer search from a URL?

357
1
02-04-2021 02:30 PM
EmilyL
by
Occasional Contributor

Hello,

It's a great feature that WAB allows to add a GIS URL service as a Search function.  

EmilyL_0-1612477092197.png

But is there a way that the result of the search is not highlighted with the brownish orange color?  Can the result be just simple point?  The color coding is a bit misleading.  It also would be nice if the pop-up window is not a 'general setting' and it's an individual setting instead. 

EmilyL_1-1612477209483.png

Thank you,

Emily

Tags (3)
0 Kudos
1 Reply
LongDinh
Occasional Contributor II

Hi EmilyL,

If you are the administrator of the map service, displayed highlight colours can be configured in the map service publishing stage. In the your layer properties, there should be a property for highlight selection colour. 

Display highlight colours can also be configured in the deployed widget's Javascript. You may need to access the WAB developer edition and make changes to the codebase and redeploy a customised Search Widget.

I am assuming this particular widget calls the URL and creates a FeatureLayer object  (https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html) to query. You can override the selection symbol by using the .setSelectionSymbol() method for the configured layer. You should also be able to customise the returned selection symbol. 

You can add an on click mapEvent to place a marker at the location of your mouse click. 

I am not exactly sure what you mean by: " It also would be nice if the pop-up window is not a 'general setting' and it's an individual setting instead." You can override how each attribute table displays by setting the infoTemplate object the feature layer.

0 Kudos