This is a migrated thread and some comments may be shown as answers.

updating items in VisualizationLayer.Item collection

1 Answer 12 Views
Map
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 31 Jul 2014, 11:30 AM
HI,

I am evaluating RadMap for use in a GIS web application.  In my application I am using a VisualizationLayer and populating with MapShapeData items using the the layer Items collection.

When the current LocationRect of the RadMap changes I would like to add and/or remove items from the list.  In this case is it better to clear the collection and re-add everyone or to attempt to remove the items that should not be there and add those that are missing?  The collection does not seem to be ordered, so I suppose Contains will use a linear search, thus I am favoring a clear and add technique.

In addition how would the MapItemCollection.DeferRefresh attribute affect to proceedings (if at all)?

Also who would the VisualizationLayer.ResetItems method be useful in this case?

In my code spike am sometimes seeing exceptions during the update of Items collection, (but this may come from any number of hacks that I am trying).

Thanks in advance for any help on this subject.

dennis.

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 01 Aug 2014, 05:35 AM
Hello Dennis,

I would recommend you to use the Virtualization feature. It allows displaying only items which are in the viewport for better rendering performance.
For more details you can take a look at the Map Shapes Virtualization article.

Regards,
Andrey Murzov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Map
Asked by
Dennis
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or