Select to view content in your preferred language

add kml layer without service

2263
4
10-12-2011 07:08 AM
PaulRostolsky
Deactivated User
I am looking for example of kml layer in silverlight app.

My test app looks for assembly reference for esri:kmllayer

            <esri:KmlLayer ID="KmlLayer" Url="http://kml-samples.googlecode.com/svn/trunk/KML_Samples.kml"
                           ProxyUrl="http://serverapps.esri.com/SilverlightDemos/ProxyPage/proxy.ashx" />

I have references
using ESRI.ArcGIS.Client;
using ESRI.ArcGIS.Client.Toolkit;
using ESRI.ArcGIS.Client.Toolkit.DataSources;
using ESRI.ArcGIS.Client.Behaviors;
using ESRI.ArcGIS.Client.Bing;
0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor
0 Kudos
PaulRostolsky
Deactivated User
I have seen the sample - that is where I got the code from.  The question still stands: Error 1 The type 'esri:KmlLayer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\sconard\Documents\Visual Studio 2010\Projects\gisTesting2\gisTesting2\MainPage.xaml 11 14 gisTesting2


I have reference to ESRI.ArcGIS.Client.Toolkit.DataSources and do not understand what reference I am missing. (sorry - should have been clearer)
0 Kudos
ChristopherHill
Deactivated User
Did you add the ESRI.ArcGIS.Client.Toolkit.Datasources.dll to your project references?
0 Kudos
ChristopherHill
Deactivated User
<UserControl x:Class="ArcGISSilverlightSDK.KmlLayerSimple"
    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" >

        <esri:Map x:Name="MyMap" WrapAround="True">
            <esri:Map.Extent>
                <esri:Envelope XMin="-122.090" YMin="37.419" XMax="-122.079" YMax="37.424">
                    <esri:Envelope.SpatialReference>
                        <esri:SpatialReference WKID="4326"/>
                    </esri:Envelope.SpatialReference>
                </esri:Envelope>
            </esri:Map.Extent>

            <esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer" />
            <esri:KmlLayer ID="KmlLayer" Url="http://kml-samples.googlecode.com/svn/trunk/KML_Samples.kml"
                           ProxyUrl="http://serverapps.esri.com/SilverlightDemos/ProxyPage/proxy.ashx" />            
        </esri:Map>

    </Grid>
</UserControl>
0 Kudos