Closed alpascual closed 10 years ago
In the "Everything (or Anything) You Wanted to Know about the ArcGIS Runtime SDKs" session, they answered: the .Net Engine was significantly enhanced to support smooth tracking of the GPS location on the map (centering and heading up). They suggested that tile services or tile packages should be used, but I said that some customers that need to run disconnected don't want the long download times or large file size on disk. I reminded them of the technique they had suggested to use in the WPF SDK of overriding this method in ArcGISDynamicMapServiceLayer
10.1.1: protected override void GetSource( Envelope extent, int width, int height, DynamicLayer.OnImageComplete onComplete )
Enriched in 10.2:
protected override void GetSource( DynamicLayer.ImageParameters properties, DynamicLayer.OnImageComplete onComplete )
ImageParameters
public Property Dpi The dpi for the image requested.
public Property Extent The map extent that the image should cover
public Property Height The image height in pixels
public Property Rotation The rotation angle to generate the image for in degrees. This should only be set if the service supports rotation. The layer must implement DynamicLayer.ILayerSupportsRotation for this to be set.
public Property TimeExtent Gets the time extent.
public Property Width The image width in pixels
public Property WrapAround True if the export request should be generated for a wraparound viewport. This should only be set to true if the service supports wrap around.
First level optimization is to just suppress any further programmatic map pan or zoom until the OnImageComplete fires back for every layer with a pending request.
Second level of optimization would be to intercept the request, buffer it and then suppress further requests if the last image would fill the current extent of the map. To correctly handle map rotation WPF SDK 10.2 would be needed.
Third level optimization would be to intercept the request and perform some combination of optimizations, such as a) only requesting the part of the map that is not visible and stitching it back on the previously saved image (risk of weird looking labels) or b) doing some kind of caching. To support map rotation WPF SDK 10.2 would be needed.
For .Net SDK, I don't know if they already handle this kind of optimization. If necessary, Instead of GetSource, you would use GetImageAsync.
Esri engineers. Anything to add? modify? Thank you!
@mikedorais I think we talked at length about this at the DevSummit, and it sounds like you got the idea. If not, could you elaborate?
I just started to try this technique in order to deal with the map display performance problem while the map extent is frequently changed while tracking the vehicle or a set of locations that I could override the GetSource method and use that to detect when a request for a new image had gone out before the previous completed and prevent it from happening and let only the last one go through.
Unfortunately Esri developers have sealed the method, preventing me from overriding it. We are currently using 10.1.1. was this unsealed in 10.2?
This may be a show-stopper for us. We need assistance soon. I am submitting a ticket.
internal class ArcGISLocalDynamicMapServiceLayerWithControlledRefresh : ArcGISLocalDynamicMapServiceLayer
{
protected override void GetSource(
Envelope extent,
int width,
int height,
DynamicLayer.OnImageComplete onComplete
)
{
}
}
Produces the compile error:
Error 59 'TriTech.InformMobile.Map.ArcGISRT.ArcGISLocalDynamicMapServiceLayerWithControlledRefresh.GetSource(ESRI.ArcGIS.Client.Geometry.Envelope, int, int, ESRI.ArcGIS.Client.DynamicLayer.OnImageComplete)': cannot override inherited member 'ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer.GetSource(ESRI.ArcGIS.Client.Geometry.Envelope, int, int, ESRI.ArcGIS.Client.DynamicLayer.OnImageComplete)' because it is sealed C:\TFS\VisiNetMobile\Dev\src\Client\TriTech.InformMobile.Map\ArcGISRT\ArcGISLocalDynamicMapServiceLayerWithControlledRefresh.cs 13 33 TriTech.InformMobile.Map
Esri Incident #1259141
It was suggested that I override GetUrl() instead. I tried that but it never gets called by ArcGISRuntime. I'm sending a sample application that demonstrates the map refresh issue when the map is tracking a GPS location using a simulated GPS. New Esri Incident #1259543.
This was from me on paper. Just signed up.
Question specifically about WPF 10.1.1.