arcgis runtime100(五、六课时)

WPF Hello World实例

源代码

MVC

mvc

MVVM

mvvm

盒子模型

link

ArcGis_HelloWorld

前端

与后端对应,并绑定后端类的Map

<esri:MapView Map="{Binding Map, Source={StaticResource MapViewModel}}" />

后端

public class MapViewModel : INotifyPropertyChanged
    {
        public MapViewModel()
        {

        }

        //Map赋值
        private Map _map = new Map(Basemap.CreateStreets());

        /// <summary>
        /// Map属性
        /// </summary>
        public Map Map
        {
            get { return _map; }
            set { _map = value; OnPropertyChanged(); }
        }

        
        protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            var propertyChangedHandler = PropertyChanged;
            if (propertyChangedHandler != null)
                propertyChangedHandler(this, new PropertyChangedEventArgs(propertyName));
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }

没有所需新建项目的问题

HelloWorld引导文件,如果新建项目里没有Arcgis的WPF项目选项,可以打开下面的项目然后再新建项目。

Gis_HelloWorld

加群

479539370

视频资料

posted @ 2018-03-14 08:50  小狮子头  阅读(270)  评论(0编辑  收藏  举报