My Pointslayer can have Many Icons displayed at a given time.
The user has the option of selecting a date range of icons to display.
On a regular Interval the system will query the database and based on whether the icon exists or not will either display or remove the Icon from the layer.
As a test , I have 50,000 icons. ( A Bit much but makes the timing variance easier to monitor)
Adding Icons ( All 50,000 ) takes approx 90 seconds. ( I am Very happy with this.)
If the user narrows the Time frame, The removal of the Icons outside the date range Is vastly slower. ( 10-20 Minutes) to remove 3,000 icons.
the removal is a simple pointLayer.InternalFeatures.Remove(LayerKey)
any Ideas on how to remove these faster. ( Can I perform a select on the layer and remove as a batch?)
PS. Clearing all and redrawing caused a very erratic user interface and I do not want to go down that road.
Removing Many InternalFeatures
Hi Steve,
Sorry to say, I am afraid it is hard to enhance it. It is because the InternalFeatures is a GeoCollection type and the GeoCollection is an extension of Collection. In the GeoCollection, we will manager all the features index and this make the "Remove" is not simple. So we can see the behavior that the more features in the GeoCollection, the more slower it will takes.
Sorry for any inconvenience.
Johnny