AnsweredAssumed Answered

Navigation Control doesn't show slider

Question asked by versaterm001 on Feb 7, 2013
Latest reply on May 26, 2014 by xtian79
Hi

I'm having problems with the navigation control, when using a local map package.  The map loads correctly, but the navigation control doesn't display a zoom slider (see attached [ATTACH=CONFIG]21551[/ATTACH]).

I've tried this in code behind (preferred solution) and xaml.

XAML:
<Window x:Class="navtest2.MainWindow"
    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
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignWidth="337" SizeToContent="WidthAndHeight"
    d:DesignHeight="287" mc:Ignorable="d"
    Loaded="Window_Loaded">
<Grid x:Name="LayoutRoot" >
  <Grid.Resources>
   <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
  </Grid.Resources>
  <esri:Map x:Name="MyMap" WrapAround="True"
       Extent="-15000000,2000000,-7000000,8000000"
       Background="#FFE3E3E3" MinimumResolution="2445.98490512499">
   <esri:ArcGISLocalDynamicMapServiceLayer Path="./USCitiesStates.mpk"/>
  </esri:Map>
  <esri:Navigation Margin="5" HorizontalAlignment="Left"
           VerticalAlignment="Bottom"
                     Map="{Binding ElementName=MyMap}"  />
</Grid>
</Window>

C# Behind Code:
   LocalMapService localMapService = new LocalMapService()
    {
    Path = "./USCitiesStates.mpk",
    MaxRecords = 100000
    };
   localMapService.StartAsync(localService =>
    {
    if (localService.Error != null)
     return;
    ArcGISLocalDynamicMapServiceLayer layer = new ArcGISLocalDynamicMapServiceLayer(localMapService);
    MyMap.Layers.Add(layer);
    });

Any help would be appreciated.

Thanks

Andrew Purkis

Attachments

Outcomes