您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 交通运输 > ArcGIS Server经典开发模式―for .net Framework
ArcGISServer经典开发模式—for.netFramework马克玲ADFBasedWebAppWorkDirectlyWithSOAPWorkDirectlyWithArcObjectsJavaScript/Flex/Silverlight开发模式概览Focus使用ADF构建.NETWeb应用•我们将覆盖的内容–什么是webADF–WebADF开发框架–即拿即用的WebMappingApplication–WebADF控件–WebADFJavaScriptLibrary–WebADFDataSources–WebADFGraphics–WebADFTaskFramework•我们将在明天下午集中回答大家的问题WebADF是什么•创建WebGIS应用的开发工具•Webcontrols,tasks,和Webapplicationtemplate•Developerlibraries•移植工具•支持与VisualStudio整合•文档•示例——WebApplicationDeveloperFramework5WebADF开发框架6•ArcGISServerManager–设置必要的参数–Map,tableofcontents–Theme,hyperlinks–可以在VisualStudio中修改•VisualStudiotemplate–与ArcGISServerManager创建的应用相同•VisualStudioWebsite–创建完全自定义的Web站点创建WebADF应用的选择7WebMappingApplication模板•Webpages•WebADFcontrols•Customtoolsandcontrols•Themes•Resources•Links•Helpsystem8使用模板的优势•高效-节省开发时间•包含即拿即用的基础地图显示元素–Mainmap–Tableofcontents(legend)–ToolbarwithGIScommands–Menubar•可客户化通过Manager生成WebMappingApplicationWebADFcontrols•自定义的ASP.NETservercontrols•脚本化的–WebADFJavaScriptLibraryprovidesaccesstothesecontrols•AJAX-enabled•与不同的datasources交互•提供可扩展的framework•在HTTPrequests之间管理状态WebADFcontrolsWebADFcontrolCoreWebcontrolsTaskFrameworkWebcontrolsTaskWebcontrol•增强WebADFWebcontrols–Client-sidefunctionality•使用MicrosoftAJAXJavaScript基础库创建的–Supportforwell-knownMicrosoftAJAXpatterns•事件驱动–RespondtomapeventsusingscriptableMapcontrol•面向对象–ObjectmodelandSDK•WebADFJavaScriptLibrary=ArcGISJavaScriptAPI使用JavaScript可以•在map上添加graphics•导航地图•创建MapTipsWebADFJavaScriptlibrary•管理mapresourceitems•Resource定义–Typedeterminesdatasource•名字显示在toc中•显示设置–Dynamictiling–Transparency–BackgroundcolorMapResourceManagercontrolMapcontrol•与一个MapResourceManager关联•与多个mapresources协同工作–Fetchespre-generatedimagetiles–Createsdynamicmapimages–Resource-centrictilingscheme•支持imageblending–WebtierorbrowserMapPrimaryMapResource属性•PrimaryMapResource决定了:–Spatialreference–初始范围–ScaleMapresource(s)PrimaryMapResourcedefaultsetting1dynamicOR1cachedresourceTheresource2dynamicresourcesLastresourceinresourceitemscollection2cachedresourcesOR1dynamicAND1cachedresourceFirstcachedresourceinresourceitemscollection–Zoomlevels–Rotation(ifpresent)16WebADFDataSources•CommonDataSourceAPI–用于支持多种数据源类型的通用框架–管理Web控件和数据源之间的交互–被每一种支持的数据源实现–可扩展的框架•DatasourcespecificAPIs–特定于某一种数据源类型(e.g.ArcGISServerSOAP)–被用于CommonAPI实现WebADFDatasourcesassembly4-17ESRI.ArcGIS.ADF.Web.DataSourcesESRI.ArcGIS.ADF.Web.DataSources.ArcGISServerESRI.ArcGIS.ADF.Web.DataSources.ArcWebServiceESRI.ArcGIS.ADF.Web.DataSources.GraphicsESRI.ArcGIS.ADF.Web.DataSources.IMSESRI.ArcGIS.ADF.Web.DataSources.OGCWMSServiceCommondatasourceAPIESRI.ArcGIS.ADF.ArcGISServerESRI.ArcGIS.ADF.ArcWebServiceESRI.ArcGIS.ADF.IMSDatasourcespecificAPITheCommonDatasourceAPIIMapTocFunctionalityIQueryFunctionalityResourcemanagersWebADFcontrolsIGISDataSourceIGISResourceIGISFunctionalityIMapResourceIGeoprocessingResourceIGeocodeResourceIMapFunctionalityITileFunctionalityIScalebarFunctionalityIGeocodeFunctionalityIGeoprocessingFunctionalityCommondatasourceAPIDatasourceimplementationsArcGISServerArcIMS约定了数据源访问的方式描述了数据中的内容描述了这些数据可以做哪些事情数据源的类型决定了可用的资源类型,数据源的能力(capabilities)决定了资源可用的功能类型4-19Datasources&Resources&functionalities•Datasources至少支持一种resource•Resources至少支持一种functionality•Functionalities是能力IMapFunctionalityIQueryFunctionalityIGISFunctionalityIGISDataSourceIGISResourceIGISFunctionalityIGISResourceIGISFunctionalityIGISFunctionalityIMapTocFunctionalityIGeocodeFunctionality4-20在WebADF中获得资源•从resourcemanager–Resourcenotnecessarilyinitialized–Checkinitializationstatus•从functionality–Resourcealreadyinitialized//ConditionallyinitializeMapResourceManagerif(!MapResourceManager1.Initialized)MapResourceManager1.Initialize();//OrinitializeresourcefromresourceitemMapResourceItemmapResourceItem=MapResourceManager1.ResourceItems.Find(Redlands);IGISResourcegisResource=mapResourceItem.Resource;if(!gisResource.Initialized)mapResourceItem.InitializeResource();Resourcemanagers•GeocodeResourceManager•GeoprocessingResourceManager•MapResourceManager4-21在WebADF中获得Functionalities从Webcontrol获得functionalities//ReturnthefunctionalityassociatedwiththeMap//PasstheresourceitemnameIMapFunctionalitymf=Map1.GetFunctionality(MapResourceItem0);string[]lyrIDs=null;string[]lyrNames=null;mf.GetLayers(outlyrIDs,outlyrNames);mf.SetLayerVisibility(lyrIDs[0],false);ESRI.ArcGIS.ADF.Web.DataSources4-22在WebADF中获得Functionalities从resource中获得functionalities•决定是否resource支持相应的functionality•创建相应的functionality//Determinewhethertheresourcesupportsthefunctionality//EveryresourcetypehasSupportsFunctionalityboolsupported=gisResource.SupportsFunctionality(typeof(IQueryFunctionality));If(supported){//Ifqueryfunctionalityissupported,createitIQueryFunctionalityqFunction=(IQueryFunctionality)gisResource.CreateFunctionality(typeof(IQueryFunctionality),null);}ESRI.ArcGIS.ADF.Web.DataSources4-23MapFunctionality•基本的地图能力PropertyorMethodDescriptionSpatialReferenceAccesstospatialreferenceofmapresourceDisplaySettingsChangedisplayofmapimageGetLayers()ReturnsarrayoflayernamesandidsGet/SetLayerVisibility()ManagelayervisibilityinmapGetScale()Ret
本文标题:ArcGIS Server经典开发模式―for .net Framework
链接地址:https://www.777doc.com/doc-4548219 .html