ArcGIS API for Silverlight - Library Reference
MinimumResolution Property
See Also  Example Send comments on this topic
ESRI.ArcGIS.Client Namespace > Map Class : MinimumResolution Property

Gets or sets the minimum resolution (map units per pixel) one can zoom in.

Syntax

Visual Basic (Declaration) 
Public Property MinimumResolution As Double
C# 
public double MinimumResolution {get; set;}

Remarks

If the Map contains one or more tiled layers, the default MinimumResolution value will be the minimum resolution of the tiled layers. If the Map does not contain any tiled layers, the default MinimumResolution value will be constant System.Double.Epsilon.

System.Double.Epsilon represents the smallest positive Double value greater than zero. This field is constant. The System.Double.Epsilon = 4.94065645841247e-324

Setting the Map.MaximumResolution and the Map.MinimumResolution to the same value essentially locks the Map to a specific scale; meaning that you can only Pan around.

The ESRI.ArcGIS.Client.Toolkit.Navigation Control contains a slider to zoom in and out, interactive elements in a ring to rotate the map, and a set of buttons to zoom, pan, zoom to full extent, and reset rotation. The behavior of the Navigation control at runtime depends on the content and properties of the Map Control to which it is bound. The zoom slider will only be displayed if the Map.MinimumResolution and Map.MaximumResolution resolution on the Map control have been defined. If a ESRI.ArcGIS.Client.TiledMapServiceLayer is present in the Map's layer collection, in most cases the minimum and maximum resolution will be set for you. If a Map only contains ESRI.ArcGIS.Client.DynamicLayer , you must set the minimum and maximum resolution explicitly.

Example

How to use:

Click the various buttons to see the effect of setting the MinimumResolution Property on a Tiled Layer.

The XAML code in this example is used in conjunction with the code-behind (C# or VB.NET) to demonstrate the functionality.

The following screen shot corresponds to the code example in this page.

Demonstrating how to adjust the MinimumResolution Property to see all the tiles in a Tiled Layer.

XAMLCopy Code
<Grid x:Name="LayoutRoot">
  
  <!-- Add a Map control with an ArcGISTiledMapServiceLayer. -->
  <esri:Map Background="Blue" HorizontalAlignment="Left" Margin="12,88,0,0" 
            Name="Map1" VerticalAlignment="Top" Height="250" Width="250">
    <esri:ArcGISTiledMapServiceLayer ID="MyTiledLayer" 
                   Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
  </esri:Map>
  
  <!-- Add a Map control with an ArcGISTiledMapServiceLayer. -->
  <esri:Map Background="Blue" HorizontalAlignment="Left" Margin="282,88,0,0" 
            Name="Map2" VerticalAlignment="Top" Height="250" Width="250">
    <esri:ArcGISTiledMapServiceLayer ID="MyTiledLayer" 
                   Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
  </esri:Map>
            
  <!-- Add a button with instructions and a label. -->
  <Button Height="57" HorizontalAlignment="Left" Margin="12,12,0,0" 
          Name="Button_Step1" VerticalAlignment="Top" Width="250" Click="Button_Step1_Click">
    <Button.Content>
      <TextBlock Text="Step 1 - Click me to show the initial MinimumResolution and then zoom in to the minimum extent possible." 
                 TextWrapping="Wrap" />
    </Button.Content>
  </Button>
  <sdk:Label Height="20" HorizontalAlignment="Left" Margin="12,68,0,0" Name="Label1" VerticalAlignment="Top" 
             Width="120" Content="MinimumResolution:" />
  <sdk:Label Height="20" HorizontalAlignment="Left" Margin="126,68,0,0" Name="Label_Initial_MinimumResolution" 
             VerticalAlignment="Top" Width="136" />
  
  <!-- Add a button with instructions and a label. -->
  <Button Height="57" HorizontalAlignment="Left" Margin="282,12,0,0" 
          Name="Button_Step2" VerticalAlignment="Top" Width="250" Click="Button_Step2_Click">
    <Button.Content>
      <TextBlock Text="Step 2 - Click me to set a larger MinimumResolution and then zoom in to the minimum extent possible." 
                 TextWrapping="Wrap" />
    </Button.Content>
  </Button>
  <sdk:Label Height="20" HorizontalAlignment="Left" Margin="282,68,0,0" Name="Label2" VerticalAlignment="Top" 
             Width="120" Content="MinimumResolution:"/>
  <sdk:Label Height="20" HorizontalAlignment="Left" Margin="396,68,0,0" Name="Label_Set_Large_MinimumResolution" 
             VerticalAlignment="Top" Width="136"/>
  
</Grid>
C#Copy Code
private void Button_Step1_Click(object sender, System.Windows.RoutedEventArgs e)
{
  // Display the initial Map.MinimumResolution value.
  Label_Initial_MinimumResolution.Content = Map1.MinimumResolution;
}
            
private void Button_Step2_Click(object sender, System.Windows.RoutedEventArgs e)
{
  // Set the Map.MinimumResolution value to a higher number that the default.
  Map2.MinimumResolution = 0.00017;
  Label_Set_Large_MinimumResolution.Content = Map2.MinimumResolution;
}
VB.NETCopy Code
Private Sub Button_Step1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
  ' Display the initial Map.MinimumResolution value.
  Label_Initial_MinimumResolution.Content = Map1.MinimumResolution
End Sub
            
Private Sub Button_Step2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
  ' Set the Map.MinimumResolution value to a higher number that the default.
  Map2.MinimumResolution = 0.00017
  Label_Set_Large_MinimumResolution.Content = Map2.MinimumResolution
End Sub

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7

See Also

© ESRI, Inc. All Rights Reserved.