ArcGIS Runtime WPF(.net C#)开发简明教程 1 -初识 & 第一个项目
ArcGIS Runtime不同于之前的AE、AO开发,大部分时候不用安装任何程序,nuget包可以搞定
在未来可能数年里,会更新一系列ArcGIS Runtime WPF(.net C#)开发简明教程,这是第一篇
首先创建一个wpf 项目,.net framework或core项目都是可以的
然后管理nuget包

其中
Esri.ArcGISRuntime.runtimes.win是一切的基础,不需要手动安装,装其他的时候自动就安装了
Esri.ArcGISRuntime 是 Esri.ArcGISRuntime.WPF的基础,也不需要手动安装
Esri.ArcGISRuntime.WPF 一般安装这个就好了
Esri.ArcGISRuntime.LocalServices 需要本地地图包处理时安装
Esri.ArcGISRuntime.Toolkit 多了些小工具,有点用但非必要
xaml加入代码(样式自定义,这里不涉及)
命名空间
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
一般拖进来个MapView就自动引用了
<Grid x:Name="MapView" >
<esri:MapView x:Name="MyMapView" >
<esri:Map>
<esri:Map.Basemap>
<esri:Basemap Name="Basemap">
<esri:ArcGISTiledLayer Name="WorldTopographic" Source="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
</esri:Basemap>
</esri:Map.Basemap>
</esri:Map>
</esri:MapView>
</Grid>
后台初始化代码
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize();
运行就看得到地图了


浙公网安备 33010602011771号