
正文
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>
第三步:运行程序,效果如下





