Select to view content in your preferred language

Highlight selected point features(unique value renderer) using ArcGIS JavaScript API

5833
5
12-10-2014 04:31 AM
Sai_PhaneendraPoludasu
Deactivated User

I was trying to highlight features that are selected from a custom data grid on map.On selection of any record the related feature is selected from the feature layer. While working with ArcGIS Silverlight API and WPF API, the selected feature is highlighted automatically with cyan color. I was not able to achieve the same using JavaScript API. Is there something I was missing ?

 

Please help me with this. Thanks in advance.

 

Note: I was aware of a work around - using a graphics layer and plotting the selection symbol in that layer which would be depicted as the feature is selected. I would opt for this, if there is nothing we could do to resolve the above mentioned issue. 

0 Kudos
5 Replies
KenBuja
MVP Esteemed Contributor

Have you seen this sample, where clicking on a row in a grid highlights the state on the map?

0 Kudos
Sai_PhaneendraPoludasu
Deactivated User

Yes Ken Buja, I have gone through this sample. This sample is for a polygon layer, and it also works for polyline layer - the selection symbol overrides the actual renderer of the layer and that would look like the feature is just highlighted.

But in case of a point layer, a point symbol is also replaced with the selection symbol(say cross-hair), the feature symbol is completely lost. But what we want here is that cross hair should be shown enclosing the feature symbol.

In the above snapshot, red colored feature is shown with actual feature symbol and selection symbol is shown with cyan colored cross hair. What I was trying to achieve is enclose the red colored feature symbol with cyan colored highlight symbol when the feature is selected.

0 Kudos
NicholasHaney
Regular Contributor

Can you provide your code (or upload it to JSFiddle)? Also, have you thought about changing the selection symbol to match point symbol? For example you could use a yellow fire hydrant as the selection symbol to indicate that it has been selected.

0 Kudos
BenAller
Deactivated User

It's been a while, but does anyone know of a fix for this?  I'm trying to use a selection symbol that does not block the feature symbol. 

Thanks.

ThomasPuthusserry
Regular Contributor

Hi Ben

I have a similar situation now: https://community.esri.com/thread/184224-how-to-highlight-a-point-feature-in-a-map-service-using-arc... 

Have you come across any answers / way around to this?

Thanks

0 Kudos