45
ArcGIS Runtime : Working with your portal Divesh Goyal Stuart McIlreavy Xueming Wu

ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Embed Size (px)

Citation preview

Page 1: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

ArcGIS Runtime :

Working with your portalDivesh Goyal

Stuart McIlreavy

Xueming Wu

Page 2: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Agenda

1. Overview

2. Accessing a portal

3. Consuming content from a portal

4. Adding content to a portal

Page 3: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,
Page 4: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,
Page 5: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Web Maps

Layers

AppsDesktop

Server GISWeb Scenes

Web GIS | Transformation of the ArcGIS Platform

Page 6: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Portals organize your maps

and data

enable discovery

Page 7: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Empower people

to use and create maps

Executive

Access

Knowledge

Workers

Public

Engagement

Work

Anywhere

Enterprise

Integration

portal

Page 8: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Desktop Web Device

Server Online Content

and Services

ArcGIS

Enterprise

Desktop Web Device

Server Online Content

and Services

ArcGIS

Online

Available in the Cloud . . . . . . and On-Premises

Page 9: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

SaaS or SoftwareIs it right for me?

• Typical reasons for choosing ArcGIS Enterprise

- Not ready/interested in the cloud

- Have strict SLAs and governance

- Have no Internet/www connection

- You are responsible for maintenance

• Typical reasons for choosing ArcGIS Online

- Fewer administrative tasks

- Elasticity

- Esri responsible for maintenance

ArcGIS

Enterprise

ArcGIS

Online

Page 10: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Maps / ScenesLayers

Real-Time

(IoT)

Imagery

GIS Maps

& Data

Enterprise

Data

Portal

• Abstracts and organizes all types of geospatial data

Page 11: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Portal Information Model

Organization

Item UserGroup

Application Web Map Web Layer

Service

Dataset

Web Scene …

Page 12: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Portal Information ModelAccessible through the REST API

Runtime

Javascript

Python

Page 13: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Divesh Goyal

Accessing a portal

Page 14: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Accessing a portalCode Workflow

1. Instantiate Portal object

- URL to portal

2. Load it

- Asynchronous Loadable pattern

3. Authenticate user (optional)

- Provide credentials before loading

- Or, let authentication manager challenge

Page 15: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Accessing a portal

• Container based

- HTTP Basic, Digest

- Integrated Windows Authentication

- Digital Certificates (PKI)

• ArcGIS Tokens

• Oauth

- ArcGIS Online Enterprise and Social Logins

- LDAP, Active Directory

- Google+, Facebook

Security mechanisms

MyA

pp

Page 16: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Accessing a portalUser Identity

• Details

- Name, email, bio, thumbnail …

• Role

- Admin, Publisher, User

• Privileges

- Fine grained, task oriented

• Content

- Items

- Groups

Page 17: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Divesh Goyal

Demo

Accessing a portal

Page 18: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Stuart McIlreavy

Accessing content in a portal

Page 19: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Accessing Portal Content

• Content and Types

• Accessing my content

• Browsing content in groups

• Searching for content and groups

• Helper Services

Page 20: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Content and Types

A PortalItem has:

• Content - binary or text data

• Metadata - name, description, tags, etc

• Thumbnail - optional image to represent the item

• Sharing properties - private, public, groups

Page 21: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Content and Types

• There are 95 PortalItemTypes

• Examples of 1st class citizens…

- WebMap

- MapService

- FeatureCollection

- FeatureService

• Examples of 2nd class citizens…

- KML

- PDF

- MicrosoftWord

Page 22: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Accessing My Content

• How do I access my content

• Items in my Root folder

// Gets the folders and items that are stored at the user’s root folder

PortalUserContent myContnet = await portal.User.GetContentAsync();

• Items in a Specific folder

// Gets portal items stored in a specified folder belonging to this user

IEnumerable<PortalItem> items = await portal.User.GetContentAsync("folderId");

Page 23: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Browse Group’s Content

• Getting groups’ Basemaps

// Returns the groups’ basemap gallery.

IEnumerable<Basemap> baseMaps = await portal.GetBasemapsAsync();

• Getting groups’ featured items

// Gets the featured items.

IEnumerable<PortalItem> featuredItems;

featuredItems = await portal.GetFeaturedItemsAsync();

Page 24: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Stuart McIlreavy

Demo

Portal Browser

https://github.com/Esri/arcgis-runtime-demos-dotnet

Page 25: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Search Content

• Search Groups

PortalQueryResultSet<PortalGroups> groups;

groups = await portal.FindGroupsAsync(PortalQueryParameters.CreateForGroups(“Owner",“Title”));

• Search content

PortalQueryResultSet<PortalItem> items;

items = await portal.FindItemsAsync(PortalQueryParameters.CreateForItemsOfType(

PortalItemType.MapService,

“SearchCriteria”));

Page 26: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Content Constructors

• ArcGISImageLayer constructor

//Initializes a new instance of the ArcGISMapImageLayer class with an Item

ArcGISMapImageLayer mapImageLayer = new ArcGISMapImageLayer(item);

• Map constructor

//Initializes a new instance of the Map class with an Item

Map map = new Map(item);

Page 27: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Stuart McIlreavy

Demo

Simple-Layer Picker

Page 28: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Helper Services

• Hosted services

- AnalysisService

- GeometryService

- GeocodeService

- TrafficService

- RouteService

- ElevationService

Page 29: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Xueming Wu

Adding content to a portal

Page 30: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Save a new map to a portal

• Get a Basemap

- portal default basemap:

- Portal.getPortalInfo().getDefaultBasemap()

- portal configured basemaps:

- Portal.getPortalInfo().getBasemapGalleryGroupQuery()

- Portal.findGroupsAsync()

- PortalQueryParameters.setQuery(PortalItem.Type.WEBMAP, group.getGroupId(), null);

- Portal.findItemAsync()

• Create a Map

- ArcGISMap map = new ArcGISMap(basemap);

• Operational layers

- Map.getOperationalLayers().add(layer);

Page 31: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Save a new map to a portal

• Map.saveAsAsync(Portal portal, PortalFolder portalFolder, String title,

Iterable<String> tags, String description, byte[] thumbnailData, boolean

forceSaveToSupportedVersion)

- an authenticated portal

- portal folder, when null it is the user’s root folder

- title, tags, description, and thumbnail

ListenableFuture<PortalItem> saveAsFuture = map.saveAsAsync(portal, null,

"Forest management for the Great " + "Gray Owl", tags,

"Their breeding habitat is the dense coniferous forests of the taiga..",

thumbnailDataArray, true);

Page 32: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Save a new map to a portal

The result is a PortalItem with a type of WebMap.

• Metadata -- ID, title, summary, description, thumbnail image, and tags

• Data -- the JSON, or a URL, or the binary data

• Sharing settings -- the access level and groups to whom the item is accessible

Page 33: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Xueming Wu

Demo

Save a new map to a portal

Page 34: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Share a portal item

PortalItem.getAccess():

• Private—The item is not be shared with anybody. Only the owner and administrator

can view the item.

• Public—The item can be viewed by everybody.

• Organization—The item can be viewed by every member of the organization that the

item is created in.

• Shared—The item can only be viewed by members of a group that the item is shared

with.

Page 35: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Share with everyone or a portal's organization

PortalItem.shareWithAsync(boolean everyone, boolean organization)

• Share with everyone

- portalItem.shareWithAsync(true, false)

• Share with user’s organization

- portalItem.shareWithAsync(false, true)

Page 36: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Share/Unshare with specific portal groups

• Share:

- PortalItem.shareWithGroupsAsync(shareWithGroups);

• Unshare:

- PortalItem.unshareWithGroupsAsync(unshareWithGroups);

Page 37: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Stop sharing

PortalItem.unshareAsync() :

• Makes the item private and accessible to only the item owner and the administrator

• Removes all groups from the item's groups list

Page 38: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Xueming Wu

Demo

Share/unshare a portal item

Page 39: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Create a new portal item -- workflow

• Connect to a portal

• Create a new portal item

• Specify portal item content – item type, title, tag and etc

• Provide portal item data

• Add the portal item to a portal user

PortalItem portalItem =

new PortalItem(portal, PortalItem.Type.PDF, title, description, snippet, tags);

portalUser.addPortalItemAsyncn(portalItem, params, folder);

Page 40: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

ArcGIS Runtime SDK v100.x License Model

Standard

• License Key

• All capabilities of Basic

• Access to additional data

• Raster layers

• Raster elevation sources

• Local Server

• Map services

• Feature services

• Edit file geodatabases

• GP services

• Subset of ArcGIS Desktop

basic tools

Advanced

• License Key

• All capabilities of Standard

• Local Server

• Feature services

• Edit enterprise geodatabases

• GP services

• Subset of ArcGIS Desktop

standard and advanced

tools

Basic

• Named User – Level 2

• License Key

• All capabilities of Lite

• Simple feature editing

• Add, update, delete content on

portals

• Use of ArcGIS Online analysis

services

Lite

• Named User – Level 1

• License Key

• View maps, scenes, layers, packages

from the ArcGIS Platform

• Routing

• Place finding

Analysis Extension

• License Key

• Local Server GP tools

• 3D Analyst

• Spatial Analyst

• Network Analyst

Page 41: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Related sessions

ArcGIS Runtime:

Building Cross-platform Apps

Tues 4:00 – 5:00 pm Mojave Learning

Center

ArcGIS Runtime SDKs:

Building a Routing Application

Tues 5:30 – 6:30 pm Mesquite C

ArcGIS Runtime:

Working with maps Online and offline

Weds 1:00 – 2:00 pm Mojave Learning

Center

ArcGIS Runtime:

Editing Your Data Online and Offline

Thurs 10:30 – 11:30 am Catalina - Madera

ArcGIS Runtime:

The Road Ahead

Thurs 2:30– 3:30 pm Primrose B

Page 42: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Related sessions

ArcGIS Runtime:

Analysis

Thurs 4:00 – 5:00 pm Smoketree A-E

ArcGIS Runtime:

Building 3D Applications

Fri 8:30 – 9:30 am Mojave Learning

Center

ArcGIS Runtime:

Everything (or Anything) You Wanted

to Know About the ArcGIS Runtime

SDKs but Were Afraid to Ask

Fri 10:00 – 11:00 am Catalina - Madera

Page 43: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Summary

1. Overview

2. Accessing a portal

3. Consuming content from a portal

4. Adding content to a portal

Page 44: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,
Page 45: ArcGIS Runtime: Working With Your Portal - Esriproceedings.esri.com/library/userconf/devsummit17/papers/dev_int...ArcGIS Runtime : Working with your portal Divesh Goyal ... PortalItem.Type.PDF,

Please Take Our Survey!

Download the Esri Events app

and go to DevSummit

Select the session you attended

Scroll down to the

“Feedback” section

Complete Answers,

add a Comment,

and Select “Submit”