您的位置:首页 > 其它

ArcGis for WPF(1)

2015-11-12 17:03 197 查看
这篇文章主要是讲窗体中怎么加载一张在线地图。

第一步:首先引用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>


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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: