Select to view content in your preferred language

Pan with arrow keys results in blank dynamic layer when map's PanDuration is zero

799
2
05-22-2012 11:52 AM
MarkusHjärne
Deactivated User
Hi,

I have a problem that when setting the map's PanDuration to 0, or rather 0:0:0 since it's of type TimeSpan, dynamic layer's fail to update when panning with the keyboard arrow keys. Panning by dragging the map with the mouse cursor still works.

The problem can be reproduced by creating a new Silverlight 4 application with SL API v2.4, replacing the default tiled layer with a dynamic layer and setting the map's PanDuration to 0:0:0.

[HTML]<UserControl x:Class="TestPanDuration0.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">

    <Grid x:Name="LayoutRoot" Background="White">
  <esri:Map Background="White" PanDuration="0:0:0" HorizontalAlignment="Left" Margin="24,22,0,0" Name="map1" VerticalAlignment="Top" WrapAround="True" Height="243" Width="346">
   <esri:Map.Layers>
    <esri:LayerCollection>
     <esri:ArcGISDynamicMapServiceLayer Url="http://serverapps10.esri.com/ArcGIS/rest/services/California/MapServer" />
    </esri:LayerCollection>
   </esri:Map.Layers>
  </esri:Map>
</Grid>
</UserControl>
[/HTML]

Start the application, zoom in a bit using the scroll wheel and then use the arrow keys to pan around. Notice that the dynamic layer doesn't get updated as it should.

Can anyone at Esri confirm whether this is a bug?


Best regards

Markus Hjärne
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
I could not reproduce using your code snippet. What I suspect is happening is that since you set Map control Height, Width and Margin, the view for map is too small and the movement using arrow key is bigger, which appears the map is out of view. Try to zoom out or remove Height, Width and Margin. Or if you want to keep your code, you can run Fiddler with your app, notice that the export image still show the layer. This means the image is retrieved but the map had restricted view that your map does not seem visible.
0 Kudos
MarkusHjärne
Deactivated User
The movement using the arrow keys seems to always be half the map's width or height, so after pressing the arrow key once, half the map's content is still visible.

But I removed the map's Height, Width and Margin and some other attributes, but I still can reproduce the problem with this XAML:

[HTML]<UserControl x:Class="TestPanDuration0.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
    Height="400" Width="600">

    <Grid x:Name="LayoutRoot" Background="White">
  <esri:Map Background="White" PanDuration="0:0:0"  Name="map1" WrapAround="True" >
   <esri:Map.Layers>
    <esri:LayerCollection>
     <esri:ArcGISDynamicMapServiceLayer Url="http://serverapps10.esri.com/ArcGIS/rest/services/California/MapServer" />
    </esri:LayerCollection>
   </esri:Map.Layers>
  </esri:Map>
</Grid>
</UserControl>[/HTML]

When I first zoom in, I can see the image export in Fiddler as expected. But then nothing happens in Fiddler when I pan the map using the arrow keys.

I'm running Silverlight 4.1.10329.0 in Internet Explorer 8.0.7601.17514, if that can be of importance.

/Markus
0 Kudos