Select to view content in your preferred language

Adding Toolkit Data Sources to My Project

703
1
03-31-2014 08:08 AM
TahaSözgen
Deactivated User
hi There;
I would like to implement the code below, and I've received the error: The name "esri:OpenStreetMapLayer" does not exist in the namespace "http://schemas.esri.com/arcgis/client/2009"

The source file is in the link: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#OpenStreetMapSimple
the source code is as follows:

<UserControl x:Class="ArcGISMapping.toolkitdatasources.OpenStreetmap"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
             xmlns:openstreet="ESRI.ArcGIS.Client.Toolkit.DataSources"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot" Background="White">

        <esri:Map x:Name="MyMap"  WrapAround="True">
            <!--Erroneous line is in the above. -->
            <esri:OpenStreetMapLayer ID="OSMLayer" Style="Mapnik" />
        </esri:Map>

        <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" >
            <Rectangle Fill="#77919191" Stroke="Gray"  RadiusX="10" RadiusY="10" Margin="0" >
                <Rectangle.Effect>
                    <DropShadowEffect/>
                </Rectangle.Effect>
            </Rectangle>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5" >
                <RadioButton x:Name="MapnikRadioButton" 
                         Tag="Mapnik" IsChecked="true" Margin="5,0,0,0" Foreground="White"
                         GroupName="Layers" Content="Mapnik" Click="RadioButton_Click"/>
                <RadioButton x:Name="OsmarenderRadioButton" 
                         Tag="Osmarender" Margin="5,0,0,0" Foreground="White" 
                         GroupName="Layers" Content="Osmarender" Click="RadioButton_Click"/>
                <RadioButton x:Name="CycleMapRadioButton" 
                         Tag="CycleMap" Margin="5,0,0,0" Foreground="White" 
                         GroupName="Layers" Content="CycleMap" Click="RadioButton_Click"/>
                <RadioButton x:Name="NoNameRadioButton" 
                         Tag="NoName" Margin="5,0,0,0" Foreground="White" 
                         GroupName="Layers" Content="NoName" Click="RadioButton_Click"/>
            </StackPanel>
        </Grid>

        <esri:Attribution Layers="{Binding ElementName=MyMap, Path=Layers}" Margin="10" VerticalAlignment="Bottom" />

    </Grid>
</UserControl>



How can I overcome that problem? Thanks in advance.
0 Kudos
1 Reply
AhmedEl-Sisi
Deactivated User
0 Kudos