arcgis.apps module

build_collector_url

arcgis.apps.build_collector_url(webmap=None, center=None, feature_layer=None, fields=None, search=None, portal=None, action=None, geometry=None, callback=None, callback_prompt=None, feature_id=None)

Creates a url that can be used to open ArcGIS Collector

Argument

Description

webmap

Optional String, WebMap, Item. The item id, webmap, or item representing the map to open in Collector.

center

Optional String, list, tuple. The “lat,long” in WGS84 of where to center the map

feature_layer

Optional String or FeatureLayer. The feature layer url as string or the feature layer representing the layer to open for collection.

fields

Optional Dict. The feature attributes dictionary {“field”:”value”}

search

Optional String An address, place, coordinate, or feature to search for Requires webmap and action=search to be set. Value must be URL encoded

portal

Optional String, GIS. The URL of the portal the mobile worker must be connected to.

action

Optional String What the app should do, if anything, once open and the user is signed in. The following values are supported: addFeature, center, open, search, updateFeature.

geometry

Optional String. Defines the location for the newly collectoed or edited feature Requires webmap, action=addFeature, and feature_layer. Value is a coordinate containing x, y (z if available)

callback

Optional String. The URL to call when capturing the asset or observation is complete. Requires webmap, action=addFeature, and feature_layer to be set. Optionally, before calling the URL provide a prompt for the user, specified with the callback_prompt parameter.

callback_prompt

Optional String. Prompt the mobile worker before executing the callback, and display this value in the prompt as where the mobile worker will be taken. Requires webmap, action=addFeature, feature_layer, and callback to be specified. Value must be URL encoded

Returns

String

build_explorer_url

arcgis.apps.build_explorer_url(webmap=None, search=None, bookmark=None, center=None, scale=None, wkid=None, rotation=None, markup=None, url_type='Web')

Creates a url that can be used to open ArcGIS Explorer

Argument

Description

webmap

Optional String, WebMap, Item. The item id, webmap, or item representing the map to open in Explorer. Item can be of type Web Map or Mobile Map Package.

search

Optional String. The location to search for.

bookmark

Optional String. The name of the bookmark in the map to open.

center

Optional String, list, tuple. The “lat,long” in WGS84 of where to center the map

scale

Optional Int. The scale at which to open the map.

rotation

Optional Int. The rotation, in degrees, at which to open the map.

markup

Optional Boolean. Determines if the app should open in markup mode.

url_type

Optional String. The type of url to be returned (e.g. ‘Web’ or ‘App’)

Additional info can be found here: https://github.com/Esri/explorer-integration

Returns

String

build_field_maps_url

arcgis.apps.build_field_maps_url(portal=None, action=None, webmap=None, scale=None, bookmark=None, wkid=None, center=None, search=None, feature_layer=None, fields=None, geometry=None, use_antenna_height=None, use_loc_profile=None, feature_id=None, callback=None, callback_prompt=None, anonymous=None)

Creates a url that can be used to open ArcGIS Field Maps

Argument

Description

portal

Optional String, GIS. The URL of the portal the mobile worker must be connected to.

action

Optional String What the app should do, if anything, once open and the user is signed in. This correlates to the URL param “referenceContext” The following values are supported: addFeature, center, open, search, updateFeature.

webmap

Optional String, WebMap, Item. The item id, webmap, or item representing the map to open in Field Maps. Item can be of type Web Map or Mobile Map Package.

scale

Optional Int. The scale at which to open the map. Requires center.

bookmark

Optional String. The name of the bookmark in the map to open.

wkid

Optional String. The WKID of the spatial reference. Defaults to 4326 (WGS84) if not specified

center

Optional String, list, tuple. Requires itemID and scale. The center can be provided in the following formats: - Comma-separated latitude/longitude (y/x) pair in WGS84 (WKID: 4326). - Address to be reverse geocoded by the organization’s default geocoder (MMPKs with locators will not utilize geocoder). - Feature search result. Field Maps will automatically center on the top search result.

search

Optional String. The location to search for.

feature_layer

Optional String or FeatureLayer. The feature layer url as string or the feature layer representing the layer to open for collection.

fields

Optional Dict. The feature attributes dictionary {“field”:”value”}

geometry

Optional String or Dict. Defines the location for the newly collectoed or edited feature Requires webmap, action=addFeature, and feature_layer. Value is a coordinate containing x, y (z if available) or JSON representation of a geometry (point line or polygon) For example “34.058030,-117.195940,1200” or {“rings”:[[[-117.1961714,34.0547155],[-117.1961714,34.0587155],[-117.2001714,34.0587155], [-117.2001714,34.0547155]]], “spatialReference”:{“wkid”:4326}}

use_antenna_height

Optional bool. If the antenna height of the current receiver should be subtracted from the z-value of each vertex of the location. If not provided, default to False

use_loc_profile

Optional bool. If the current location profile should be used to transform the location. If not provided, default to False

feature_id

Optional String. Uniquely identifies the feature within the layer to be updated. Must be a GlobalID field.

callback

Optional String. The URL to call when capturing the asset or observation is complete. Requires webmap, action=addFeature or updateFeature, and feature_layer to be set. Optionally, before calling the URL provide a prompt for the user, specified with the callback_prompt parameter.

callback_prompt

Optional String. Prompt the mobile worker before executing the callback, and display this value in the prompt as where the mobile worker will be taken. Requires webmap, action=addFeature or updateFeature, feature_layer, and callback to be specified.

anonymous

Optional bool. Used when calling a map or mmpk that is shared publicly and will not require a sign-in to access. Accepts values of true or false.

Returns

String

build_navigator_url

arcgis.apps.build_navigator_url(start=None, stops=None, optimize=None, navigate=None, travel_mode=None, callback=None, callback_prompt=None, url_type='Web', webmap=None, route_item=None)

Creates a url that can be used to open ArcGIS Navigator

Argument

Description

start

Optional String or Tuple. The starting location. Can be a single string such as ‘45,-77’ or a tuple containing the location and the name (‘45,-77’,’Home’)

stops

Optional List. The list of locations. A location can be either a single string or a tuple containing the location and the name (‘45,-77’, ‘Home’).

optimize

Optional Boolean. Determines if the route should be optimized.

navigate

Optional Boolean. Determines if navigation should begin immediately.

travel_mode

Optional String. The travel mode to use (e.g. ‘Walking Time’)

callback

Optional String. The url to open when the route completes.

callback_prompt

Optional String. The text to show when the route finishes and the callback is about to be invoked.

url_type

Optional String. The type of url to be returned (e.g. ‘Web’ or ‘App’)

webmap

Optional String, Item. The item id or item representing the map to open in Navigator. Item can be of type Mobile Map Package.

route_item

Optional String, Item. The item id or item representing the route layer to open.

Additional info can be found here: https://github.com/Esri/navigator-integration

Returns

String

build_survey123_url

arcgis.apps.build_survey123_url(survey=None, center=None, fields=None)

Creates a url that can be used to open ArcGIS Survey123

Argument

Description

survey

Optional String or Item. The item id or item representing the survey to open.

center

Optional String. The “lat,long” in WGS84 of where to center the map

fields

Optional Dict. The feature attributes dictionary {“field”:”value”}

Additional info can be found here: https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm

Returns

String

build_tracker_url

arcgis.apps.build_tracker_url(portal_url=None, url_type='Web')

Creates a url that can be used to open ArcGIS Tracker

Argument

Description

portal_url

Optional String The portal that should be used when tracker is launched via the url scheme.

url_type

Optional String. The type of url to be returned (e.g. ‘Web’ or ‘App’)

Returns

String

build_workforce_url

arcgis.apps.build_workforce_url(portal_url=None, url_type='Web', webmap=None, assignment=None, assignment_status=None)

Creates a url that can be used to open ArcGIS Workforce

Argument

Description

portal_url

Optional String The portal that should be used when Workforce is launched via the url scheme.

url_type

Optional String. The type of url to be returned (e.g. ‘Web’ or ‘App’)

webmap

Optional String, WebMap, Item. The item id, webmap, or item representing the map to open in Workforce. Item can be of type Web Map. This can be referenced at the project level using project.worker_webmap

assignment

Optional String, Assignment. The assignment or assignment global id that should be opened in Workforce. Note that webmap must be provided for this parameter to be added to the URL.

assignment_status

Optional Integer The status given to an assignment opened in Workforce. Statuses 1-5 are supported (Assigned, In Progress, Completed, Declined, Paused). Note that webmap and assignment must be provided for this parameter to be added to the URL.

Returns

String

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.