Problem 1:
I am using an InMemoryFeatureLayer in a LayerOverlay. I need to update to two seperate features and therefore call Refresh(region) on the overlay in the exact regions of each features bounding box, in two seperate Refresh calls. Unfortunately, it seems that the second refresh cancels the first. This would make sense to me if it was full refresh calls, but maybe not regional refresh calls. Is this the expected behavior?
Problem 2:
The Refresh(Enumerable<rectangleshape><rectangleshape><rectangleshape>) method seems broken, or maybe my intuition for its intended use is wrong. I would expect each of the RectangleShapes to define an area on the overlay to be refreshed, but that is not the behavior I am seeing.
I have attached a sample that should demonstrate the issues.</rectangleshape></rectangleshape></rectangleshape>
ThinkGeoRefreshIssues.zip (16.9 KB)
Some Refresh methods seems broken
So I experimented a bit to try avoid calling Refresh(Enumerable), but instead call Refresh(region) for each of the updated regions, waiting for one refresh to end before I start the next. I thought I could use the Overlay.Drawn event to detect when a refresh has ended, but this led to new problems. The Drawn event is triggered one time if I call full Refresh (without parameter), or if I call Refresh(region), and the region is the current extent. But if I call Refresh(region) and the region does not contain all tiles, Drawn will be triggered many times. My guess is that it is triggered for each drawn tile. This makes it pretty hard to know when the overlay is done refreshing, and it is not consistent with the documentation which states that “This event raises after the overlay is drawn”.
I have attached a sample to demonstrate the behavior.
ThinkGeoRefreshIssues2.zip (16.6 KB)
Hi Jonas,
Thanks for your sample.
Our developer are working for it.
Any update we will let you know.
Regards,
Don
Hi Jonas,
Today we can reply about the first issue you reported for Refresh(Enumerable), it works well now. You can get this fix in the latest version after today.
And for your test case “Second refresh cancels the first”, that’s our expected behavior. Just like you understand for full extent, we cannot know how long the first refresh will keep when the 2nd refresh comes, so we will cancel all original refresh. Does that important for your scenario to avoid cancel previous refresh?
Regards,
Don
Hi Jonas,
For your second sample, yes you’re right each tile drawn end this event will be triggered, because when we are using multiply tile mode, the tiles are drawn async, so maybe this event won’t be helpful for make sure when the overlay is drawn complete.
Could you please let us know more detail about your scenario, so we can find a workaround for it?
Regards,
Don