2

I am fairly new to GIS, but I am working on an interactive legend and I need to just be able to add a map package to the xaml and it place the points on the map. The legend seems to be working. All of the label names are right, but the points do not show up. When I did this before with just each individual layer it worked. Any help would be appreciated. Here is my xaml.

<esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True" MouseClick="MyMap_MouseClick" MouseMove="MyMap_MouseMove" MouseRightButtonDown="MyMap_MouseRightButtonDown">
                <esri:ArcGISLocalDynamicMapServiceLayer ID="Calvert_City" Path="C:\Users\jessical\Documents\ArcGIS\CalvertCity_Test.mpk"/>
                <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
</esri:Map>

            <Border Background="{StaticResource PanelGradient}" BorderThickness="1" CornerRadius="5"
            HorizontalAlignment="Left"  VerticalAlignment="Top"
            Margin="20" Padding="5" BorderBrush="Black" >
                <esri:Legend Map="{Binding ElementName=MyMap}"

                         LayerItemsMode="Tree"
                         ShowOnlyVisibleLayers="False"
                         Refreshed="Legend_Refreshed">
                    <esri:Legend.MapLayerTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox Content="{Binding Label}"
                                    IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                                    IsEnabled="{Binding IsInScaleRange}" >
                                </CheckBox>
                                <Slider Maximum="1" Value="{Binding Layer.Opacity, Mode=TwoWay}" Width="50" />
                            </StackPanel>
                        </DataTemplate>
                    </esri:Legend.MapLayerTemplate>
                    <esri:Legend.LayerTemplate>
                        <DataTemplate>
                            <CheckBox Content="{Binding Label}"
                            IsChecked="{Binding IsEnabled, Mode=TwoWay}"
                            IsEnabled="{Binding IsInScaleRange}" >
                            </CheckBox>
                        </DataTemplate>
                    </esri:Legend.LayerTemplate>
                </esri:Legend>
            </Border>

If you need anymore information, please let me know. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.