Posted By Howard on 10-05-2010 03:37 AM
Hi Carlos,
If we know how FeatureSourceMarkerOverlay works, the InMemoryMarkerOverlay is a shortcut of FeatureSource which holds an InMemoryFeatureSource. It’s just for easily using.
SimplyMarkerOverlay is kind different from the two above, it works like a container. You can directly create a marker object and add them into the overlay. It’s one to one correspondence. Which the two overlays above only maintain Features not markers. And another difference is that SimplymarkerOverlay renders all the markers on the map. It doesn’t refresh during panning. While InMemoryMarkerOverlay only renders markers in the viewport extent. So it refreshes all the time after the panning is finished.
1. Based on this I understood SimplyMarkerOverlay was the rich weight as Markers are controls, and InMemoryMarkerOverlay was a Layer with CustomStyle for light use, not controls here… that’s why my question is what’s the difference between InMemoryMarkerOverlay and InMemoryFeatureLayer. InMemoryMarkerOverlay don’t use markers, but FeatureSources, with some kind of CustomStyle (how do you add the tooltip to a Feature?), and it has some custom properties that a InMemoryFeatureLayer doesn’t have.
2. So InternalFeatures would be in the projected (FeatureLayer) side, and the external side is the DataSource, right?
3. Ok, I’ll do it that way. I understand that if no RebuildIndex is done at all, spatial queries will just take longer, or will be unacurate as well as if It’s done once and not updated after data changed?
5. Understood, then transactions are only required when accessing the real DataSource.