ThinkGeo.com    |     Documentation    |     Premium Support

Highlight Feature General Design Question

Hi,


I have a feature layer with like 20,000 features, and one of my requirements is to change the color of the feature upon user selection.  I tried to do this by simply changing the PointStyle that's used to render the feature in the same feature layer, which requires a refresh.


The amount of time it takes for the refresh to occur upon user selection is too long, so I have some design questions.


Would it perform better if I created a separate layer for rendering the selected features?


Is there any way to invalidate a small region of the screen?


Thanks,


Greg



Greg,


I agree with you that it would be much better if you could create a separate layer(for example InmemoryFeatureLayer) for the features you want to render differently, Following code can show you how to highlight one feature on the MapControl.
HowDoISamples\Dynamic Shapes\HighlightAFeatureOnTheMap
 
Any more questions just feel free to let me know.
 
Thanks.
 
Yale

Greg, 
  
   The reason that would be better is that then you can refresh just that one overlay.  We maintain a cache of the overlay image of the slow drawing layer so that should display very quickly.  The new color of the point should cover the color from the cached point. 
  
 David