ArcGIS Pro SDK 共享
共享
ArcGIS 项目管理器:获取当前活动门户
1 | var active_portal = ArcGISPortalManager.Current.GetActivePortal(); |
ArcGIS 项目管理器:获取所有门户的列表
1 | var portals = ArcGISPortalManager.Current.GetPortals(); |
ArcGIS 项目管理器:将门户添加到门户列表
1 | var portalUri = new Uri("http://myportal.esri.com/portal/", UriKind.Absolute); |
ArcGIS 项目管理器:获取门户并登录,将其设置为活动状态
1 | //Find the portal to sign in with using its Uri... |
ArcGIS 程序管理器:侦听门户事件
1 | ArcGIS.Desktop.Core.Events.ActivePortalChangedEvent.Subscribe((args) => |
门户:从活动门户获取当前登录用户
1 | var portal = ArcGISPortalManager.Current.GetActivePortal(); |
门户:获取当前用户的“联机”门户视图
1 | //If no-one is signed in, this will be the default view for |
门户:获取当前用户的组织 ID
1 | var portal = ArcGISPortalManager.Current.GetPortal(new Uri(portalUri)); |
门户:从活动门户获取活动用户的用户内容
1 | var portal = ArcGISPortalManager.Current.GetActivePortal(); |
门户:下载用户内容中的任何包项
1 | //user content previously from... |
门户:获取指定用户的组
1 | //elsewhere... |
门户:执行门户搜索
1 | var portal = ArcGISPortalManager.Current.GetPortal(portalUri); |
EsriHttpClient:获取当前登录用户
1 | //Reference Newtonsoft - Json.Net |
获取当前登录用户的组
1 | //Assume that you have executed the "Get the Current signed on User" snippet and have 'userName' |
EsriHttpClient:查询活动门户上的 Esri 内容
1 | //http://www.arcgis.com/sharing/search?q=owner:esri&f=json |
EsriHttpClient:获取当前用户的 web 地图并将其添加到专业版
1 | UriBuilder searchURL = new UriBuilder(ArcGISPortalManager.Current.GetActivePortal().PortalUri) |
EsriHttpClient:获取服务图层并将其添加到专业版
1 | UriBuilder searchURL = new UriBuilder(ArcGISPortalManager.Current.GetActivePortal().PortalUri) |
;
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 WineMonk!
评论