AnsweredAssumed Answered

LocalMapService not updating layout on map PanTo call

Question asked by zefram47 on Dec 10, 2012
Latest reply on Dec 12, 2012 by MBranscomb-esristaff
I have an interesting problem.  I am using a LocalMapService object with ArcGISDynamicMapServiceLayer to display a large streets shapefile, large enough that a LocalFeatureService is not a viable option.  This map uses GPS data, obtained through a service and not the hardware directly, to track the users location, and keeps the map centered on that moving point.  The update frequency is such that calling the PanTo function with the default animation duration set causes a strange oscillation with the map center to locations that have not been called for.  As such, I set the pan duration to 0s which seems to correct that issue.  However, what I then find is that the map does not update its layout when the PanTo completes.  This may be related to the fact that there are upwards of 3 calls per second, but I'd still expect the new map tiles to be rendered from the dynamic layer.

The only way I seem to be able to get an update to happen is to stop the auto-centering, and pan the map with the mouse only.  This same behavior is repeatable by only calling PanTo once.  I've tried invalidating the display and calling UpdateLayout immediately after the PanTo command, but this does not cause an update to occur.

Any suggestions?  The auto-tracking behavior and use of a LocalMapService is a current requirement dictated by the size of our dataset to display.

As an additional question...  I see that it is possible to set the background color for the map; however, when using a LocalMapService, it appears that it renders tiles assuming a white background.  This makes lines and text labels look very poor when using a black background for a night-mode.

Thanks for any help or suggestions on this.