ArcGis for WPF(1)

这篇文章主要是讲窗体中怎么加载一张在线地图。

第一步:首先引用ESRI.ArcGIS.Client.dll类库。

第二步:在XAML中添加如下代码:

<Window x:Class="ArcGis_1_.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"
        Title="MainWindow">
    <Grid x:Name="LayoutRoot" >
        <esri:Map x:Name="MyMap" WrapAround="True">
            <esri:ArcGISTiledMapServiceLayer ID="MyLayer" 
                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
        </esri:Map>
    </Grid>
</Window>

第三步:运行程序,效果如下

 

posted @ 2015-11-12 17:03  及乌及国  阅读(2319)  评论(0编辑  收藏  举报