Hi Mahdi,
Which Desktop edition and version are you using?
When you say you don’t have control over caching, do you mean you can’t cache the reprojected points? Instead of adding the original point to your InMemoryFeatureSource
each time, could you add the projected point? Or is there something in your code that prevents this?
You can also enable tile caching:
layerOverlay.TileCache = new FileRasterTileCache("cacheFolderPath", "cacheId");
Note: this won’t help if your data is constantly changing.
If you add features directly via inMemoryFeatureSource.InternalFeatures
, call BuildIndex()
afterward to rebuild the R‑Tree index. You need to do this each time you update data through InternalFeatures
. If you use layer.BeginTransaction()
/ layer.CommitTransaction()
, the index is managed automatically.
Also, rendering thousands of points is inherently slow. Consider:
- Showing fewer features at higher zoom levels
- Using clustering to reduce the number of points rendered
Give these a try and let us know how it goes!
Thanks,
Ben