Map
- class arcgis.map.Map(**kwargs: Any)
- property basemap: BasemapManager
Returns a BasemapManager object that can be used to handle basemap related properties and methods on the Map.
- property bookmarks: Bookmarks
Get an instance of the Bookmarks that can be seen in your Map. This class can be used to add and remove bookmarks as well as edit them. You can also enable and disable the bookmark widget on the rendered map in Jupyter Lab.
- center
Get/Set the center of the rendered Map.
Parameter
Description
center
- A [lat, long] list that represents the JSON of the map
widget’s center.
- Returns:
A list that represents the latitude and longitude of the map’s center.
# Usage example: Sets the center of the map to the given lat/long map.center = [34.05, -118.24]
- property content: MapContent
Returns a MapContent object that can be used to access the layers and tables in the map. This is useful for adding, updating, getting, and removing content from the Map.
- export_to_html(path_to_file: str, title: str | None = None) bool
The
export_to_html
method takes the current state of the rendered map and exports it to a standalone HTML file that can be viewed in any web browser.By default, only publicly viewable layers will be visible in any exported html map. Specify
credentials_prompt=True
to have a user be prompted for their credentials when opening the HTML page to view private content.Warning
Follow best security practices when sharing any HTML page that prompts a user for a password.
Note
You cannot successfully authenticate if you open the HTML page in a browser locally like file://path/to/file.html. The credentials prompt will only properly function if served over a HTTP/HTTPS server.
Parameter
Description
path_to_file
Required string. The path to save the HTML file on disk.
title
Optional string. The HTML title tag used for the HTML file.
- extent
Get/Set the map’s extent.
Note
You must include the spatial reference in the extent dictionary.
Parameter
Description
value
Required dict. map.extent = {
‘spatialReference’: {‘latestWkid’: 3857, ‘wkid’: 102100}, ‘xmax’: 5395723.072123609, ‘xmin’: -137094.78326911852, ‘ymax’: 10970767.576996306, ‘ymin’: 7336034.007980572
}
- Returns:
A dictionary representing the extent
# Usage example: Sets the extent of the map to the given extent map.extent = { "xmin": -124.35, "ymin": 32.54, "xmax": -114.31, "ymax": 41.95 "spatialReference": { "wkid":102100 } }
- js_requirement()
Return the JS API version needed to work with the current version of the mapping module in a disconnected environment.
- Returns:
A string representing the JS API version.
- property layer_list: LayerList
Get an instance of the LayerList class. You can use this class to enable or disable the layer list widget. Best used inside of Jupyter Lab.
- property legend: Legend
Get an instance of the Legend class. You can use this class to enable or disable the legend widget. Best used inside of Jupyter Lab.
- property offline_areas: OfflineMapAreaManager | None
The
offline_areas
property is the resource manager for offline areas cached for theWebMap
object.- Returns:
The
OfflineMapAreaManager
for theWebMap
object.
- print(file_format: str, extent: dict[str, Any], dpi: int = 92, output_dimensions: tuple[float] = (500, 500), scale: float | None = None, rotation: float | None = None, spatial_reference: dict[str, Any] | None = None, layout_template: str = 'MAP_ONLY', time_extent: tuple[int] | list[int] | None = None, layout_options: dict[str, Any] | None = None) str
The
print
method prints theMap
object to a printable file such as a PDF, PNG32, JPG.Note
The render and print operations happen server side (ArcGIS Online or Enterprise) and not on the client.
The
print
method takes the state of theMap
, renders and returns either a page layout or a map without page surrounds of the specified extent in raster or vector format.Parameter
Description
file_format
Required String. Specifies the output file format. Valid types:
PNG8
|PNG32
|JPG
|GIF
|PDF
|EPS
|SVG
|SVGZ
.extent
Required Dictionary. Specify the extent to be printed.
# Example Usage: >>> extent = {'spatialReference': {'latestWkid': 3857, 'wkid': 102100}, 'xmin': -15199645.40582486, 'ymin': 3395607.5273594954, 'xmax': -11354557.134968376, 'ymax': 5352395.451459487}
The spatial reference of the extent object is optional; when it is not provided, it is assumed to be in the map’s spatial reference. When the aspect ratio of the map extent is different than the size of the map on the output page or the
output_dimensions
, you might notice more features on the output map.dpi
Optional integer. Specify the print resolution of the output file.
dpi
stands for dots per inch. A higher number implies better resolution and a larger file size.output_dimensions
Optional tuple. Specify the dimensions of the output file in pixels. If the
layout_template
is notMAP_ONLY
, the specific layout template chosen takes precedence over this parameter.scale
Optional float. Specify the map scale to be printed. The map scale at which you want your map to be printed. This parameter is optional but recommended for optimal results. The
scale
property is especially useful when map services in the web map have scale-dependent layers or reference scales set. Since the map that you are viewing on the web app may be smaller than the size of the output map (for example, 8.5 x 11 in. or A4 size), the scale of the output map will be different and you could see differences in features and/or symbols in the web application as compared with the output map.When scale is used, it takes precedence over the extent, but the output map is drawn at the requested scale centered on the center of the extent.
rotation
Optional float. Specify the number of degrees by which the map frame will be rotated, measured counterclockwise from the north. To rotate clockwise, use a negative value.
spatial_reference
Optional Dictionary.Specify the spatial reference in which map should be printed. When not specified, the following is the order of precedence:
read from the
extent
parameterread from the base map layer of your web map
read from the
layout_template
chosen
layout_template
Optional String. The default value
MAP_ONLY
does not use any template.time_extent
Optional List . If there is a time-aware layer and you want it to be drawn at a specified time, specify this property. This order list can have one or two elements. Add two elements (
startTime
followed byendTime
) to represent a time extent, or provide only one time element to represent a time instant. Times are always in UTC.# Example Usage to represent Tues. Jan 1, 2008 00:00:00 UTC: # to Thurs. Jan 1, 2009 00:00:00 UTC. >>> time_extent = [1199145600000, 1230768000000]
layout_options
Optional Dictionary. This defines settings for different available page layout elements and is only needed when an available
layout_template
is chosen. Page layout elements includetitle
,copyright text
,scale bar
,author name
, andcustom text elements
. For more details, see ExportWebMap specification.- Returns:
A URL to the file which can be downloaded and printed.
# USAGE EXAMPLE 1: Printing a web map to a JPG file of desired extent. from arcgis.map import Map from arcgis.gis import GIS # connect to your GIS and get the web map item gis = GIS(url, username, password) wm_item = gis.content.get('1234abcd_web map item id') # create a WebMap object from the existing web map item wm = Map(item=wm_item) # create an empty web map wm2 = Map() wm2.content.add(<desired Item or Layer object>) # set extent redlands_extent = {'spatialReference': {'latestWkid': 3857, 'wkid': 102100}, 'xmin': -13074746.000753032, 'ymin': 4020957.451106308, 'xmax': -13014666.49652086, 'ymax': 4051532.26242039} # print printed_file_url = wm.print(file_format='JPG', extent=redlands_extent) printed_file2_url = wm2.print(file_format='PNG32', extent=redlands_extent) # Display the result in a notebook: from IPython.display import Image Image(printed_file_url) # Download file to disk import requests with requests.get(printed_file_url) as resp: with open('./output_file.png', 'wb') as file_handle: file_handle.write(resp.content)
- rotation
Get/Set the rotation of the rendered Map.
Parameter
Description
value
Required int. The rotation angle in degrees.
- Returns:
The int value of the rotation angle
# Usage example: Sets the rotation angle of the map to 45 degrees map.rotate = 45
- save(item_properties: dict[str, Any], thumbnail: str | None = None, metadata: str | None = None, owner: str | None = None, folder: str | None = None) Item
Saves the
Map
object as a new Web Map Item in yourGIS
.Note
If you started with a
Map
object from an existing web map item, calling this method will create a new item with your changes. If you want to update the existingMap
item found in your portal with your changes, call the update method instead.Parameter
Description
item_properties
Required dictionary. See table below for the keys and values. The three required keys are: ‘title’, ‘tag’, ‘snippet’.
thumbnail
Optional string. Either a path or URL to a thumbnail image.
metadata
Optional string. Either a path or URL to the metadata.
owner
Optional string. Defaults to the logged in user.
folder
Optional string. Name of the folder into which the web map should be saved.
Key:Value Dictionary Options for Argument item_properties
Key
Value
title
Required string. Name label of the item.
tags
Required string. Tags listed as comma-separated values, or a list of strings. Used for searches on items.
snippet
Required string. Provide a short summary (limit to max 250 characters) of the what the item is.
typeKeywords
Optional string. Provide a lists all subtypes, see URL 1 below for valid values.
description
Optional string. Description of the item.
extent
Optional dict. The extent of the item.
accessInformation
Optional string. Information on the source of the content.
licenseInfo
Optional string. Any license information or restrictions regarding the content.
culture
Optional string. Locale, country and language information.
access
Optional string. Valid values are private, shared, org, or public.
commentsEnabled
Optional boolean. Default is true, controls whether comments are allowed (true) or not allowed (false).
culture
Optional string. Language and country information.
The above are the most common item properties (metadata) that you set. To get a complete list, see the Common Parameters page in the ArcGIS REST API documentation.
- Returns:
Item
object corresponding to the new web map Item created.# save the web map webmap_item_properties = {‘title’:’Ebola incidents and facilities’,
’snippet’:’Map created using Python API showing locations of Ebola treatment centers’, ‘tags’:[‘automation’, ‘ebola’, ‘world health’, ‘python’], ‘extent’: {‘xmin’: -122.68, ‘ymin’: 45.53, ‘xmax’: -122.45, ‘ymax’: 45.6, ‘spatialReference’: {‘wkid’: 4326}}}
new_wm_item = wm.save(webmap_item_properties, thumbnail=’./webmap_thumbnail.png’)
- scale
Get/Set the map scale at the center of the rendered Map. If set to X, the scale of the map would be 1:X.
Parameter
Description
value
Required int.
- Returns:
The int value of the scale
# Usage example: Sets the scale to 1:24000 map.scale = 24000
The
sync_navigation
method synchronizes the navigation from one rendered Map to another rendered Map instance so panning/zooming/navigating in one will update the other.Note
Users can sync more than two instances together by passing in a list of Map instances to sync. The syncing will be remembered
Parameter
Description
map
Either a single Map instance, or a list of
Map
instances to synchronize to.
- theme
Get/Set the widget theme when displaying in a Jupyter environment.
Values can be “light” or “dark”
- property time_slider: TimeSlider
Get an instance of the TimeSlider class. You can use this class to enable or disable the time slider on the widget. Best used inside of Jupyter Lab
The
unsync_navigation
method unsynchronizes connections made to other rendered Map instances made via the sync_navigation method.Parameter
Description
map
Optional, either a single Map instance, or a list of Map instances to unsynchronize. If not specified, will unsynchronize all synced Map instances.
- update(item_properties: dict[str, Any] | None = None, thumbnail: str | None = None, metadata: str | None = None) bool
The
update
method updates the Web Map Item in yourGIS
with the changes you made to theMap
object. In addition, you can update other item properties, thumbnail and metadata.Note
If you started with a
Map
object from an existing web map item, calling this method will update the item with your changes.If you started out with a fresh Map object (without a web map item), calling this method will raise a RuntimeError exception. If you want to save the Map object into a new web map item, call the save method instead.
For
item_properties
, pass in arguments for the properties you want to be updated. All other properties will be untouched. For example, if you want to update only the item’s description, then only provide the description argument initem_properties
.Parameter
Description
item_properties
Optional dictionary. See table below for the keys and values.
thumbnail
Optional string. Either a path or URL to a thumbnail image.
metadata
Optional string. Either a path or URL to the metadata.
Key:Value Dictionary Options for Argument item_properties
Key
Value
typeKeywords
Optional string. Provide a lists all sub-types, see URL 1 below for valid values.
description
Optional string. Description of the item.
title
Optional string. Name label of the item.
tags
Optional string. Tags listed as comma-separated values, or a list of strings. Used for searches on items.
snippet
Optional string. Provide a short summary (limit to max 250 characters) of the what the item is.
accessInformation
Optional string. Information on the source of the content.
licenseInfo
Optional string. Any license information or restrictions regarding the content.
culture
Optional string. Locale, country and language information.
access
Optional string. Valid values are private, shared, org, or public.
commentsEnabled
Optional boolean. Default is true, controls whether comments are allowed (true) or not allowed (false).
The above are the most common item properties (metadata) that you set. To get a complete list, see the common parameters page in the ArcGIS REST API documentation.
- Returns:
A boolean indicating success (True) or failure (False).
- zoom
Get/Set the level of zoom applied to the rendered Map.
Parameter
Description
value
Required int. .. note:
The higher the number, the more zoomed in you are.
- Returns:
Int value that represent the zoom level
# Usage example map.zoom = 10
- zoom_to_layer(item: Item | dict | FeatureSet | FeatureLayer) None
The
zoom_to_layer
method snaps the map to the extent of the providedItem
object(s).Zoom to layer is modifying the rendered map’s extent. It is best to run this method call in a separate cell from the map rendering cell to ensure the map is rendered before the extent is set.
Parameter
Description
item
The item at which you want to zoom your map to. This can be a single extent or an
Item
,Layer
,DataFrame
,FeatureSet
, orFeatureCollection
object.
Map Classes
Bookmarks
- class arcgis.map.map_widget.Bookmarks(map: Map)
The Bookmarks allows end users to quickly navigate to a particular area of interest. This class allows users to add, remove and edit bookmarks in their Map.
Note
This class should now be created by a user but rather called through the bookmarks property on a Map instance.
- add(name: str, extent: dict, rotation: int | None = None, time_extent: dict | None = None, index: int | None = None) bool
Add a new bookmark
Parameter
Definition
name
Required string. The name of the bookmark.
extent
Required dict. The extent of the bookmark.
rotation
Optional float. The rotation of the viewpoint for the bookmark.
time_extent
Optional dict. The time extent of the bookmark item.
- Example:
- time_extent = {
“start”: datetime.datetime(1996, 11, 10), “end”: datetime.datetime(1996, 11, 25)
}
index
Required integer. The index position for the bookmark. If none specified, added to the end of the list.
- property enabled: bool
Get and set whether the bookmarks widget is shown on the rendered or not. Set to True for the bookmarks to be visible.
- property list: list[Bookmark]
Bookmark
- class arcgis.map.map_widget.Bookmark(bookmark: Bookmark, bm_mngr: Bookmarks)
Represent one bookmark in the webmap. This class can be used to edit a bookmark instant and can be accessed through the list property of the Bookmarks class.
Note
This class should now be created by a user but rather called through the list property on a Bookmarks instance.
- edit(name: str | None = None, extent: dict | None = None, rotation: int | None = None, time_extent: dict | None = None) None
Edit the properties of a bookmark. Edit the name, extent, rotation, scale and/or time_extent.
Parameter
Definition
name
Optional string. The name of the bookmark.
extent
Optional dict. The extent of the bookmark.
rotation
Optional float. The rotation of the viewpoint for the bookmark.
time_extent
Optional dict. The time extent of the bookmark item.
- Example:
- time_extent = {
“start”: datetime.datetime(1996, 11, 10), “end”: datetime.datetime(1996, 11, 25)
}
MapContent
- class arcgis.map.map_widget.MapContent(webmap: Map)
This class allows users to manage the content of a webmap. Users can view the operational layers, add layers, reorder layers, and remove layers.
This class is created from the map_content property on a Map instance.
- add(item: Item | Layer | Table | FeatureCollection | DataFrame | list | str, drawing_info: dict | None = None, popup_info: PopupInfo = None, index: int | None = None, options: dict | None = None) None
Add a layer or table to the map.
Note
The spatial reference of the map is derived from the basemap layer. If the spatial reference of the layer being added is different from the map’s spatial reference, you may not see it render correctly. You can set the layer as the basemap to change the map’s spatial reference.
Parameter
Description
item
Required Portal Item, Layer, Spatial DataFrame, or Feature Collection to add to the map.
If an item is passed in: Creates a new layer instance of the
appropriate layer class from an ArcGIS Online or ArcGIS Enterprise portal item. * If the item points to a feature service with multiple layers, then a GroupLayer is created. * If the item points to a service with a single layer, then it resolves to a layer of the same type of class as the service. * To add an ogc feature service, pass in an instance of the OGCFeatureService class. The first collection of the service will be added. If you want to specify the collection then you can pass in an instance of the FeatureCollection you want added. * A list of layers. This is useful when wanting to create a GroupLayer out of multiple layers. The list can contain any combination of the layer types listed above. * Raster object created from a local raster can be added. However, the raster will only render on the map and cannot be saved to the webmap. The raster will be added as a MediaLayer.
Note
If the item is a WMTS Layer, you can pass a key-value pair in the options parameter to select which layer to add if the WMTS service has multiple layers. The key should be ‘layer’ and the value should be the layer identifier. If nothing is passed, the first layer will be added.
drawing_info
Optional dictionary representing the drawing info to apply to the layer. The keys can include any combination of: ‘renderer’, ‘labelingInfo’, ‘scaleSymbols’, ‘showLabels’, ‘transparency’. This can only be applied when adding one layer. Renderer ‘type’ can be “simple”, “uniqueValue”, “classBreaks”, “heatmap”, “dotDensity”, etc.
To create a renderer see the renderer module where all the dataclasses are defined.
Example Structure: drawing_info = {
“labelingInfo”: <list>, “renderer”: <Renderer Dataclass>, “scaleSymbols”: <bool>, “showLabels”: <bool>, “transparency”: <float>
}
More information on the structure of the dictionary can be found in the ArcGIS REST API documentation.
popup_info
Optional PopupInfo dataclass that can be created from the popups module. See:
PopupInfo
index
Optional integer. Determines at what index the layer should be added.
options
Optional dictionary. Pass in key, value pairs that will edit the layer properties. This is useful for updating the layer properties that are not exposed through the other parameters. For example, you can update the layer title, opacity, or other properties that are applicable for the type of layer. You can pass in the service item id associated to the service url to persist renderer and popup info that is available in the service item.
# Usage Example 1: Add a layer from a portal item m = Map() item = gis.content.get(<item_id>) renderer = HeatmapRenderer(**{ "authoringInfo": {"fadeRatio": 0.2}, "type": "heatmap", "blurRadius": 5.555555555555556, "colorStops": [ {"color": [133, 193, 200, 0], "ratio": 0}, {"color": [144, 161, 190, 212], "ratio": 0.0925}, {"color": [156, 129, 132, 255], "ratio": 0.17500000000000002}, {"color": [167, 97, 170, 255], "ratio": 0.2575}, {"color": [175, 73, 128, 255], "ratio": 0.34}, {"color": [255, 255, 0, 255], "ratio": 1}, ], "maxDensity": 0.611069562632112, "maxPixelIntensity": 139.70497545315783, "minDensity": 0, "minPixelIntensity": 0, "radius": 10, }) m.content.add(item, drawing_info={"renderer": renderer})
- draw(shape, popup=None, symbol=None, attributes=None, title: str | None = None) None
Draw a shape on the map. This will add the shape as a feature collection to your layers of the map. Anything can be drawn from known
Geometry
objects.The shape will be drawn as a feature collection on the map. This means that the shape will be added as a layer to the map. The shape will be drawn with the symbol and popup info that is passed in. If no symbol is passed in, a default symbol will be created based on the geometry type. If no popup is passed in, a default popup will be created with the title of the feature collection. The attributes will be added to the feature collection as well.
Note
Ensure that the spatial reference of the shape matches the spatial reference of the map. If the spatial reference does not match, the shape will be added but not drawn on the map. To see the spatial reference of the map, call the extent property on the map.
Parameter
Description
shape
Required Geometry object. Known
Geometry
objects: Shape is one of [‘circle’, ‘ellipse’,Polygon
,Polyline
,MultiPoint
,Point
, ‘rectangle’, ‘triangle’].popup
Optional PopupInfo Dataclass. See:
PopupInfo
symbol
Optional Symbol Dataclass. See the symbols module where all the dataclasses are defined.
attributes
Optional dict. Specify a dict containing name value pairs of fields and field values associated with the graphic.
title
Optional string. The title of the feature collection that will be created from the geometry or feature set.
- form(index: int) FormInfo
Get an instance of the FormInfo dataclass for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property.
Through this class you can edit the form properties for your layer.
Layer types that have forms include: Feature Layer, Table, and Oriented Imagery Layer.
Parameter
Description
index
Required index specifying the layer who’s form properties you want to access. To get a full list of layers use the layers property.
Note
If the layer belongs inside a group layer then use the instance of the Group layer class returned from the layers property to access the layers within the group and to use the forms method in that class.
- Returns:
FormInfo dataclass for the layer specified.
To see this dataclass, see the forms module where it is defined. You can also get the dataclass as a dict by calling the dict method on the dataclass.
- get_layer(title: str) Layer
Get a layer or table from the map by title. If the layer is added more than once only the first instance of the layer will be returned.
- ..note::
To find a layer by index you can use the layer_info method to see the layers in a table form.
Parameter
Definition
title
Required string. The title of the layer or table to get.
- Returns:
Layer
- get_table(title: str) arcgis.gis.Table
Get a table from the map by title. If the table is added more than once only the first instance of the table will be returned.
- ..note::
To find a table by index you can use the table_info method to see the tables in a table form.
Parameter
Definition
title
Required string. The title of the table to get.
- Returns:
Table
- layer_visibility(index: int) LayerVisibility
Get an instance of the LayerVisibility class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property. Through this class you can edit the visibility for your layer on the map and in the legend.
Parameter
Description
index
Required index specifying the layer who’s visibility properties you want to access. To get a full list of layers use the layers property.
Note
If the layer belongs inside a group layer then use the instance of the Group layer class returned from the layers property to access the layers within the group and to use the layer_visibility method in that class.
- Returns:
LayerVisibility class for the layer specified.
- property layers: list
Initialize the list of layers found in the list. This will return a list of class instances representing each layer.
- move(index: int, group: GroupLayer) None
Move a layer into an existing GroupLayer’s list of layers.
Parameter
Description
index
Required int. The index of the layer you want to move.
group
Required GroupLayer instance. The group layer you want to move the layer to.
- move_to_basemap(index: int) bool
Move a layer to be a basemap layer. A basemap layer is a layer that provides geographic context to the map. A web map always contains a basemap. The following is a list of possible basemap layer types:
Image Service Layer
Image Service Vector Layer
Map Service Layer
Tiled Image Service Layer
Tiled Map Service Layer
Vector Tile Layer
WMS Layer
Parameter
Definition
index
Required integer. The index of the layer from operational layers that will be moved to basemap layers. The list of available layers is found when calling the layers property on the Map.
# Create a Map from an existing Map Item. wm = Map(item=<webmap_item_id>) # Get and add the layer to the map vtl = gis.content.get("<vector tile layer id>") wm.content.add(vtl.layers[0]) # Move the layer to the basemap wm.content.move_to_basemap(0) wm.update()
- popup(index: int, is_table: bool = False) PopupManager
Get an instance of the PopupManager class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the content.layers property. Through this class you can edit the popup for your layer.
Parameter
Description
index
Required index specifying the layer who’s popup you want to access. To get a full list of layers use the layers property.
Note
If the layer belongs inside a group layer then use the instance of the Group layer class returned from the layers property to access the layers within the group and to use the popup method in that class.
is_table
Optional boolean. Set to True if the layer is a table.
- Returns:
PopupManager class for the layer specified.
- remove(index: int | None = None, is_layer: bool = True) bool
Remove a layer or table from the map either by specifying the index or passing in the layer dictionary.
Parameter
Description
index
Optional integer specifying the index for the layer you want to remove. To see a list of layers use the layers property.
is_layer
Optional boolean. Set to True if removing a layer and False if removing a table.
- renderer(index) RendererManager
Get an instance of the RendererManager class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property. Through this class you can edit the renderer for your layer.
Parameter
Description
index
Required index specifying the layer who’s renderer you want to access. To get a full list of layers use the layers property.
Note
If the layer belongs inside a group layer then use the instance of the Group layer class returned from the layers property to access the layers within the group and to use the renderer method in that class.
- Returns:
RendererManager class for the layer specified.
- reposition(current_index: int, new_index: int) None
Reposition a layer in the Map Content’s layers. You can do this by specifying the index of the current layer you want to move and what index it should be at.
This method is useful if you have overlapping layers and you want to manage the order in which they are rendered on your map.
Parameter
Description
current_index
Required int. The index of where the layer currently is in the list of layers. You can see the list of layers by calling the layers property on your Group Layer instance.
Must be a layer. Cannot be a table.
new_index
Required int. The index you want to move the layer to.
- reposition_to_top(index: int) None
Reposition a layer to the top of the list of layers. This will make the layer render on top of all other layers.
Parameter
Description
index
Required int. The index of the layer you want to reposition to the top of the list.
- property tables: list[Table]
Initialize the list of tables found in the list. This will return a list of Table instances representing each table.
- update_layer(index: int = None, labeling_info: list[dict[str, Any]] | None = None, renderer: renderer.SimpleRenderer | renderer.HeatmapRenderer | renderer.PieChartRenderer | renderer.ClassBreaksRenderer | renderer.UniqueValueRenderer | renderer.DotDensityRenderer | renderer.DictionaryRenderer | None = None, scale_symbols: bool | None = None, transparency: int | None = None, options: dict | None = None, form: forms.FormInfo | None = None) None
This method can be used to update certain properties on a layer that is in your map.
Parameter
Description
index
Optional integer specifying the index for the layer you want to update. To see a list of layers use the layers property. This cannot be a group layer. To update a group layer, use the update method in the group layer class. It’s better to pass the index to be more specific with which layer you want to update.
labeling_info
Optional list of dictionaries. Defines the properties used for labeling the layer.
Example of some properties: labeling_info = [{
“labelExpression”: ‘[FAA_ID]’, “maxScale”: 0, “minScale”: 10000, “symbol”: {
“color”: [104, 104, 104, 255], “type”: “esriTS”, “verticalAlignment”: “bottom”, “horizontalAlignment”: “center”, “font”: {
“decoration”: “none”, “family”: “Arial”, “size”: 8, “style”: “normal”, “weight”: “bold”
}
}
}]
renderer
Optional Renderer Dataclass. See the renderer module where all the dataclasses are defined.
scale_symbols
Optional bool. Indicates whether symbols should stay the same size in screen units as you zoom in. False means the symbols stay the same size in screen units regardless of the map scale.
transparency
Optional int. Value ranging between 0 (no transparency) to 100 (completely transparent).
options
Optional dictionary. Pass in key, value pairs that will edit the layer properties. This is useful for updating the layer properties that are not exposed through the other parameters. For example, you can update the layer title, opacity, or other properties that are applicable for the type of layer.
form
Optional FormInfo Dataclass. See the forms module where all the dataclasses are defined. You can get the current FormInfo by calling the form property and indicating the index of the layer you want to get the form for. Forms are only supported for Feature Layers, Tables, and Oriented Imagery Layers.
Scene
- class arcgis.map.Scene(**kwargs: Any)
The Scene can be displayed in a Jupyter Lab environment.
The commands will be sent from the Scene class and all the methods in this class will affect what will be seen on the scene. The underlying web scene dictionary will be transformed in the Scene class.
A Scene contains layers of geographic data that are displayed in 3D. Scenes allow you to display real-world visualizations of landscapes, objects, buildings, and other 3D objects.
- property basemap: BasemapManager
Returns a BasemapManager object that can be used to handle basemap related properties and methods on the Scene.
- camera
Get/Set the camera of the rendered Scene.
Parameter
Description
camera
A dictionary that represents the JSON of the scene widget’s camera. The dictionary included the keys: “position”, “heading”, and “tilt” The position indicates the x, y, and z coordinates for the camera. The heading is the heading of the camera in degrees. The tilt is the degrees with respect to the surface as projected down.
Example: scene.camera = {
- “position”:{
‘x’: -5938587.158752469, ‘y’: -2827970.414173906, ‘z’: 46809.31127560418
}, “heading”: 400, “tilt”: 0.5
}
- Returns:
A dictionary that represents the x,y, and z of the rendered Scene.
# Usage example scene.camera = { "position":{ 'x': -5938587.158752469, 'y': -2827970.414173906, 'z': 46809.31127560418 }, "heading": 400, "tilt": 0.5 }
- center
Get/Set the center of the rendered Scene.
Parameter
Description
center
- A [lat, long] list that represents the JSON of the scene
widget’s center.
- Returns:
A list that represents the latitude and longitude of the scene’s center.
# Usage example scene.center = [34.05, -118.24]
- property content: SceneContent
Returns a SceneContent object that can be used to access the layers and tables in the scene. This is useful for adding, updating, getting, and removing content from the Scene.
- property environment: Environment
Get an instance of the Environment class. You can use this class to enable or disable widgets such as weather and daylight. You can also set these properties using python code.
- extent
Get/Set the rendered map’s extent.
Note
Must provide a spatial reference key in the extent dictionary.
Parameter
Description
value
Required dict. map.extent = {
‘spatialReference’: {‘latestWkid’: 3857, ‘wkid’: 102100}, ‘xmax’: 5395723.072123609, ‘xmin’: -137094.78326911852, ‘ymax’: 10970767.576996306, ‘ymin’: 7336034.007980572
}
- Returns:
A dictionary representing the extent
- property heading: float
Get/Set the heading of the camera in degrees. Heading is zero when north is the top of the screen. It increases as the view rotates clockwise.
Parameter
Description
heading
A float that represents the heading in degrees.
- js_requirement()
Return the JS API version needed to work with the current version of the mapping module in a disconnected environment.
- Returns:
A string representing the JS API version.
- property layer_list: LayerList
Get an instance of the LayerList class. You can use this class to enable or disable the layer list widget. Best used inside of Jupyter Lab.
- property legend: Legend
Get an instance of the Legend class. You can use this class to enable or disable the legend widget. Best used inside of Jupyter Lab.
- save(item_properties: dict[str, Any], thumbnail: str | None = None, metadata: str | None = None, owner: str | None = None, folder: str | None = None) Item
Saves the
Scene
object as a new Web Scene Item in yourGIS
.Note
If you started with a
Scene
object from an existing web scene item, calling this method will create a new item with your changes. If you want to update the existingScene
item found in your portal with your changes, call the update method instead.Parameter
Description
item_properties
Required dictionary. See table below for the keys and values. The three required keys are: ‘title’, ‘tag’, ‘snippet’.
thumbnail
Optional string. Either a path or URL to a thumbnail image.
metadata
Optional string. Either a path or URL to the metadata.
owner
Optional string. Defaults to the logged in user.
folder
Optional string. Name of the folder into which the web scene should be saved.
Key:Value Dictionary Options for Argument item_properties
Key
Value
title
Required string. Name label of the item.
tags
Required string. Tags listed as comma-separated values, or a list of strings. Used for searches on items.
snippet
Required string. Provide a short summary (limit to max 250 characters) of the what the item is.
typeKeywords
Optional string. Provide a lists all subtypes, see URL 1 below for valid values.
description
Optional string. Description of the item.
extent
Optional dict. The extent of the item.
accessInformation
Optional string. Information on the source of the content.
licenseInfo
Optional string. Any license information or restrictions regarding the content.
culture
Optional string. Locale, country and language information.
access
Optional string. Valid values are private, shared, org, or public.
commentsEnabled
Optional boolean. Default is true, controls whether comments are allowed (true) or not allowed (false).
culture
Optional string. Language and country information.
The above are the most common item properties (metadata) that you set. To get a complete list, see the Common Parameters page in the ArcGIS REST API documentation.
- Returns:
Item
object corresponding to the new web scene Item created.# save the web scene webscene_item_properties = {‘title’:’Ebola incidents and facilities’,
’snippet’:’Scene created using Python API showing locations of Ebola treatment centers’, ‘tags’:[‘automation’, ‘ebola’, ‘world health’, ‘python’], ‘extent’: {‘xmin’: -122.68, ‘ymin’: 45.53, ‘xmax’: -122.45, ‘ymax’: 45.6, ‘spatialReference’: {‘wkid’: 4326}}}
new_ws_item = webscene.save(webscene_item_properties, thumbnail=’./webscene_thumbnail.png’)
- scale
Get/Set the scene scale at the center of the rendered Scene. If set to X, the scale of the scene would be 1:X.
Parameter
Description
value
Required int.
- Returns:
The int value of the scale
# Usage example: Sets the scale to 1:24000 scene.scale = 24000
The
sync_navigation
method synchronizes the navigation from one rendered Scene to another rendered Scene instance so panning/zooming/navigating in one will update the other.Note
Users can sync more than two instances together by passing in a list of Scene instances to sync. The syncing will be remembered
Parameter
Description
scene
Either a single Scene instance, or a list of
Scene
instances to synchronize to.
- theme
Get/Set the widget theme when displaying in a Jupyter environment.
Values can be “light” or “dark”
- property tilt: float
Get/Set the tilt of the rendered Scene. The tilt of the camera in degrees with respect to the surface as projected down from the camera position. Tilt is zero when looking straight down at the surface and 90 degrees when the camera is looking parallel to the surface.
Parameter
Description
tilt
A float that represents the tilt.
- Returns:
A float that represents the tilt value.
- property time_slider: TimeSlider
Get an instance of the TimeSlider class. You can use this class to enable or disable the time slider on the widget. Best used inside of Jupyter Lab
The
unsync_navigation
method unsynchronizes connections made to other rendered Scene instances made via the sync_navigation method.Parameter
Description
scene
Optional, either a single Scene instance, or a list of Scene instances to unsynchronize. If not specified, will unsynchronize all synced Scene instances.
- update(item_properties: dict[str, Any] | None = None, thumbnail: str | None = None, metadata: str | None = None) bool
The
update
method updates the Web Scene Item in yourGIS
with the changes you made to theScene
object. In addition, you can update other item properties, thumbnail and metadata.Note
If you started with a
Scene
object from an existing web scene item, calling this method will update the item with your changes.If you started out with a fresh Scene object (without a web scene item), calling this method will raise a RuntimeError exception. If you want to save the Scene object into a new web scene item, call the save method instead.
For
item_properties
, pass in arguments for the properties you want to be updated. All other properties will be untouched. For example, if you want to update only the item’s description, then only provide the description argument initem_properties
.Parameter
Description
item_properties
Optional dictionary. See table below for the keys and values.
thumbnail
Optional string. Either a path or URL to a thumbnail image.
metadata
Optional string. Either a path or URL to the metadata.
Key:Value Dictionary Options for Argument item_properties
Key
Value
typeKeywords
Optional string. Provide a lists all sub-types, see URL 1 below for valid values.
description
Optional string. Description of the item.
title
Optional string. Name label of the item.
tags
Optional string. Tags listed as comma-separated values, or a list of strings. Used for searches on items.
snippet
Optional string. Provide a short summary (limit to max 250 characters) of the what the item is.
accessInformation
Optional string. Information on the source of the content.
licenseInfo
Optional string. Any license information or restrictions regarding the content.
culture
Optional string. Locale, country and language information.
access
Optional string. Valid values are private, shared, org, or public.
commentsEnabled
Optional boolean. Default is true, controls whether comments are allowed (true) or not allowed (false).
The above are the most common item properties (metadata) that you set. To get a complete list, see the common parameters page in the ArcGIS REST API documentation.
- Returns:
A boolean indicating success (True) or failure (False).
- property viewing_mode: str
Get/Set the viewing mode.
The viewing mode (local or global). Global scenes render the earth as a sphere. Local scenes render the earth on a flat plane and allow for navigation and feature display in a localized or clipped area. Users may also navigate the camera of a local scene below the surface of a basemap.
“global” : Global scenes allow the entire globe to render in the view, showing the curvature of the earth.
“local” : Local scenes render the earth on a flat surface. They can be constrained to only show a “local”
area by setting the clippingArea property. Local scenes also allow for displaying and exploring data that would otherwise be hidden by the surface of the earth.
Parameter
Description
mode
A string that represents the mode. Either “global” or “local”. Default is “global”.
- Returns:
String that represents the viewing mode.
- zoom
Get/Set the level of zoom applied to the rendered Scene.
Parameter
Description
value
Required int. .. note:
The higher the number, the more zoomed in you are.
- Returns:
Int value that represent the zoom level
# Usage example scene.zoom = 10
- zoom_to_layer(item: arcgis.gis.Item | features.FeatureSet | features.FeatureCollection | features.Layer | features.DataFrame | str) None
The
zoom_to_layer
method snaps the scene to the extent of the providedItem
object(s).Parameter
Description
item
The item at which you want to zoom your scene to. This can be a single extent or an
Item
,Layer
,DataFrame
,FeatureSet
, orFeatureCollection
object.
Scene Classes
Environment
- class arcgis.map.scene_widget.Environment(scene: Scene)
A class that can be used to enable the environment widgets such as daylight and weather on a rendered Scene. This class is most useful when used inside a Jupyter Lab environment.
Note
This class should now be created by a user but rather called through the environment property on a Scene instance.
- property daylight_enabled: bool
The Daylight widget can be used to manipulate the lighting conditions of a Scene. For this, the widget modifies the lighting property of environment. To illuminate the scene, one can either use a configuration of date and time to position the sun or switch to the virtual mode, where the light source is relative to the camera.
- property weather_enabled: bool
The Daylight widget can be used to manipulate the lighting conditions of a Scene. For this, the widget modifies the lighting property of environment. To illuminate the scene, one can either use a configuration of date and time to position the sun or switch to the virtual mode, where the light source is relative to the camera.
SceneContent
- class arcgis.map.scene_widget.SceneContent(scene: Scene)
This class allows users to manage the content of a Scene. Users can view the operational layers, add layers, reorder layers, and remove layers.
This class is created from the scene_content property on a Scene instance.
- add(item: Item | Layer, drawing_info: dict | None = None, popup_info: dict | None = None, index: int | None = None) None
Add a layer or table to the scene.
Parameter
Description
item
Required Portal Item or Layer to add to the scene.
If an item is passed in: Creates a new layer instance of the
appropriate layer class from an ArcGIS Online or ArcGIS Enterprise portal item. * If the item points to a feature service with multiple layers, then a GroupLayer is created. * If the item points to a service with a single layer, then it resolves to a layer of the same type of class as the service.
drawing_info
Optional dictionary representing the drawing info to apply to the layer. The keys can include any combination of: ‘renderer’, ‘labelingInfo’, ‘scaleSymbols’, ‘showLabels’, ‘transparency’. This can only be applied when adding one layer.
NOTICE: The scene viewer only accepts 3D Symbols. Please see: 3D Symbols for more information.
Example Structure: drawing_info = {
“labelingInfo”: <list>, “renderer”: <dict>, “scaleSymbols”: <bool>, “showLabels”: <bool>, “transparency”: <float>
}
popup_info
Optional dictionary representing the popup info for the feature layer. This can only be applied when adding one layer.
Example: popup_info = {
“popupElements”: <list>, “showAttachments”: <bool>, “fieldInfos”: <list>, “title”: <str>
}
index
Optional integer. Determines at what index the layer should be added.
- get_layer(title: str) Layer
Get a layer or table from the scene by title. If the layer is added more than once only the first instance of the layer will be returned.
- ..note::
To find a layer by index you can use the layer_info method to see the layers in a table form.
- Returns:
A layer or table from the scene.
- layer_info()
Get the layers in the scene.
- Returns:
A list of dictionaries representing the layers in the scene.
- layer_visibility(index: int) LayerVisibility
Get an instance of the LayerVisibility class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property. Through this class you can edit the visibility for your layer on the scene and in the legend.
Parameter
Description
index
Required index specifying the layer who’s visibility properties you want to access. To get a full list of layers use the layers property.
Note
If the layer belongs inside a group layer then use the instance of the Group layer class returned from the layers property to access the layers within the group and to use the layer_visibility method in that class.
- Returns:
LayerVisibility class for the layer specified.
- property layers: list
Initialize the list of layers found in the list. This will return a list of class instances representing each layer.
- move_to_basemap(index: int) None
Move a layer to be a basemap layer. A basemap layer is a layer that provides geographic context to the scene. A web scene always contains a basemap. The following is a list of possible basemap layer types:
Image Service Layer
Image Service Vector Layer
Map Service Layer
Tiled Image Service Layer
Tiled Map Service Layer
Vector Tile Layer
Parameter
Definition
index
Required integer. The index of the layer from operational layers that will be moved to basemap layers. The list of available layers is found when calling the layers property on the Scene.
# Create a Scene from an existing Scene Item. ws = Scene(item=<webscene_item_id>) # Get and add the layer to the scene vtl = gis.content.get("<vector tile layer id>") ws.content.add(vtl.layers[0]) # Move the layer to the basemap ws.move_to_basemap(0) ws.update()
- popup(index: int) PopupManager
Get an instance of the PopupManager class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property. Through this class you can edit the popup for your layer.
Parameter
Description
index
Required index specifying the layer who’s popup you want to access. To get a full list of layers use the layers property.
Note
If the layer belongs inside a group layer then use the instance of the Group layer class returned from the layers property to access the layers within the group and to use the popup method in that class.
- Returns:
PopupManager class for the layer specified.
- remove(index: int | None = None, is_layer: bool = True) bool
Remove a layer from the scene either by specifying the index or passing in the layer dictionary.
Parameter
Description
layer
Optional layer object from the list of layers found through the layers property that you want to remove from the scene. This will remove the first instance of this layer if you have it more than once on the scene. This parameter cannot be passed with the index.
index
Optional integer specifying the index for the layer you want to remove. To see a list of layers use the layers property.
- property tables: list[Table]
Initialize the list of tables found in the list. This will return a list of Table instances representing each table.
- update_layer(index: int = None, labeling_info: list[dict[str, Any]] | None = None, renderer: SimpleRenderer | HeatmapRenderer | PieChartRenderer | ClassBreaksRenderer | UniqueValueRenderer | DotDensityRenderer | DictionaryRenderer | None = None, scale_symbols: bool | None = None, transparency: int | None = None) None
This method can be used to update certain properties on a layer that is in your scene.
Parameter
Description
index
Optional integer specifying the index for the layer you want to update. To see a list of layers use the layers property. This cannot be a group layer. To update a group layer, use the update_layer method in the group layer class. It’s better to pass the index to be more specific with which layer you want to update.
labeling_info
Optional list of dictionaries. Defines the properties used for labeling the layer.
Example of some properties: labeling_info = [{
“labelExpression”: ‘[FAA_ID]’, “maxScale”: 0, “minScale”: 10000, “symbol”: {
“color”: [104, 104, 104, 255], “type”: “esriTS”, “verticalAlignment”: “bottom”, “horizontalAlignment”: “center”, “font”: {
“decoration”: “none”, “family”: “Arial”, “size”: 8, “style”: “normal”, “weight”: “bold”
}
}
}]
renderer
Optional Renderer Dataclass. See the renderer module where all the dataclasses are defined.
scale_symbols
Optional bool. Indicates whether symbols should stay the same size in screen units as you zoom in. False means the symbols stay the same size in screen units regardless of the scene scale.
transparency
Optional int. Value ranging between 0 (no transparency) to 100 (completely transparent).
Common Classes (Map and Scene)
Legend
- class arcgis.map.map_widget.Legend(map)
The Legend describes the symbols used to represent layers in a map. All symbols and text used in this widget are configured in the Renderer of the layer. The legend will only display layers and sub-layers that are visible in the map.
The legend automatically updates when - the visibility of a layer or sub-layer changes - a layer is added or removed from the map - a layer’s renderer, opacity, or title is changed - the legendEnabled property is changed (set to true or false on the layer)
Note
This class should now be created by a user but rather called through the legend property on a Map instance.
- property enabled: bool
Get and set whether the legend is shown on the map/scene or not. Set to True for the legend to be visible.
The Legend widget describes the symbols used to represent layers in a map. All symbols and text used in this widget are configured in the renderer of the layer. The legend will only display layers and sub-layers that are visible in the map.
The legend automatically updates when - the visibility of a layer or sub-layer changes - a layer is added or removed from the map - a layer’s renderer, opacity, or title is changed
Note
Known Limitations: - Currently, the legend widget does not support the following layer types: ElevationLayer, GraphicsLayer, IntegratedMeshLayer, KMLLayer, MapNotesLayer, OpenStreetMapLayer, VectorTileLayer, and WebTileLayer. - 3D symbols with more than one symbol layer are not supported. - DictionaryRenderer is not supported.
LayerVisibility
- class arcgis.map.LayerVisibility(layer: Layer)
A class that can be used to manage the visibility of layers in a map. The layer visibility class is primarily used to set the visibility of the layers on the map and in the legend.
Note
This class should now be created by a user but rather called through the layer_visibility property on a Map or GroupLayer instance.
LayerList
- class arcgis.map.map_widget.LayerList(map)
A class that can be used to enable the layer list widget on a rendered Map. This class is most useful when used inside a Jupyter Lab environment.
Note
This class should now be created by a user but rather called through the layer_list property on a Map instance.
- property enabled: bool
The Layer List widget allows end users to quickly see the layers that are present on your map. It displays a list of layers, which are defined inside the Map. Set to True for the layer list to be visible. This property is best used inside Jupyter Lab with a rendered Map.
Note
Any changes made on the layer list widget will only be reflected in the rendered map instance, these will not affect the map definition. To change layer visibility in the definition, use the layer_visibility method.
TimeSlider
- class arcgis.map.map_widget.TimeSlider(map)
A class that can be used to enable the time slider widget on a rendered Map. This class is most useful when used inside a Jupyter Lab environment.
Note
This class should now be created by a user but rather called through the time_slider property on a Map instance.
- property enabled: bool
The TimeSlider widget simplifies visualization of temporal data in your application.
Note
The TimeSlider widget is only available for layers that have time information enabled.
- time_extent(start_time: datetime | None = None, end_time: datetime | None = None, time_interval: dict | None = None, layer_idx: int = 0)
The
time_extent
is called when enabled = True and is the full time extent to display on the time slider.Parameter
Description
start_time
Optional
datetime.datetime
. The lower bound of the full time extent to display on the time slider.end_time
Optional
datetime.datetime
. The upper bound of the full time extent to display on the time slider.time_interval
Optional dict. The time interval to display on the time slider. The time interval is a dictionary with two keys: value and units. The interval is the number of units to display on the time slider. The units are the units of the interval.
layer_idx
Optional integer. The index of the layer in the webmap that the time extent should be applied to. If not specified, the time extent will be applied to the first layer in the webmap.
BasemapManager
- class arcgis.map.map_widget.BasemapManager(map)
The Basemap Manager allows users to manage the basemap of a webmap or webscene. Users can view their basemap options, set the basemap to a new one, and add layers to the basemap.
This class is created from the basemap property on a Map or Scene instance.
- property basemap: str | Item
Get and set the current basemap of the Map or Scene. Basemap values can be found by calling the basemaps property or basemap_gallery property. An existing Map Item can also be assigned and the basemap from this item will be taken.
Setting the basemap will replace all current basemap layers with the new basemap layers.
To add a basemap style service, pass in a dictionary depicting the basemap style path and language code. Make sure you are using a rendered map instance to use basemap services. This will only work with a rendered map instance. Example: basemap = {
“id” : “arcgis/streets”, “language” : “fr” }
Note
If you set a basemap that does not have the same spatial reference as the webmap or webscene, the webmap or webscene will be updated to this spatial reference. Any operational layers on the map will not be re-projected automatically.
- property basemap_gallery: list[str]
The
basemap_gallery
property allows for viewing of your portal’s custom basemap group.
- property basemaps: list[str]
List of possible basemaps to use. All those starting with ‘arcgis’ require you to be authenticated.
- property basemaps3d: list[str]
List of possible 3D basemaps to use with a Scene. All those starting with ‘arcgis’ require you to be authenticated.
- move_from_basemap(index: int) bool
Move a layer from the basemap layers to the operational layers. The reverse process of move_to_basemap.
Parameter
Definition
index
Required integer. The index of the layer found in the basemap layers that will be moved to be in the operational layers.
wm = Map(item=<webmap_item_id>) layer = wm.basemap["baseMapLayer"][0] wm.move_from_basemap() wm.update()
- remove_basemap_layer(index: int) bool
Remove a layer from the basemap layers. You can see the current basemap layers by calling the basemap property on your map. If you want to update the title of the basemap you can use the basemap_title method.
Note
There must be at least one basemap layer present. You cannot remove all basemap layers.
Parameter
Definition
index
Required integer. The index for the layer in the basemap layers that will be removed.
GroupLayer
- class arcgis.map.GroupLayer(layer: Layer, map: Map | Scene, parent: GroupLayer | Map | Scene)
The Group Layer class provides the ability to organize several sublayers into one common layer. Suppose there are several FeatureLayers that all represent water features in different dimensions. For example, wells (points), streams (lines), and lakes (polygons). The GroupLayer provides the functionality to treat them as one layer called “Water Features” even though they are stored as separate feature layers.
Note
This class should now be created by a user but rather accessed through indexing using the layers property on a Map instance.
- form(index: int) FormInfo
Get an instance of the FormInfo class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property.
Parameter
Description
index
Required integer specifying the layer who’s form to get. Layer has to be in list of layers of the Group Layer instance. You can get the list of layers by calling the layers property on your Group Layer instance.
Forms are only supported for Feature Layers, Tables, and Oriented Imagery Layers.
- Returns:
FormInfo dataclass for the layer specified.
To see this dataclass, see the forms module where it is defined. You can also get the dataclass as a dict by calling the dict method on the dataclass.
- layer_visibility(index: int) LayerVisibility
Get an instance of the LayerVisibility class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property.
Parameter
Description
index
Required integer specifying the layer who’s layer visibility to get. Layer has to be in list of layers of the Group Layer instance. You can get the list of layers by calling the layers property on your Group Layer instance.
- move(index: int, group: GroupLayer | None = None) None
Move a layer from it’s group into another GroupLayer or into ‘No Group’ which means it will be moved to the main Map’s layers.
You can use this method on a GroupLayer and the entire GroupLayer will be added to another group or be added to the main Map’s layers.
Parameter
Description
index
Required int. The index of the layer you want to move. You can see the list of layers by calling the layers property on your Group Layer instance.
group
Optional GroupLayer. The group layer you want to move the layer to. If you want to move the layer to the main Map’s layers, pass in None
- popup(index: int) PopupManager
Get an instance of the PopupManager class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property.
Parameter
Description
index
Required integer specifying the layer who’s popup to get. Layer has to be in list of layers of the Group Layer instance. You can get the list of layers by calling the layers property on your Group Layer instance.
- remove_layer(index: int) None
Remove a layer from the Group Layer’s layers. You can do this by specifying the index of the current layer you want to remove.
Parameter
Description
index
Required int. The index of the layer you want to remove. You can see the list of layers by calling the layers property on your Group Layer instance.
- renderer(index: int) RendererManager
Get an instance of the RendererManager class for the layer specified. Specify the layer through it’s position in the list of layers. The list of layers can be accessed with the layers property.
Parameter
Description
index
Required integer specifying the layer who’s renderer to get. Layer has to be in list of layers of the Group Layer instance. You can get the list of layers by calling the layers property on your Group Layer instance.
- reposition(current_index: int, new_index: int) None
Reposition a layer in the Group Layer’s layers. You can do this by specifying the index of the current layer you want to move and what index it should be at.
This method is useful if you have overlapping layers and you want to manage the order in which they are rendered on your map.
Parameter
Description
current_index
Required int. The index of where the layer currently is in the list of layers. You can see the list of layers by calling the layers property on your Group Layer instance.
new_index
Required int. The index you want to move the layer to.
- ungroup() None
Ungroup a GroupLayer. This will send the layer to the parent’s layers. If the parent is Map, then all the layers in the GroupLayer will be sent to the Map’s layers and the GroupLayer removed. If the parent is another GroupLayer, then all the layers in the GroupLayer will be sent to the parent’s layers and the GroupLayer removed.
- update_layer(index, labeling_info=None, renderer=None, scale_symbols=None, transparency=None, options=None, form=None) None
This method can be used to update certain properties found in a layer within a group layer in your map.
Parameter
Description
index
Optional integer specifying the index for the layer you want to update. To see a list of layers use the layers property. This cannot be a group layer. To update a layer in a GroupLayer, use the update_layer method in the group layer class.
labeling_info
Optional list of dictionaries. Defines the properties used for labeling the layer.
Example of some properties: labeling_info = [{
“labelExpression”: ‘[FAA_ID]’, “maxScale”: 0, “minScale”: 10000, “symbol”: <Symbol Dataclass> }
}]
renderer
Optional dictionary representing the renderer properties for the layer to be updated with.
Example: renderer = SimpleRenderer(**{
‘type’: ‘simple’, ‘symbol’: {
‘type’: ‘esriPMS’, ‘url’: ‘RedSphere.png’, ‘imageData’: ‘{data}’, ‘contentType’: ‘image/png’, ‘width’: 15, ‘height’: 15}
})
scale_symbols
Optional bool. Indicates whether symbols should stay the same size in screen units as you zoom in. False means the symbols stay the same size in screen units regardless of the map scale.
transparency
Optional int. Value ranging between 0 (no transparency) to 100 (completely transparent).
options
Optional dictionary. Pass in key, value pairs that will edit the layer properties. This is useful for updating the layer properties that are not exposed through the other parameters. For example, you can update the layer title, opacity, or other properties that are applicable for the type of layer.
form
Optional FormInfo Dataclass. See the forms module where all the dataclasses are defined. You can get the current FormInfo by calling the form property and indicating the index of the layer you want to get the form for. Forms are only supported for Feature Layers, Tables, and Oriented Imagery Layers.
SmartMappingManager
- class arcgis.map.SmartMappingManager(source, layer)
A class to manage smart mapping methods. Smart Mapping ONLY works with a rendered map.
Warning
There are a few points to note with these methods: - You need to make sure that the layer has been loaded before calling a method on it. - The map can take a few seconds to reflect the changes from the renderer creation. - Calling any other methods or properties need to be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
- class_breaks_renderer(break_type: str, field: str | None = None, normalization_field: str | None = None, normalization_type: str | None = None, normalization_total: int | None = None, classification_method: str | None = None, standard_deviation_interval: float | None = None, num_classes: int | None = None, value_expression: str | None = None, value_expression_title: str | None = None, sql_expression: str | None = None, sql_where: str | None = None, outline_optimization_enabled: bool = False, min_value: int | None = None, max_value: int | None = None, default_symbol_enabled: bool = True, for_binning: bool | None = None) None
ClassBreaksRenderer defines the symbol of each feature in a Layer based on the value of a numeric attribute. Symbols are assigned based on classes or ranges of data. Each feature is assigned a symbol based on the class break in which the value of the attribute falls.
The resulting renderer defines the symbol size of each feature based on the value of the given field value. A default size scheme is determined based on the background of the view. Depending on the classificationMethod, class breaks (or data ranges) are generated based on the statistics of the data. Each feature is assigned a size based on the class break in which the value of the field falls.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
break_type
Required string. The type of class breaks to generate. This value determines how class breaks are generated. Values are: “size” or “color”.
field
Optional string. The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. If a value_expression is set, this field is ignored. The field should represent numeric types.
normalization_field
Optional string. The name of the field to normalize the values of the given field. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities.
normalization_type
Optional string. Indicates how the data is normalized. The data value obtained from the field is normalized in one of the following ways before it is compared with the class breaks.
Values: - “log” : Computes the base 10 logarithm of each data value. This can
be useful because it reduces the influence of very large data values.
- “percent-of-total”Divides each data value by the sum of all data
values then multiplies by 100.
“field” : Divides each data value by the value of the normalization_field.
normalization_total
Optional integer. The total of all data values. This is used when normalization_type is “percent-of-total”.
classification_method
Optional string. The method for classifying the data. This value determines how class breaks are generated. When the value is “equal-interval”, class breaks are generated such that the difference between any two breaks is the same. When the value is “natural-breaks”, class breaks are generated based on natural groupings of the data. When the value is “quantile”, class breaks are generated such that the total number of data values in each class is the same. When the value is “standard-deviation”, class breaks are generated based on the standard deviation of the data.
standard_deviation_interval
Optional float. The standard deviation interval. This value is used when classification_method is “standard-deviation”.
num_classes
Optional integer. The number of classes. This is ignored when when “standard-deviation” is specified.
value_expression
Optional string. An Arcade expression following the specification defined by the Arcade Visualization Profile. Expressions may reference field values using the $feature profile variable and must return a number. This property overrides the field property and therefore is used instead of an input field value.
value_expression_title
Optional string. The title used to describe the value_expression in the Legend.
sql_expression
Optional string. A SQL expression evaluating to a number.
sql_where
Optional string. A where clause for the query. Used to filter features for the statistics query.
outline_optimization_enabled
Optional boolean. Indicates whether the polygon’s background fill symbol outline width should vary based on view scale. Only for polygon layers.
min_value
Optional integer. A custom minimum value set by the user. Use this in conjunction with max_value to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variables.
max_value
Optional integer. A custom maximum value set by the user. Use this in conjunction with min_value to generate statistics between lower and upper bounds. This will be the highest stop in the returned visual variables.
default_symbol_enabled
Optional boolean. Enables the defaultSymbol on the renderer and assigns it to features with no value or that fall outside of the prescribed class breaks.
for_binning
Optional boolean. Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
- dot_density_renderer(attributes: dict, dot_value_optimization_enabled: bool = True, dot_blending_enabled: bool = True, outline_optimization_enabled: bool = False, scheme: dict | None = None, for_binning: bool | None = None) None
DotDensityRenderer allows you to create dot density visualizations for polygon layers. Dot density visualizations randomly draw dots within each polygon to visualize the density of a population or some other variable. Each dot represents a fixed numeric value of an attribute or a subset of attributes. Unlike choropleth maps, field values used in dot density visualizations don’t need to be normalized because the size of the polygon, together with the number of dots rendered within its boundaries, indicate the spatial density of that value.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
attributes
Required list of dictionaries. A set of complementary numeric fields/expressions used as the basis of the dot density visualization. For example, if creating an election map, you would indicate the names of each field representing the candidate or political party where total votes are stored.
Keys: - “field”: The name of a numeric field. - “label” : The label used to describe the field in the Legend. - “valueExpression”: An Arcade expression following the specification
defined by the Arcade Visualization Profile. Expressions may reference field values using the $feature profile variable and must return a number. This property overrides the field property and therefore is used instead of an input field value.
“valueExpressionTitle”: Text describing the value returned from the ‘valueExpression’.
dot_value_optimization_enabled
Optional boolean. Indicates whether to enable dot value optimization. When enabled, the renderer attempts to find the best dot value for each polygon based on the polygon’s size and the number of dots rendered within it.
dot_blending_enabled
Optional boolean. Indicates whether to enable dot blending. When enabled, the renderer blends dots together where they overlap.
outline_optimization_enabled
Optional boolean. Indicates whether to enable outline optimization. When enabled, the renderer attempts to find the best outline color for each polygon based on the polygon’s size and the number of dots rendered within it.
scheme
Optional dictionary. A pre-defined dot density scheme. Use this parameter to avoid generating a new scheme based on the background of the Map.
# Example dictionary scheme = { "name": "Reds 5", "tags": ["Single Color", "Red"], "id": <themeName>/<basemapName>/<schemeName>, "colors": [ [255, 245, 240], [254, 224, 210], [252, 187, 161], [252, 146, 114], [222, 45, 38] ], "outline": { "color": [0, 0, 0, 0.5], "width": 0.75 }, "opacity": 0.75 }
for_binning
Optional boolean. Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
- heatmap_renderer(field: str | None = None, scheme: dict | None = None, statistics: dict | None = None, fade_ratio: float | None = None, fade_to_transparent: bool = True, radius: int | None = None, min_ratio: float | None = None, max_ratio: float | None = None) None
The HeatmapRenderer uses kernel density to render point features in FeatureLayers, CSVLayers, GeoJSONLayers and OGCFeatureLayers as a raster surface.
To create this visual, the HeatmapRenderer fits a smoothly curved surface over each point. The surface value is highest at the location of the point and decreases proportionally to the distance from the point, reaching zero at the distance from the point specified in radius. The value of the surface equals the field value for the point, or 1 if no field is provided. The density at each pixel is calculated by adding the values of all the kernel surfaces where they overlay.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
field
Optional string. The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. The value of the field is used as a multiplier in the heatmap, making areas with high field values hotter than areas where the features have low field values.
scheme
Optional dictionary. A pre-defined heatmap scheme. Use this parameter to avoid generating a new scheme based on the background of the Map.
# Example dictionary scheme = { "name": "Heatmap Blue 2", "tags": ["Heatmap", "Blue"], "id": <themeName>/<basemapName>/<schemeName>, "colors": [ [0, 0, 255, 0.2], [0, 0, 255, 0.4], [0, 0, 255, 0.6], [0, 0, 255, 0.8], [0, 0, 255, 1] ], opacity: 0.75 }
statistics
Optional dictionary. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server.
fade_ratio
Optional float. Indicates how much to fade the lower color stops with transparency to create a fuzzy boundary on the edge of the heatmap. A value of 0 makes a discrete boundary on the lower color stop.
fade_to_transparent
Optional boolean. Indicates whether to fade the lower color stops with transparency to create a fuzzy boundary on the edge of the heatmap. If False, the fade_ratio is ignored.
radius
Optional integer. The radius in points that determines the area of influence of each point. A higher radius indicates points have more influence on surrounding points.
min_ratio
Optional float. The minimum ratio used to normalize the heatmap intensity values.
max_ratio
Optional float. The maximum ratio used to normalize the heatmap intensity values.
- pie_chart_renderer(attributes: dict, shape: str | None = None, include_size_variable: bool | None = None, outline_optimization_enabled: bool = False, size_optimization_enabled: bool = False, scheme: dict | None = None, for_binning: bool | None = None) None
PieChartRenderer allows you to create a pie chart for each feature in the layer. The value and color of each pie slice is specified in the attributes property. You can vary the size of each pie based on data with any other field value or Arcade expression using visualVariables.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
attributes
Required list of dictionaries. A set of complementary numeric fields/expressions used to create the charts. For example, if creating an election map, you would indicate the name of each field representing the candidate or political party where their total counts are stored.
Keys: - “field”: The name of a numeric field. - “label” : The label used to describe the field in the Legend. - “valueExpression”: An Arcade expression following the specification
defined by the Arcade Visualization Profile. Expressions may reference field values using the $feature profile variable and must return a number. This property overrides the field property and therefore is used instead of an input field value.
“valueExpressionTitle”: Text describing the value returned from the ‘valueExpression’.
shape
Optional string. The shape used for the pie chart.
Values: “pie” | “donut”
include_size_variable
Optional boolean. Indicates whether to include data-driven size in the final renderer. If true, features will be assigned a sized based on the sum of all values in the attributes param. Features with small total counts will be sized with small charts and features with large total counts will be sized with large charts. Enabling this option is good for visualizing how influential a particular feature is compared to the dataset as a whole. It removes bias introduced by features with large geographic areas, but relatively small data values.
outline_optimization_enabled
Optional boolean. Only for polygon layers. Indicates whether the polygon’s background fill symbol outline width should vary based on view scale.
size_optimization_enabled
Optional boolean. Indicates whether symbol sizes should vary based on view scale.
scheme
Optional dictionary. A pre-defined pie chart scheme. Use this parameter to avoid generating a new scheme based on the background of the Map.
# Example dictionary scheme = { "name": "Reds 5", "tags": ["Single Color", "Red"], "colors": [ [255, 245, 240], [254, 224, 210], [252, 187, 161], [252, 146, 114], [222, 45, 38] ], "colorForOthersCategory": [200, 200, 200, 255], "outline": { "color": [0, 0, 0, 0.5], "width": 0.75 }, "size": 75, }
for_binning
Optional boolean. Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
- predominance_renderer(fields: list, include_opacity_variable: bool | None = None, include_size_variable: bool | None = None, outline_optimization_enabled: bool = False, size_optimization_enabled: bool = False, statistics: dict | None = None, sort_by: str | None = None, scheme: dict | None = None, default_symbol_enabled: bool | None = True, for_binning: bool | None = None) None
This object contains a helper method for generating a predominance visualization. Visualizing predominance involves coloring a layer’s features based on which attribute among a set of competing numeric attributes wins or beats the others in total count. Common applications of this include visualizing election results, survey results, and demographic majorities.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
fields
Required list of dictionaries. A set of competing numeric fields used as the basis of the predominance visualization. A minimum of 2 fields are required.
# Example list fields = [ { "name": "POP2010", "label": "Population 2010", (optional) }, { "name": "POP2011", "label": "Population 2011", (optional) }, ]
include_opacity_variable
Optional boolean. Indicates whether to include data-driven opacity in the final renderer. If true, features where the predominant value beats all others by a large margin are given a high opacity. Features where the predominant value beats others by a small margin will be assigned a low opacity, indicating that while the feature has a winning value, it doesn’t win by much.
include_size_variable
Optional boolean. Indicates whether to include data-driven size in the final renderer. If true, features will be assigned a sized based on the sum of all competing values in the fields param. Features with small total counts will be sized with small icons or lines depending on the geometry type of the layer, and features with large total counts will be sized with large icons or lines. Enabling this option is good for visualizing how influential a particular feature is compared to the dataset as a whole. It removes bias introduced by features with large geographic areas, but relatively small data values.
outline_optimization_enabled
Optional boolean. Indicates whether the polygon’s background fill symbol outline width should vary based on view scale. Only for polygon layers.
size_optimization_enabled
Optional boolean. Indicates whether symbol sizes should vary based on view scale.
statistics
Optional dictionary. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server.
sort_by
Optional string. Indicates how to sort the fields in the legend. If count, unique values/types will be sorted from highest to lowest based on the count of features that fall in each category. If value, unique values/types will be sorted in the order they were specified in the fields parameter.
Values: “count” | “value”
scheme
Optional dictionary. A pre-defined predominance scheme. Use this parameter to avoid generating a new scheme based on the background of the Map. For more information on what to include in the scheme see this url: https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-symbology-predominance.html#PredominanceScheme
default_symbol_enabled
Optional boolean. Enables the defaultSymbol on the renderer and assigns it to features with no value.
for_binning
Optional boolean. Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
- relationship_renderer(field1: dict, field2: dict, classification_method: str | None = None, focus: str | None = None, num_classes: int | None = None, outline_optimization_enabled: bool = False, size_optimization_enabled: bool = False, legend_options: dict | None = None, relationship_scheme: dict | None = None, default_symbol_enabled: bool = True, for_binning: bool | None = None) None
This method utilizes the JS API create_renderer method to create a relationship renderer. This can only be accomplished with a rendered map. A relationship renderer helps explore the relationship between two numeric fields. The relationship is visualized using a bivariate choropleth visualization. This renderer classifies each variable in either 2, 3, or 4 classes along separate color ramps.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
field1
Required dictionary. A numeric field that will be used to explore its relationship with field2. In the default visualization, the values of this field are rendered along the vertical axis of the Legend.
# Example dictionary field1 = { "field": "POP2010", #required "normalizationField": "SQMI", "maxValue": 1000000, "minValue": 1000, "label": "Population 2010", }
field2
Required dictionary. A numeric field that will be used to explore its relationship with field1. In the default visualization, the values of this field are rendered along the horizontal axis of the Legend.
classification_method
Optional string. The method for classifying each field’s data values. Values: “quantile”, “equal-interval”, “natural-breaks”
focus
Optional string. Determines the orientation of the Legend. This value does not change the renderer or symbology of any features in the layer. This affects the legend only. See the table at this link for more information.
Values: None, “HH”, “HL”, “LH”, “LL” If None, the legend renders as a square.
num_classes
Optional integer. Indicates the number of classes by which to break up the values of each field. More classes give you more detail, but more colors, making the visualization more difficult to understand. There are only three possible values: 2, 3, or 4.
outline_optimization_enabled
Optional boolean. For polygon layers only. Indicates whether the polygon outline width should vary based on view scale.
size_optimization_enabled
Optional boolean. For point and polyline layers only. Indicates whether symbol sizes should vary based on view scale.
legend_options
Optional dictionary. Provides options for modifying Legend properties describing the visualization.
# Example dictionary legend_options = { "title": "Population 2010", "showLegend": True, }
relationship_scheme
Optional dictionary. In authoring apps, the user may select a pre-defined relationship scheme. Pass the scheme object to this property to avoid getting one based on the background of the Map.
default_symbol_enabled
Optional boolean. Enables the defaultSymbol on the renderer and assigns it to features with no value or that fall outside of the prescribed class breaks.
for_binning
Optional boolean. Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
- unique_values_renderer(field: str | None = None, field2: str | None = None, field3: str | None = None, num_types: int | None = None, sort_by: str | None = None, value_expression: str | None = None, value_expression_title: str | None = None, outline_optimization_enabled: bool = False, size_optimization_enabled: bool = False, legend_options: dict | None = None, default_symbol_enabled: bool = True, statistics: dict | None = None, for_binning: bool | None = None) None
Generates data-driven visualizations with unique types (or categories) based on a field value from features in a Layer. This renderer works with Feature Layers, CSV Layers, GeoJSON Layers, WFS Layers, Oriented Imagery Layer, and OGC Feature Layers.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
field
Optional string. The name of the field from which to extract unique values that will be used for the basis of the data-driven visualization. This property is ignored if a valueExpression is used.
field2
Optional string. Specifies the name of a second attribute field used to categorize features. All combinations of field, field2, and field3 values are unique categories and may have their own symbol. This property is ignored if a valueExpression is used.
field3
Optional string. Specifies the name of a third attribute field used to categorize features. All combinations of field, field2, and field3 values are unique categories and may have their own symbol. This property is ignored if a valueExpression is used.
num_types
Optional integer. The number of unique types (or categories) displayed by teh renderer. Use -1 to display all unique types. The default is 10.
sort_by
Optional string. Indicates how to sort the fields in the legend. If count, unique values/types will be sorted from highest to lowest based on the count of features that fall in each category. If value, unique values/types will be sorted in the order they were specified in the fields parameter. If none, unique values/types will be returned in the same order they are defined in the statistics parameter or returned from the uniqueValues statistics query (if the statistics parameter is not defined).
Values: “count” | “value” | “none”
value_expression
Optional string. An Arcade expression following the specification defined by the Arcade Visualization Profile. Expressions may reference field values using the $feature profile variable and must return a number. This property overrides the field property and therefore is used instead of an input field value.
value_expression_title
Optional string. The title used to describe the value_expression in the Legend.
outline_optimization_enabled
Optional boolean. Indicates whether the polygon’s background fill symbol outline width should vary based on view scale. Only for polygon layers.
size_optimization_enabled
Optional boolean. Indicates whether symbol sizes should vary based on view scale.
legend_options
Optional dictionary. Options for configuring the legend.
# Example dictionary legend_options = { "title": <string>, }
default_symbol_enabled
Optional boolean. Enables the defaultSymbol on the renderer and assigns it to features with no value.
statistics
Optional dictionary. If statistics for the field have already been generated, then pass the object here to avoid making a second statistics query to the server.
for_binning
Optional boolean. Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
- univariate_color_size_renderer(field: str | None = None, normalization_field: str | None = None, value_expression: str | None = None, value_expression_title: str | None = None, theme: str | None = None, sql_expression: str | None = None, sql_where: str | None = None, statistics: dict | None = None, min_value: int | None = None, max_value: int | None = None, default_symbol_enabled: bool = None, color_options: dict | None = None, size_options: dict | None = None, symbol_options: dict | None = None, legend_options: dict | None = None, for_binning: bool | None = None) None
This method utilizes the JS API create_renderer method to create a univariate color and size renderer. This can only be accomplished with a rendered map. A univariate color and size renderer visualizes quantitative data by adjusting the color and size of each feature proportionally to a data value.
Executing this method will automatically update your layer renderer on the map.
Warning
There are a few points to note with this method: - You need to make sure that the layer has been loaded before calling this method. - The map can take a few seconds to reflect the changes from the renderer. - Calling the save or update method must be done in a separate cell from this method call due to asynchronous conflicts. - If you do not see the layer update, check the console log for any JavaScript errors.
Argument
Description
field
Optional string. The name of the field whose data will be queried for statistics and used for the basis of the data-driven visualization. If a value_expression is set, this field is ignored.
normalization_field
Optional string. The name of the field to normalize the values of the given field. Providing a normalization field helps minimize some visualization errors and standardizes the data so all features are visualized with minimal bias due to area differences or count variation. This option is commonly used when visualizing densities.
value_expression
Optional string. An Arcade expression following the specification defined by the Arcade Visualization Profile. Expressions may reference field values using the $feature profile variable and must return a number. This property overrides the field property and therefore is used instead of an input field value.
value_expression_title
Optional string. The title used to describe the value_expression in the Legend.
theme
Optional string. Sets the size stops and colors based on meaningful data values. For more information on each value, see the table at this link
Values: “high-to-low”, “above”, “below”, “above-and-below”
sql_expression
Optional string. A SQL expression evaluating to a number.
sql_where
Optional string. A where clause for the query. Used to filter features for the statistics query.
statistics
Optional dictionary. If statistics for the field have already been generated, then pass the dictionary here to avoid making a second statistics query to the server.
# Example dictionary statistics = { "average": <int>, "count": <int>, "max": <int>, "min": <int>, "median": <int>, "stddev": <int>, "sum": <int>, "variance": <int>, "nullCount": <int>, #optional }
min_value
Optional integer. A custom minimum value set by the user. Use this in conjunction with max_value to generate statistics between lower and upper bounds. This will be the lowest stop in the returned visual variables.
max_value
Optional integer. A custom maximum value set by the user. Use this in conjunction with min_value to generate statistics between lower and upper bounds. This will be the highest stop in the returned visual variables.
default_symbol_enabled
Optional boolean. Enables the defaultSymbol on the renderer and assigns it to features with no value or that fall outside of the prescribed class breaks.
color_options
Optional dictionary. Options for configuring the color portion of the visualization.
# Example dictionary color_options = { "colorScheme": {}, #depends on layer type "isContinuous": <boolean>, }
size_options
Optional dictionary. Options for configuring the size portion of the visualization.
# Example dictionary size_options = { "sizeScheme": {}, #depends on geometry type of layer "sizeOptimizationEnabled": <boolean>, }
symbol_options
Optional dictionary. Options for configuring the symbol with “above-and-below” theme.
‘symbolStyle’ Values: “caret”, “circle-caret”, “arrow”, “circle-arrow”, “plus-minus”, “circle-plus-minus”, “square”, “circle”, “triangle”, “happy-sad”, “thumb”
# Example dictionary symbol_options = { "symbolStyle": <string>, #see values above "symbols": { "above": <dict>, #symbol dictionary "below": <dict>, #symbol dictionary } }
legend_options
Optional dictionary. Options for configuring the legend.
# Example dictionary legend_options = { "title": <string>, "showLegend": <boolean>, }
for_binning
Optional boolean. Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
TimeSlider
- class arcgis.map.map_widget.TimeSlider(map)
A class that can be used to enable the time slider widget on a rendered Map. This class is most useful when used inside a Jupyter Lab environment.
Note
This class should now be created by a user but rather called through the time_slider property on a Map instance.
- property enabled: bool
The TimeSlider widget simplifies visualization of temporal data in your application.
Note
The TimeSlider widget is only available for layers that have time information enabled.
- time_extent(start_time: datetime | None = None, end_time: datetime | None = None, time_interval: dict | None = None, layer_idx: int = 0)
The
time_extent
is called when enabled = True and is the full time extent to display on the time slider.Parameter
Description
start_time
Optional
datetime.datetime
. The lower bound of the full time extent to display on the time slider.end_time
Optional
datetime.datetime
. The upper bound of the full time extent to display on the time slider.time_interval
Optional dict. The time interval to display on the time slider. The time interval is a dictionary with two keys: value and units. The interval is the number of units to display on the time slider. The units are the units of the interval.
layer_idx
Optional integer. The index of the layer in the webmap that the time extent should be applied to. If not specified, the time extent will be applied to the first layer in the webmap.
RendererManager
- class arcgis.map.renderers.RendererManager(**kwargs)
A class that defines the renderer found on a layer. Through this class you can edit the renderer and get information on it.
Note
This class should not be created by a user but rather called through the renderer method on a MapContent or GroupLayer instance.
- from_template(template: str) bool
This method will take a template and apply it to the current layer. The template should be a file that was exported from another layer using the to_template method.
- property renderer: SimpleRenderer | HeatmapRenderer | PredominanceRenderer | DotDensityRenderer | FlowRenderer | ClassBreaksRenderer | DictionaryRenderer | PieChartRenderer | VectorFieldRenderer
Get an instance of the Renderer dataclass found in the layer. :return: Renderer dataclass for the layer specified.
- smart_mapping() SmartMappingManager
Returns a SmartMappingManager object that can be used to create smart mapping visualizations.
Note
Requires the Map to be rendered in a Jupyter environment.
- to_template() bool
This method will take the current renderer and save it as an item resource on the Item. This will allow the renderer to be used in other web maps and applications. You can also share the renderer with other users. Use the Item’s Resource Manager to export the renderer to a file.
- Returns:
name of the resource that was added to the resources
OfflineMapAreaManager
- class arcgis.map.OfflineMapAreaManager(item: Item, gis: GIS)
The
OfflineMapAreaManager
is a helper class to manage offline map areas for a Web MapItem
. Objects of this class should not be initialized directly, but rather accessed using theoffline_areas
property on aMap
object.>>> from arcgis.gis import GIS >>> from arcgis.map import Map >>> gis = GIS(profile="your_Web_GIS_profile") >>> wm_item = gis.content.get("<web map id>") >>> wm_obj = Map(wm_item) >>> oma_mgr = wm_obj.offline_areas <arcgis.map.OfflineMapAreaManager at <memory_addr>>
Note
There are important concepts to understand about offline mapping before the properties and methods of this class will function properly. Both reference basemap and operational layers contained in a Web Map must be configured very specifically before they can be taken offline. See the documentation below for full details:
- create(area: str | list | dict[str, Any], item_properties: dict[str, Any] | None = None, folder: str | None = None, min_scale: int | None = None, max_scale: int | None = None, layers_to_ignore: list[str] | None = None, refresh_schedule: str = 'Never', refresh_rates: dict[str, int] | None = None, enable_updates: bool = False, ignore_layers: list[str] | None = None, tile_services: list[dict[str, str]] | None = None, future: bool = False) Item | PackagingJob
This method creates offline map area items and packages for ArcGIS Runtime powered applications to use. The method creates two different types of
Items
Map Area
items for the specified extent, bookmark, or polygonMap Area Packages
corresponding to the operational layer(s) and basemap layer(s) within the extent, bookmark or polygon area
Note
Packaging will fail if the size of the offline map area, when packaged, is larger than 4 GB.
If packaging fails, try using a smaller bookmark, extent or geometry for the area argument.
If the map contains feature layers that have attachments, you can exclude attachments from the offline package to decrease the package size.
If the map includes tile layers, use the tile_services argument to constrain the number of levels included in the resulting packages. This is typically required to reduce the tile package size for the basemap layer(s) in ArcGIS Enterprise.
Note
Only the owner of the Web Map item can create offline map areas.
Parameter
Description
area
Required bookmark, extent, or
Polygon
object. Specify as either:bookmark name
>>> wm_item = gis.content.get("<web map id>") >>> wm_obj = Map(wm_item) >>> wm_bookmarks = wm_obj.bookmarks >>> area = wm_bookmarks[0]
extent: as a list of coordinate pairs:
>>> area = [['xmin', 'ymin'], ['xmax', 'ymax']]
extent: as a dictionary:
>>> area = { 'xmin': <value>, 'ymin': <value>, 'xmax': <value>, 'ymax': <value>, 'spatialReference' : {'wkid' : <value>} }
polygon: as a
Polygon
object
Note
If spatial reference is not specified, it is assumed {‘wkid’: 4326}. Make sure this is the same as the spatial reference of the web map, otherwise the creation will fail.
item_properties
Required dictionary. See table below for the keys and values.
folder
Optional string. Specify a folder name if you want the offline map area item and the packages to be created inside a folder.
Note
These items will not display when viewing the content folder in a web browser. They will display in the Portal tab of the Content Pane in ArcGIS Pro.
min_scale
Optional integer. Specify the minimum scale to cache tile and vector tile layers. When zoomed out beyond this scale, cached layers would not display.
Note
The
min_scale
value is always larger than themax_scale
.max_scale
Optional integer. Specify the maximum scale to cache tile and vector tile layers. When zoomed in beyond this scale, cached layers would not display.
layers_to_ignore
Optional List of layer objects to exclude when creating offline packages. You can get the list of layers in a web map by calling the layers property on the MapContent object.
refresh_schedule
Optional string. Allows for the scheduling of refreshes at given times.
The following are valid variables:
Never
- never refreshes the offline package (default)Daily
- refreshes everydayWeekly
- refreshes once a weekMonthly
- refreshes once a month
refresh_rates
Optional dict. This parameter allows for the customization of the scheduler. The dictionary accepts the following:
{ "hour" : 1 "minute" = 0 "nthday" = 3 "day_of_week" = 0 }
hour - a value between 0-23 (integers)
minute - a value between 0-60 (integers)
nthday - this is used for monthly only. Thw refresh will occur on the ‘n’ day of the month.
day_of_week - a value between 0-6 where 0 is Sunday and 6 is Saturday.
# Example **Daily**: every day at 10:30 AM UTC >>> refresh_rates = { "hour": 10, "minute" : 30 } # Example **Weekly**: every Wednesday at 11:59 PM UTC >>> refresh_rates = { "hour" : 23, "minute" : 59, "day_of_week" : 4 }
enable_updates
Optional Boolean. Allows for the updating of the layers.
ignore_layers
Optional List. A list of individual layers, specified with their service URLs, in the map to ignore. The task generates packages for all map layers by default.
Note
Deprecated, use layers_to_ignore instead.
tile_services
Optional List. An list of Python dictionary objects that contains information about the export tiles-enabled services for which tile packages (.tpk or .vtpk) need to be created. Each tile service is specified with its url and desired level of details.
>>> tile_services = [ { "url": "https://tiledbasemaps.arcgis.com/arcgis/rest/services/World_Imagery/MapServer", "levels": "17,18,19" }
Note
This argument should be specified when using ArcGIS Enterprise items. The number of levels included greatly impacts the overall size of the resulting packages to keep them under the 2.5 GB limit.
future
Optional boolean. If True, a future object will be returned and the process will return control to the user before the task completes. If False, control returns once the operation completes. The default is False.
Key:Value Dictionary options for argument
item_properties
Key
Value
description
Optional string. Description of the item.
title
Optional string. Name label of the item.
tags
Optional string of comma-separated values, or a list of strings for each tag.
snippet
Optional string. Provide a short summary (limit to max 250 characters) of the what the item is.
- Returns:
Map Area
Item
, or if future=True, aPackagingJob
object to further query for results.
# USAGE EXAMPLE #1: Creating offline map areas using *scale* argument >>> from arcgis.gis import GIS >>> from arcgis.map import Map >>> gis = GIS(profile="your_online_organization_profile") >>> wm_item = gis.content.get("<web_map_id>") >>> wm_obj = Map(wm_item) >>> item_prop = {"title": "Clear lake hyperspectral field campaign", "snippet": "Offline package for field data collection using spectro-radiometer", "tags": ["python api", "in-situ data", "field data collection"]} >>> aviris_layer = wm_item.content.layers[-1] >>> north_bed = wm_obj.bookmarks.list[-1].name >>> wm.offline_areas.create(area=north_bed, item_properties=item_prop, folder="clear_lake", min_scale=9000, max_scale=4500, layers_to_ignore=[aviris_layer]) # USAGE Example #2: ArcGIS Enterprise web map specifying *tile_services* >>> gis = GIS(profile="your_enterprise_profile") >>> wm_item = gis.content.get("<item_id>") >>> wm_obj = Map(wm_item) # Enterprise: Get the url for tile services from basemap >>> basemap_lyrs = wm_obj.basemap.basemap["baseMapLayers"] >>> basemap_lyrs [ {'id': '18d9e5e151c-layer-2', 'title': 'Light_Gray_Export_AGOL_Group', 'itemId': '042f5e5aadcb8dbd910ae310b1f26d18', 'layerType': 'VectorTileLayer', 'styleUrl': 'https:/example.com/portal/sharing/servers/042f5e5aadcb8dbd910ae310b1f26d1/rest/services/World_Basemap_Export_v2/VectorTileServer/resources/styles/root.json'} ] # Get the specific Tile Layer item to see options for levels >>> vtl_item = gis.content.get(basemap_lyrs[0]["itemId"]) >>> vtl_lyr = vtl_item.layers[0] >>> print(f"min levels: {vtl_lyr.properties['minLOD']}") >>> print(f"max levels: {vtl_lyr.properties['maxLOD']}") min levels: 0 max levels: 16 >>> vtl_svc_url = vtl_item.layers[0].url >>> vtl_svc_url https:/example.com/portal/sharing/servers/042f5e5aadcb8dbd910ae310b1f26d1/rest/services/World_Basemap_Export_v2/VectorTileServer # Get a list of bookmark names to iterate through >>> bookmarks = wm_obj.bookmarks.list() >>> bkmrk_names = [bookmark.name for bookmark in bookmarks] >>> bname = bkmrk_names[1] >>> oma = offline_mgr.create(area=bname, item_properties={"title": bname + "_OMA", "tags": "offline_mapping,administrative boundaries,parks", "snippet": bname + " in County", "description": "Offline mapping area in " + bname + " for sync"}, tile_services=[{"url": vtl_svc_url, "levels": "6,7,8,9,10,11,12,13"}]) >>> oma <Item title:"County_OMA" type:Map Area owner:gis_user> >>> # List packages created: >>> for oma_pkg in oma.related_items("Area2Package", "forward"): >>> print(f"{oma_pkg.title:60}{oma_pkg.type}") <County_Layer-<id_string> SQLite Geodatabase <VectorTileServe-<id_string> Vector Tile Package
Note
This method executes silently. To view informative status messages, set the verbosity environment variable as shown below prior to running the method:
# USAGE EXAMPLE: setting verbosity >>> from arcgis import env >>> env.verbose = True
- list() list
Retrieves a list of all Map Area items for the
Map
object.Note
Map Area items and the corresponding offline packages share a relationship of type Area2Package. You can use this relationship to get the list of package items cached for each map area item. Refer to the Python snippet below for the steps:
# USAGE EXAMPLE: Listing Map Area Items >>> from arcgis.gis import GIS >>> from arcgis.map import Map >>> wm_item = gis.content.search("*", "Web Map")[0] >>> wm_obj = Map(wm_item) >>> all_map_areas = wm.offline_areas.list() >>> all_map_areas [<Item title:"Ballerup_OMA", type:Map Area owner:gis_user1>, <Item title:"Viborg_OMA", type:Map Area owner:gis_user1>] # USAGE Example: Inspecting Map Area packages >>> area1 = all_map_areas[0] >>> area1_packages = area1.related_items("Area2Package","forward") >>> for pkg in area1_packages: >>> print(f"{pkg.title}") <<< print(f"{' ' * 2}{pkg.type}") >>> print(f"{' ' * 2}{pkg.homepage}") VectorTileServe-<value_string> Vector Tile Package https://<organziation_url>/home/item.html?id=<item_id> DK_lau_data-<value_string> SQLite Geodatabase https://organization_url/home/item.html?id=<item_id>
- Returns:
A List of Map Area :class`items <arcgis.gis.Item>` related to the Web Map item.
- modify_refresh_schedule(item: Item, refresh_schedule: str | None = None, refresh_rates: dict[str, int] | None = None)
The
modify_refresh_schedule
method modifies an existing offline package’s refresh schedule.Parameter
Description
item
Required
Item
object. This is the Offline Package to update the refresh schedule.refresh_schedule
Optional String. This is the rate of refreshing.
The following are valid variables:
Never - never refreshes the offline package (default)
Daily - refreshes everyday
Weekly - refreshes once a week
Monthly - refreshes once a month
refresh_rates
Optional dict. This parameter allows for the customization of the scheduler. Note all time is in UTC.
The dictionary accepts the following:
{ “hour” : 1 “minute” = 0 “nthday” = 3 “day_of_week” = 0 }
hour - a value between 0-23 (integers)
minute a value between 0-60 (integers)
nthday - this is used for monthly only. This say the refresh will occur on the ‘x’ day of the month.
day_of_week - a value between 0-6 where 0 is Sunday and 6 is Saturday.
Example Daily:
{ “hour”: 10, “minute” : 30 }
This means every day at 10:30 AM UTC
Example Weekly:
{ “hour” : 23, “minute” : 59, “day_of_week” : 4 }
This means every Wednesday at 11:59 PM UTC
- Returns:
A boolean indicating success (True), or failure (False)
## Updates Offline Package Building Everyday at 10:30 AM UTC gis = GIS(profile='owner_profile') item = gis.content.get('9b93887c640a4c278765982aa2ec999c') oa = wm.offline_areas.modify_refresh_schedule(item.id, 'daily', {'hour' : 10, 'minute' : 30})
- property offline_properties: dict
This property allows users to configure the offline properties for a webmap. The offline_properties allows for defining how available offline editing, basemap, and read-only layers behave in the web map application. For further reading about concepts for working with web maps offline, see Configure the map to work offline. Also, see the applicationProperties object in the Web Map specification.
Parameter
Description
values
Required Dict. The key/value pairs that define the offline application properties.
The dictionary supports the following keys:
Key
Values
download
Optional string. Possible values:
None
features
features_and_attachments
When editing layers, the edits are always sent to the server. This string argument indicates which data is retrieved from the server.
If argument is None - only the schema is written since neither features nor attachments are retrieved
If argument is features - a full sync without downloading attachments occurs
If argument is features_and_attachments, which is the Default - both features and attachments are retrieved
sync
sync applies to editing layers only. This string value indicates how the data is synced:
sync_features_and_attachments
- bidirectional syncsync_features_upload_attachments
- bidirectional sync for features but upload only for attachmentsupload_features_and_attachments
- upload only for both features and attachments (initial replica is just a schema)
reference_basemap
The filename of a basemap that has been copied to a mobile device. This can be used instead of the default basemap for the map to reduce downloads.
get_attachments
Boolean value that indicates whether to include attachments with the read-only data.
- Returns:
Dictionary
# USAGE EXAMPLE >>> from arcgis.gis import GIS >>> from arcgis.map import Map >>> wm_item = gis.content.get("<web_map_id>") >>> wm_obj = Map(wm_item) >>> offline_mgr = wm_obj.offline_areas >>> offline_mgr.offline_properties = {"download": "features", "sync": "sync_features_upload_attachments"}
- update(offline_map_area_items: list | None = None, future: bool = False) dict | PackagingJob | None
The
update
method refreshes existing map area packages associated with each of theMap Area
items specified. This process updates the packages with changes made on the source data since the last time those packages were created or refreshed. See Refresh Map Area Package for more information.Parameter
Description
offline_map_area_items
Optional list. Specify one or more Map Area
items
for which the packages need to be refreshed. If not specified, this method updates all the packages associated with all the map area items of the web map.Note
To get the list of
Map Area
items related to the Map object, call thelist()
method on theOfflineMapAreaManager
for the Map.future
Optional Boolean.
- Returns:
Dictionary containing update status.
Note
This method executes silently. To view informative status messages, set the verbosity environment variable as shown below before running the code:
USAGE EXAMPLE: setting verbosity from arcgis import env env.verbose = True
Dataclasses
Popups
PopupManager
- class arcgis.map.popups.PopupManager(**kwargs: dict[str, Any])
A class that defines the popup found on a layer. Through this class you can edit the popup and get information on it.
Note
This class should not be created by a user but rather called through the popup method on a MapContent or GroupLayer instance.
- property disable_popup: bool
Determine whether the popup is enabled for the layer, meaning it is visible when the map is rendered.
Set whether the popup is enabled for the layer.
Parameter
Definition
value
Required bool. Whether the popup is enabled for the layer. If True, the popup is not visible when the map is rendered.
- edit(title: str | None = None, description: str | None = None, expression_infos: list[PopupExpressionInfo] | None = None, field_infos: list[FieldInfo] | None = None, layer_options: LayerOptions | None = None, media_infos: list[MediaInfo] | None = None, popup_elements: list[PopupElementAttachments | PopupElementExpression | PopupElementFields | PopupElementMedia | PopupElementRelationship | PopupElementText] | None = None, show_attachments: bool | None = None) bool
Edit the properties of the popup. If no popup info exists then it will create a popup for the layer. To remove any existing items from the popup, pass in an empty instance of the parameter. For example to remove the title, pass an empty string or to remove the field_infos pass an empty list. If the parameter is set to None then nothing will change for that parameter.
Parameter
Definition
title
Optional string. Appears at the top of the popup window as a title.
description
Optional string. Appears in the body of the popup window as a description.
expression_infos
Optional list of PopupExpressionInfo objects. List of Arcade expressions added to the pop-up.
field_infos
Optional list of FieldInfo objects. Array of fieldInfo information properties. This information is provided by the service layer definition. When the description uses name/value pairs, the order of the array is how the fields display in the editable Map Viewer popup and the resulting popup. It is also possible to specify HTML-formatted content.
layer_options
Optional LayerOptions class.
media_infos
Optional list of MediaInfo objects. Array of various mediaInfo to display.
popup_elements
Optional list of PopupElement objects. An array of popupElement objects that represent an ordered list of popup elements.
show_attachments
Optional bool. Indicates whether attachments will be loaded for feature layers that have attachments.
- property info: PopupInfo | None
Return the popup info for your layer. If no popup info is present then the value is None.
Set the popup info for your layer.
Parameter
Definition
value
Required PopupInfo object. The new popup info for the layer.
ArcadeReturnType
- class arcgis.map.popups.ArcadeReturnType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Return type of the Arcade expression. This can be determined by the authoring client by executing the expression using a sample feature(s), although it can be corrected by the user.
AssociationType
- class arcgis.map.popups.AssociationType(*, associatedAssetGroup: int | None = None, associatedAssetType: int | None = None, associatedNetworkSourceId: int | None = None, description: str | None = None, title: str | None = None, type: AssociationTypes)
Bases:
BaseModel
Object defining the type of associations to display in the pop-up. Used with Utility Network layers.
- field associated_asset_group: int | None = None
The id of the asset group to filter utility network associations.
- field associated_asset_type: int | None = None
The id of the asset type to filter utility network associations.
- field associated_network_source_id: int | None = None
The id of the network source to filter utility network associations.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'populate_by_name': True, 'use_enum_values': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'associated_asset_group': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, alias='associatedAssetGroup', alias_priority=2, description='The id of the asset group to filter utility network associations.'), 'associated_asset_type': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, alias='associatedAssetType', alias_priority=2, description='The id of the asset type to filter utility network associations.'), 'associated_network_source_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, alias='associatedNetworkSourceId', alias_priority=2, description='The id of the network source to filter utility network associations.'), 'description': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='A string that describes the element in detail.'), 'title': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='A string value indicating what the element represents.'), 'type': FieldInfo(annotation=AssociationTypes, required=True, description='String value indicating which type of element to use.')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
AttachmentDisplayType
- class arcgis.map.popups.AttachmentDisplayType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
This property applies to elements of type attachments. A string value indicating how to display the attachment. If list is specified, attachments show as links. If preview is specified, attachments expand to the width of the pop-up. The default auto setting allows applications to choose the most suitable default experience.
DateFormat
FieldInfo
- pydantic model arcgis.map.popups.FieldInfo
Defines how a field in the dataset participates (or does not participate) in a popup window.
- field format: Format | None = None
A format object used with numerical or date fields to provide more detail about how the value should be displayed in a web map popup window.
- field is_editable: bool | None = True
A Boolean determining whether users can edit this field. Not applicable to Arcade expressions.
- field label: str | None = None
A string containing the field alias. This can be overridden by the web map author. Not applicable to Arcade expressions as title is used instead.
- field statistic_type: StatisticType | None = None
Used in a 1:many or many:many relationship to compute the statistics on the field to show in the popup.
- field string_field_option: StringFieldOption | None = None
A string determining what type of input box editors see when editing the field. Applies only to string fields. Not applicable to Arcade expressions.
Format
- pydantic model arcgis.map.popups.Format
The format object can be used with numerical or date fields to provide more detail about how values should be formatted for display.
- field date_format: DateFormat | None = None
A string used with date fields to specify how the date should be formatted.
LayerOptions
MediaInfo
- pydantic model arcgis.map.popups.MediaInfo
Defines an image or a chart to be displayed in a popup window.
- field refresh_interval: float | int | None = 0
Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled. If the property does not exist, it’s equivalent to having a value of 0. Only applicable when type is set to image.
- field type: MediaType | None = None
A string defining the type of media.
- field value: Value | None = None
A value object containing information about how the image should be retrieved or how the chart should be constructed.
MediaType
Order
OrderByField
- pydantic model arcgis.map.popups.OrderByField
Object defining the display order of features or records based on a field value, and whether they should be sorted in ascending or descending order.
- field order: Order [Required]
Indicates whether features are sorted in ascending or descending order of the field values.
PopupElementAttachments
- pydantic model arcgis.map.popups.PopupElementAttachments
Configures attachments in popup elements.
- field display_type: AttachmentDisplayType | None = None
This property applies to elements of type attachments. A string value indicating how to display the attachment. If list is specified, attachments show as links. If preview is specified, attachments expand to the width of the pop-up. The default auto setting allows applications to choose the most suitable default experience.
PopupElementExpression
- pydantic model arcgis.map.popups.PopupElementExpression
A pop-up element defined by an arcade expression.
- field expression_info: PopupExpressionInfo [Required]
An Arcade expression that defines the pop-up element content. The return type will always be dictionary as outlined [in the Arcade documentation](https://developers.arcgis.com/arcade/guide/profiles/#popup-element).
PopupElementFields
- pydantic model arcgis.map.popups.PopupElementFields
Configures fields in popup elements.
- field attributes: dict[str, Any] | None = None
A dictionary of key value pairs representing attributes to be used instead of fields and their values. This property is only used when an element of type fields is being returned inside an element of type expression and should be returned as part of the arcade expression itself. This property allows passing arcade derived attribute values into fields elements. More details can be found [here](https://developers.arcgis.com/arcade/guide/profiles/#popup-element).
- field field_infos: list[FieldInfo] | None = None
It is an array of fieldInfo objects representing a field/value pair displayed as a table within the popupElement. If the fieldInfos property is not provided, the popupElement will display whatever is specified directly in the popupInfo.fieldInfos property.
PopupElementMedia
- pydantic model arcgis.map.popups.PopupElementMedia
Configures media in popup elements.
- field attributes: dict[str, Any] | None = None
A dictionary of key value pairs representing attributes to be used instead of fields and their values. This property is only used when an element of type media is being returned inside an element of type expression and should be returned as part of the arcade expression itself. This property allows passing arcade derived attribute values into mediaInfos such as charts. More details can be found [here](https://developers.arcgis.com/arcade/guide/profiles/#popup-element).
- field media_infos: list[MediaInfo] | None = None
An array of mediaInfo objects representing an image or chart for display. If no mediaInfos property is provided, the popupElement will display whatever is specified in the popupInfo.mediaInfos property.
PopupElementRelationship
- pydantic model arcgis.map.popups.PopupElementRelationship
Provides the ability to navigate and view related records from a layer or table associated within the popup.
- field display_count: int | None = None
An integer that indicates the maximum number of records to display.
- field display_type: Literal['list'] = 'list'
A string that defines how the related records should be displayed.
- field order_by_fields: list[OrderByField] | None = None
Array of orderByField objects indicating the display order for the related records, and whether they should be sorted in ascending ‘asc’ or descending ‘desc’ order. If orderByFields is not provided, the popupElement will display whatever is specified directly in the popupInfo.relatedRecordsInfo.orderByFields property.
PopupElementText
- pydantic model arcgis.map.popups.PopupElementText
Configures text in popup elements.
PopupElementUtilityNetworkAssociations
- pydantic model arcgis.map.popups.PopupElementUtilityNetworkAssociations
Provides the ability to navigate and view associated objects from a layer or table associated within the [pop-up](popupInfo.md).
- field association_types: list[AssociationType] | None [Required]
An array of associationType objects that represent the utility network associations.
PopupExpressionInfo
- pydantic model arcgis.map.popups.PopupExpressionInfo
An Arcade expression that defines the pop-up element content. The return type will always be a dictionary that defines the desired pop-up element as outlined [in the Arcade documentation](https://developers.arcgis.com/arcade/guide/profiles/#popup-element).
- field return_type: ArcadeReturnType | None = 'string'
Optional return type of the Arcade expression. Defaults to string value. Number values are assumed to be double. This can be determined by the authoring client by executing the expression using a sample feature, although it can be corrected by the user. Knowing the returnType allows the authoring client to present fields in relevant contexts. For example, numeric fields in numeric contexts such as charts.
PopupInfo
- pydantic model arcgis.map.popups.PopupInfo
Defines the look and feel of popup windows when a user clicks or queries a feature.
- field description: str | None = None
A string that appears in the body of the popup window as a description. A basic subset of HTML may also be used to enrich the text. The supported HTML for ArcGIS Online can be seen in the [Supported HTML](https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm) page.
- field expression_infos: list[PopupExpressionInfo] | None = None
List of Arcade expressions added to the pop-up.
- field field_infos: list[FieldInfo] | None = None
Array of FieldInfo information properties. This information is provided by the service layer definition. When the description uses name/value pairs, the order of the array is how the fields display in the editable Map Viewer popup and the resulting popup. It is also possible to specify HTML-formatted content.
- field layer_options: LayerOptions | None = None
Additional options that can be defined for the popup layer.
- field media_infos: list[MediaInfo] | None = None
Array of various mediaInfo to display. Can be of type image, piechart, barchart, columnchart, or linechart. The order given is the order in which is displays.
- field popup_elements: list[PopupElementAttachments | PopupElementExpression | PopupElementFields | PopupElementMedia | PopupElementRelationship | PopupElementText | PopupElementUtilityNetworkAssociations] | None = None
An array of popupElement objects that represent an ordered list of popup elements.
Applicable only when the pop-up contains a relationship content element. This is needed for backward compatibility for some web maps.
- field show_attachments: bool | None = None
Indicates whether attachments will be loaded for feature layers that have attachments.
StatisticType
StringFieldOption
Value
- pydantic model arcgis.map.popups.Value
The value object contains information for popup windows about how images should be retrieved or charts constructed.
- field colors: list[list[Annotated[int, Field(ge=0, le=255)]]] | None = None
Used with charts. An optional array of colors where each color sequentially corresponds to a field in the fields property. When the value for mediaInfo.type is linechart, the first color in the array will drive the line color. If colors is longer than fields, unmatched colors are ignored. If colors is shorter than fields or colors isn’t specified, a default color ramp is applied.
- field fields: list[str] | None = None
Used with charts. An array of strings, with each string containing the name of a field to display in the chart.
- field link_url: str | None = None
Used with images. A string containing a URL to be launched in a browser when a user clicks the image.
Symbols
Anchor
Border
- pydantic model arcgis.map.symbols.Border
Optional border on the line that is used to improve the contrast of the line color against various background colors.
Callout
- pydantic model arcgis.map.symbols.Callout
Callout configuration for a symbol.
- field border: Border | None = None
CimSymbolReference
Decoration
ExtrudeSymbol3DLayer
- pydantic model arcgis.map.symbols.ExtrudeSymbol3DLayer
ExtrudeSymbol3DLayer is used to render Polygon geometries by extruding them upward from the ground, creating a 3D volumetric object.
- field cast_shadows: bool | None = True
Boolean to control the shadow casting behavior of the rendered geometries.
- field edges: SketchEdges | SolidEdges | None = None
Specifies an edge visualization style.
- field material: Material | None = None
FillSymbol3DLayer
- pydantic model arcgis.map.symbols.FillSymbol3DLayer
FillSymbol3DLayer is used to render the surfaces of flat 2D Polygon geometries and 3D volumetric meshes in a SceneView.
- field cast_shadows: bool | None = True
Boolean to control the shadow casting behavior of the rendered geometries (only applies to MeshSymbol3D).
- field edges: SketchEdges | SolidEdges | None = None
Specifies an edge visualization style (only applies to MeshSymbol3D). Edges describe the style applied to visually important edges of 3D objects.
- field material: Material | None = None
- field outline: Outline | None = None
The outline of the symbol layer (only applies to PolygonSymbol3D).
- field pattern: Pattern | None = None
Font
Halo
- pydantic model arcgis.map.symbols.Halo
Halo definition.
HorizontalAlignment
IconSymbol3DLayer
- pydantic model arcgis.map.symbols.IconSymbol3DLayer
IconSymbol3DLayer is used to render Point geometries using a flat 2D icon (e.g. a circle) with a PointSymbol3D in a SceneView.
- field anchor: Anchor | None = 'center'
- field anchor_position: list[float] | None = None
When anchor equals relative, this property specifies the position within the icon that should coincide with the feature geometry. Otherwise it is ignored. The position is defined as a factor of the icon dimensions that is added to the icon center: positionInIcon = (0.5 + anchorPosition) * size, where size is the original size of the icon resource.
- Constraints:
min_length = 2
max_length = 2
- field material: Material | None = None
- field outline: Outline | None = None
Sets properties of the outline of the IconSymbol3DLayer.
- field resource: IconSymbol3DLayerResource | None = None
The shape (primitive) or image URL (href) used to visualize the features.
IconSymbol3DLayerResource
- pydantic model arcgis.map.symbols.IconSymbol3DLayerResource
The shape (primitive) or image URL (href) used to visualize the features.
- field data_uri: constr(pattern='^data:image/(.|\\n|\\r)+$') | None = None
an image encoded as base64 string, starting with data:image/
- field href: constr(pattern='^https?://.+$') | constr(pattern='^\\./.+$') | None = None
URL to the returned image.
- field primitive: Primitive = None
Specifies the type of symbol used.
Join
LineCap
Pattern
- pydantic model arcgis.map.symbols.Pattern
The pattern used to render the fill of the polygon (only applies to PolygonSymbol3D).
- field style: PolygonStyle [Required]
String value representing predefined styles that can be set as polygon fills.
Style
LineSymbol3D
- pydantic model arcgis.map.symbols.LineSymbol3D
LineSymbol3D is used to render features with Polyline geometry in a 3D SceneView.
- field style_origin: StyleOrigin | None = None
The origin of the style from which the symbol was originally referenced. A reference to the style origin can be either by styleName or by styleUrl (but not both). It may be used to understand where a symbol was originally sourced from, but does not affect actual appearance or rendering of the symbol.
- field symbol_layers: list[LineSymbol3DLayer | PathSymbol3DLayer] [Required]
A Collection of Symbol3DLayer objects used to visualize the graphic or feature.
LineSymbol3DLayer
- pydantic model arcgis.map.symbols.LineSymbol3DLayer
LineSymbol3DLayer renders Polyline geometries using a flat 2D line with a LineSymbol3D in a 3D SceneView.
- field cap: LineCap | str | None = 'butt'
- field join: Join | None = 'miter'
Shape of the intersection of two line segments.
- field material: Material | None = None
Marker
- pydantic model arcgis.map.symbols.Marker
Represents markers placed along the line. Markers will have the same color as the line, and their size will be proportional to the width of the line.
- field placement: MarkerPlacement | None = None
Indicates where the marker is placed.
MarkerPlacement
MarkerStyle
Material
- pydantic model arcgis.map.symbols.Material
The material used to shade the geometry.
MeshSymbol3D
- pydantic model arcgis.map.symbols.MeshSymbol3D
MeshSymbol3D is used to render 3D mesh features in a SceneLayer in a 3D SceneView.
- field style_origin: StyleOrigin | None = None
The origin of the style from which the symbol was originally referenced. A reference to the style origin can be either by styleName or by styleUrl (but not both). It may be used to understand where a symbol was originally sourced from, but does not affect actual appearance or rendering of the symbol.
- field symbol_layers: list[FillSymbol3DLayer] [Required]
A Collection of Symbol3DLayer objects used to visualize the graphic or feature.
ObjectSymbol3DLayer
- pydantic model arcgis.map.symbols.ObjectSymbol3DLayer
ObjectSymbol3DLayer is used to render Point geometries using a volumetric 3D shape (e.g., a sphere or cylinder) with a Symbol3D in a SceneView.
- field anchor: Anchor | None = 'origin'
The positioning of the object relative to the geometry.
- field anchor_position: list[float] | None = None
When anchor equals relative, this property specifies the positioning of the object relative to the geometry as a fraction of the symbol layer’s bounding box. Otherwise it is ignored.
- Constraints:
min_length = 3
max_length = 3
- field cast_shadows: bool | None = True
Boolean to control the shadow casting behavior of the rendered geometries.
- field heading: float | None = None
Rotation angle around Z axis in degrees. At 0 degrees, the model points in the direction of the Y-axis. Positive values indicate clockwise rotation (when looked at from the top). [Detailed description](static/objectSymbolLayerOrientation.md).
- field material: Material | None = None
- field resource: ObjectSymbol3DLayerResource | None = None
The primitive shape (primitive) or external 3D model (href) used to visualize the points.
- field roll: float | None = None
Rotation angle around Y axis in degrees. At 0 degrees, the model is level. A positive value lifts the left part and lowers the right part of the model. [Detailed description](static/objectSymbolLayerOrientation.md).
ObjectSymbol3DLayerResource
- pydantic model arcgis.map.symbols.ObjectSymbol3DLayerResource
The primitive shape (primitive) or external 3D model (href) used to visualize the points.
- field primitive: Primitive [Required]
Outline
- pydantic model arcgis.map.symbols.Outline
The outline of the symbol layer.
- field color: list[confloat(ge=0, le=255)] = None
Color is represented as a three or four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field pattern_cap: LineCap | None = LineCap.butt
PathCap
PathSymbol3DLayer
- pydantic model arcgis.map.symbols.PathSymbol3DLayer
PathSymbol3DLayer renders polyline geometries by extruding a 2D profile along the line, resulting in visualizations like tubes, walls, etc.
- field anchor: Anchor | None = 'center'
The position of the extrusion profile with respect to the polyline geometry.
- field cap: PathCap | None = 'butt'
- field cast_shadows: bool | None = True
Boolean to control the shadow casting behavior of the rendered geometries.
- field height: confloat(ge=0.0) [Required]
Path height in meters. If unspecified, it is equal to width.
- Constraints:
ge = 0.0
- field join: Join | None = 'miter'
Shape of the intersection of two line segments.
- field material: Material | None = None
- field profile: Profile | None = 'circle'
The shape which is extruded along the line.
- field profile_rotation: ProfileRotation | None = 'all'
Specifies the axes about which the profile may be rotated at the joins. Constraining the rotation axes leads to a fixed orientation of the profile for the specified directions.
Pattern
- pydantic model arcgis.map.symbols.Pattern
The pattern used to render the fill of the polygon (only applies to PolygonSymbol3D).
- field style: PolygonStyle [Required]
String value representing predefined styles that can be set as polygon fills.
PictureFillSymbolsEsriPFS
PictureMarkerSymbolEsriPMS
- pydantic model arcgis.map.symbols.PictureMarkerSymbolEsriPMS
Picture marker symbols can be used to symbolize point geometries.
- field angle: Annotated[float, Field(ge=0.0, le=360.0)] | None = None
Numeric value that defines the number of degrees ranging from 0-360, that a marker symbol is rotated. The rotation is from East in a counter-clockwise direction where East is the 0� axis.
- field height: float | int | None = None
Numeric value used if needing to resize the symbol. Specify a value in points. If images are to be displayed in their original size, leave this blank.
- field url: str | None = None
String value indicating the URL of the image. The URL should be relative if working with static layers. A full URL should be used for map service dynamic layers. A relative URL can be dereferenced by accessing the map layer image resource or the feature layer image resource.
- field width: float | int | None = None
Numeric value used if needing to resize the symbol. Specify a value in points. If images are to be displayed in their original size, leave this blank.
Placement
PointSymbol3D
- pydantic model arcgis.map.symbols.PointSymbol3D
PointSymbol3D is used to render features with Point geometry in a 3D SceneView.
- field callout: Callout | None = None
- field style_origin: StyleOrigin | None = None
The origin of the style from which the symbol was originally referenced. A reference to the style origin can be either by styleName or by styleUrl (but not both). It may be used to understand where a symbol was originally sourced from, but does not affect actual appearance or rendering of the symbol.
- field symbol_layers: list[IconSymbol3DLayer | ObjectSymbol3DLayer | TextSymbol3DLayer] [Required]
A Collection of Symbol3DLayer objects used to visualize the graphic or feature.
- field vertical_offset: VerticalOffset | None = None
PolygonStyle
PolygonSymbol3D
- pydantic model arcgis.map.symbols.PolygonSymbol3D
PolygonSymbol3D is used to render features with Polygon geometry in a 3D SceneView. Polygon features may also be rendered as points with icons or objects at the centroid of each polygon.
- field style_origin: StyleOrigin | None = None
The origin of the style from which the symbol was originally referenced. A reference to the style origin can be either by styleName or by styleUrl (but not both). It may be used to understand where a symbol was originally sourced from, but does not affect actual appearance or rendering of the symbol.
- field symbol_layers: list[ExtrudeSymbol3DLayer | FillSymbol3DLayer | IconSymbol3DLayer | LineSymbol3DLayer | ObjectSymbol3DLayer | TextSymbol3DLayer | WaterSymbol3DLayer] [Required]
A Collection of Symbol3DLayer objects used to visualize the graphic or feature.
Primitive
Profile
ProfileRotation
- class arcgis.map.symbols.ProfileRotation(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Specifies the axes about which the profile may be rotated at the joins. Constraining the rotation axes leads to a fixed orientation of the profile for the specified directions.
SimpleFillSymbolEsriSFS
- pydantic model arcgis.map.symbols.SimpleFillSymbolEsriSFS
Simple fill symbols that can be used to symbolize polygon geometries.
- field color: list[confloat(ge=0, le=255)] | None = None
Color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field outline: SimpleLineSymbolEsriSLS | None = None
Sets the outline of the fill symbol.
- field style: SimpleFillSymbolStyle [Required]
String value representing the simple fill symbol type.
SimpleFillSymbolStyle
SimpleLineSymbolEsriSLS
- pydantic model arcgis.map.symbols.SimpleLineSymbolEsriSLS
Simple line symbols can be used to symbolize polyline geometries or outlines for polygon fills.
- field color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field marker: Marker | None = None
- field style: SimpleLineSymbolStyle | None = None
String value representing the simple line symbol type.
SimpleLineSymbolStyle
SimpleMarkerSymbolEsriSMS
- pydantic model arcgis.map.symbols.SimpleMarkerSymbolEsriSMS
Simple marker symbols can be used to symbolize point geometries.
- field angle: Annotated[float, Field(ge=0.0, le=360.0)] | None = None
Numeric value used to rotate the symbol. The symbol is rotated counter-clockwise. For example, The following, angle=-30, in will create a symbol rotated -30 degrees counter-clockwise; that is, 30 degrees clockwise.
- field color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field outline: SimpleLineSymbolEsriSLS | None = None
Sets the outline of the marker symbol.
- field style: SimpleMarkerSymbolStyle [Required]
String value representing the simple marker type.
SimpleMarkerSymbolStyle
SketchEdges
- pydantic model arcgis.map.symbols.SketchEdges
The sketch edge rendering configuration of a symbol layer. Edges of type sketch are rendered with a hand-drawn look in mind.
- field color: list[confloat(ge=0, le=255)] [Required]
Color is represented as a three or four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field extension_length: float | None = None
A size in points by which to extend edges beyond their original end points.
SolidEdges
- pydantic model arcgis.map.symbols.SolidEdges
The solid edge rendering configuration of a symbol layer. Edges of type solid are rendered in a single color, unaffected by scene lighting.
- field color: list[confloat(ge=0, le=255)] [Required]
Color is represented as a three or four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field extension_length: float | None = None
A size in points by which to extend edges beyond their original end points.
Style
StyleOrigin
- pydantic model arcgis.map.symbols.StyleOrigin
The origin of the style from which the symbol was originally referenced. A reference to the style origin can be either by styleName or by styleUrl (but not both). It may be used to understand where a symbol was originally sourced from, but does not affect actual appearance or rendering of the symbol.
TextBackground
- pydantic model arcgis.map.symbols.TextBackground
Text background definition.
TextDecoration
TextFont
- pydantic model arcgis.map.symbols.TextFont
Font used for text symbols
- field decoration: TextDecoration | None = None
The text decoration.
- field style: TextStyle | None = None
The text style.
- field weight: TextWeight | None = None
The text weight.
TextStyle
TextSymbol3DLayer
- pydantic model arcgis.map.symbols.TextSymbol3DLayer
Symbol layer for text and font definitions.
- field background: TextBackground | None = None
- field halo: Halo | None = None
- field horizontal_alignment: HorizontalAlignment | None = HorizontalAlignment.center
One of the following string values representing the horizontal alignment of the text.
- field line_height: confloat(ge=0.1, le=4.0) | None = 1
Multiplier to scale the vertical distance between the baselines of text with multiple lines.
- field material: Material | None = None
TextSymbolEsriTS
- pydantic model arcgis.map.symbols.TextSymbolEsriTS
Text symbols are used to add text to a feature (labeling).
- field angle: Annotated[float, Field(ge=0.0, le=360.0)] | None = None
A numeric value that defines the number of degrees (0 to 360) that a text symbol is rotated. The rotation is from East in a counter-clockwise direction where East is the 0� axis.
- field background_color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Background color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field border_line_color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Borderline color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field border_line_size: float | int | None = None
Numeric value indicating the the size of the border line in points.
- field color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field font: TextFont | None = None
An object specifying the font used for the text symbol.
- field halo_color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Color of the halo around the text.
- field halo_size: float | int | None = None
Numeric value indicating the point size of a halo around the text symbol.
- field horizontal_alignment: HorizontalAlignment | None = None
One of the following string values representing the horizontal alignment of the text.
- field kerning: bool | None = None
Boolean value indicating whether to adjust the spacing between characters in the text string.
- field rotated: bool | None = None
Boolean value indicating whether every character in the text string is rotated.
- field vertical_alignment: VerticalAlignment | None = None
One of the following string values representing the vertical alignment of the text.
TextWeight
VerticalAlignment
VerticalOffset
- pydantic model arcgis.map.symbols.VerticalOffset
Shifts the symbol along the vertical world axis by a given length. The length is set in screen space units.
- field max_world_length: float | None = None
The maximum vertical symbol lift in world units. It acts as an upper bound to avoid lift becoming too big.
WaterbodySize
- class arcgis.map.symbols.WaterbodySize(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Size of the waterbody the symbol layer represents. Applications will display waves that are appropriate for the chosen body of water, for example ocean versus marina versus swimming pool.
WaterSymbol3DLayer
- pydantic model arcgis.map.symbols.WaterSymbol3DLayer
Symbol Layer that describes a water appearance on surfaces in a SceneView.
- field waterbody_size: WaterbodySize | None = 'medium'
Size of the waterbody the symbol layer represents. Applications will display waves that are appropriate for the chosen body of water, for example ocean versus marina versus swimming pool.
- field wave_direction: confloat(ge=0.0, le=360.0) | None = None
Azimuthal bearing for direction of the waves. If ommitted, waves appear directionless. The value is interpreted as ‘geographic’ rotation, i.e. clockwise starting from north.
- field wave_strength: WaveStrength | None = 'moderate'
The magnitude of the waves displayed on the waterbody. Strings roughly follow the [Douglas sea scale](https://en.wikipedia.org/wiki/Douglas_sea_scale), currently limited to lower degrees.
WaveStrength
- class arcgis.map.symbols.WaveStrength(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
The magnitude of the waves displayed on the waterbody. Strings roughly follow the [Douglas sea scale](https://en.wikipedia.org/wiki/Douglas_sea_scale), currently limited to lower degrees.
Weight
Renderers
AttributeColorInfo
- pydantic model arcgis.map.renderers.AttributeColorInfo
The following is a list of properties found on the attributeColorInfo object. This object defines colors used to represent numeric fields in a dotDensity renderer or a pieChart renderer.
- field color: list[Annotated[int, Field(ge=0, le=255)]] [Required]
The color used to represent the field or valueExpression when rendering dots in a dotDensity renderer or slices in a pieChart renderer. Color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) that computes a numeric value in lieu of a value provided by an attribute field.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the valueExpression property.
ClassBreakInfo
- pydantic model arcgis.map.renderers.ClassBreakInfo
The classBreaksInfo object provides information about the class breaks associated with the renderer.
- field alternate_symbols: list[CimSymbolReference] | None = None
An array of symbol alternatives to a primary symbol. When alternative symbols are present, each symbol has minimum scale and maximum scale at which the symbol should be made visible. For any renderer that support alternate symbols, there is a primary symbol that has minimum and maximum scale defined. When rendering these renderer classes, the renderer should pick only one symbol at a given map scale for a given renderer class. The order of picking a symbol should be starting with primary symbol to check if it falls within the map’s scale first before it iterates through alternate symbols in the array starting from 0. The renderer will then pick the first symbol that is visibile at current map scale. A symbol is visible if the map scale is greater than symbol’s maximum scale and less than or equal to symbol’s minimum scale.
- field class_max_value: float | int | None = None
A numeric value used to specify the maximum value for a break.
- field class_min_value: float | int | None = None
A numeric value used to specify discontinuous class breaks. If this value is null or is missing, the map server will calculate the minimum value based on the preceding class’ maximum value.
- field symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleFillSymbolEsriSFS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | PointSymbol3D | LineSymbol3D | PolygonSymbol3D | MeshSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D | StyleSymbolReference | None [Required]
An object used to display the value.
ClassBreaksRenderer
- pydantic model arcgis.map.renderers.ClassBreaksRenderer
A class breaks renderer symbolizes based on the value of some numeric attribute. The classBreakInfo define the values at which the symbology changes.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field background_fill_symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | SimpleFillSymbolEsriSFS | None = None
A symbol used for polygon features as a background if the renderer uses point symbols, e.g. for bivariate types & size rendering. Only applicable to polygon layers.
- field class_break_infos: list[ClassBreakInfo] [Required]
Array of classBreakInfo objects.
- field classification_method: ClassificationMethod | None = None
Determines the classification method that was used to generate class breaks. This has been replaced by AuthoringInfo.
- field default_label: str | None = None
Label for the default symbol used to draw unspecified values.
- field default_symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleFillSymbolEsriSFS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | PointSymbol3D | LineSymbol3D | PolygonSymbol3D | MeshSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D | StyleSymbolReference | None = None
Symbol used when a value cannot be classified.
- field legend_options: LegendOptions | None = None
A legend containing one title, which is a string describing the renderer in the legend.
- field min_value: float | int | None = None
The minimum numeric data value needed to begin class breaks.
- field normalization_field: str | None = None
Used when normalizationType is field. The string value indicating the attribute field by which the data value is normalized.
- field normalization_total: float | int | None = None
Used when normalizationType is percent-of-total, this number property contains the total of all data values.
- field normalization_type: NormalizationType | None = None
Determine how the data was normalized.
- field rotation_expression: str | None = None
A constant value or an expression that derives the angle of rotation based on a feature attribute value. When an attribute name is specified, it’s enclosed in square brackets. Rotation is set using a visual variable of type rotationInfo with a specified field or valueExpression property.
- field rotation_type: RotationType | None = None
A string property which controls the origin and direction of rotation. If the rotationType is defined as arithmetic, the symbol is rotated from East in a couter-clockwise direction where East is the 0 degree axis. If the rotationType is defined as geographic, the symbol is rotated from North in a clockwise direction where North is the 0 degree axis.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to a number.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the valueExpression property.
- field visual_variables: list[ColorInfoVisualVariable | RotationInfoVisualVariable | SizeInfoVisualVariable | TransparencyInfoVisualVariable] | None = None
An array of objects used to set rendering properties.
ClassificationMethod
- class arcgis.map.renderers.ClassificationMethod(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Used for classed color or size. The default value is esriClassifyManual. The esriClassifyDefinedInterval method is only applicable to raster class breaks renderer only.
ColorInfoVisualVariable
- pydantic model arcgis.map.renderers.ColorInfoVisualVariable
The colorInfo visual variable defines how a continuous color ramp is applied to features based on the values of a numeric field attribute.
- field field: str | None = None
Attribute field used for color rendering if no valueExpression is provided.
- field legend_options: LegendOptions | None = None
- field stops: list[ColorStop] | None = None
An array of stop objects.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) that computes a value in lieu of a value provided by an attribute field.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the valueExpression property.
ColorRamp
- pydantic model arcgis.map.renderers.ColorRamp
A colorRamp object is used to specify a range of colors that are applied to a group of symbols.
- field algorithm: RampAlgorithm | None = None
Algorithm used for calculating the ramp.
- field color_ramps: list['ColorRamp'] | None = None
A multipart color ramp is defined by a list of constituent color ramps.
- field from_color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Array representing the initial color to start the ramp from.
- field to_color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Array representing the final color to end the ramp with.
- field type: ColorRampType | None = None
Value indicating the type of colorRamp.
ColorRampType
ColorStop
- pydantic model arcgis.map.renderers.ColorStop
A colorStop object describes the renderer’s color ramp with more specificity than just colors.
- field color: list[Annotated[int, Field(ge=0, le=255)]] [Required]
A CSS color string or an array of rbga values. The color to place at the stop indicated by either a ratio or value.
- field value: float = None
The pixel intensity value. Describes the pixel intensity value that the color should be associated with. Just like in colorInfo, using value will ignore maxPixelIntensity and minPixelIntensity properties. It will actually set those properties to maximum and minimum values you set in the colorStops array. The hard values are converted to ratios to create the color gradient that is used in the heatmap calculations. Setting minPixelIntensity or maxPixelIntensity, after setting colorStops with values, removes the hard link between the color ramp and the pixel intensity values that were used to create it.
DictionaryRenderer
- pydantic model arcgis.map.renderers.DictionaryRenderer
A renderer where symbols are drawn from a dictionary style.
- field configuration: dict[Annotated[str, StringConstraints(pattern='.*')], str] | None = None
An object representing the configuration properties for a symbol.
- field field_map: dict[Annotated[str, StringConstraints(pattern='.*')], str] | None = None
An object with key/ value pairs representing expected field name and actual field name.
- field scaling_expression_info: ExpressionInfo | None = None
Optional expression script object specifying the scaling ratio as a number. A return value of 1 means no scaling, a return value of 2 means scale 2 times etc. Absence of this object also results in no scaling. Expected return type from the Arcade expression is number
DotDensityRenderer
- pydantic model arcgis.map.renderers.DotDensityRenderer
This renderer allows you to create dot density visualizations for polygon layers. Dot density visualizations randomly draw dots within each polygon to visualize the density of a population or some other variable. Each dot represents a fixed numeric value of an attribute or a subset of attributes.
- field attributes: list[AttributeColorInfo] [Required]
An array of AttributeColorInfo objects defining the dot colors.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field background_color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
The color used to shade the polygon fill behind the dots. Color is represented as a four-element array. The four elements represent values for red, green, blue, and alpha in that order. Values range from 0 through 255. If color is undefined for a symbol, the color value is null.
- field dot_blending_enabled: bool | None = None
Only applicable when two or more attributes are specified. When true, indicates that colors for overlapping dots will blend.
- field dot_size: float | int | None = 1
Defines the size of each dot in points. The default is 1 in maps that don’t persist dotSize.
- field dot_value: float | int | None = None
Defines the dot value used for visualizing density. For example, if set to 100, each dot will represent 100 units. If a referenceScale is provided, this value indicates the value of each dot at the view.scale matching the value in referenceScale.
- field legend_options: LegendOptions | None = None
Options for describing the renderer in the legend. This includes the title and the units describing the dotValue.
- field outline: SimpleLineSymbolEsriSLS | None = None
Sets the outline of the polygon.
- field reference_scale: float | int | None = None
When defined, the renderer will recalculate the dot value linearly based on the change in the view’s scale. The rendering will maintain the density of points as drawn at the provided scale across various scales.
- field seed: float | int | None = '1'
The reference to a specific rendering of dots. This value ensures you can view the same dot density rendering for each draw.
- field visual_variables: list[ColorInfoVisualVariable | RotationInfoVisualVariable | SizeInfoVisualVariable | TransparencyInfoVisualVariable] = None
An array of sizeInfo objects used to vary the outline width based on the view.scale.
ExpressionInfo
- pydantic model arcgis.map.renderers.ExpressionInfo
Defines a script expression that can be used to compute values. Depending on the context, the script may refer to external data which will be available when the expression is being evaluated.
- field expression: str | None = None
Optional expression in the [Arcade expression](https://developers.arcgis.com/arcade/) language. If no expression is provided, then the default empty expression produces a null, empty string, zero or false when evaluated (depending on usage and context).
- field return_type: ArcadeReturnType | None = 'string'
Optional return type of the Arcade expression. Defaults to string value. Number values are assumed to be double. This can be determined by the authoring client by executing the expression using a sample feature, although it can be corrected by the user. Knowing the returnType allows the authoring client to present fields in relevant contexts. For example, numeric fields in numeric contexts such as charts.
FlowRenderer
- pydantic model arcgis.map.renderers.FlowRenderer
A flow renderer is a renderer that uses animated streamlines to visualize U-V or Magnitude-Direction raster data. This renderer works with ImageryLayers and ImageryTileLayers.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field color: list[Annotated[int, Field(ge=0, le=255)]] | None = [255, 255, 255, 255]
The color of the streamlines.
- field density: float | int | None = 0.8
The density of the streamlines. Accepted values are between 0 and 1, where 0 is the least dense and 1 is the most dense.
- field flow_representation: FlowRepresentation | None = 'flow-from'
Sets the flow direction of the data.
- field flow_speed: float | int | None = 10
The speed of the animated streamlines, relative to simulation time. This serves as a multiple of the magnitude from the imagery layer. If the magnitude is 2 m/s, and flowSpeed is 10, then the actual speed of a streamline will be 20 pts/s. A speed of 0 will result in no animation.
- field legend_options: LegendOptions | None = None
A legend containing one title, which is a string describing the renderer in the legend.
- field max_path_length: float | int | None = 200
The maximum length the streamlines will travel in points.
- field trail_cap: TrailCap | None = 'butt'
The style of the streamline’s cap. The ‘round’ cap will only be applied if trailWidth is greater than 3pts.
- field trail_length: float | int | None = 100
The approximate visible length of the streamline in points. This will be longer where the particle is moving faster, and shorter where the particle is moving slower.
- field visual_variables: list[ColorInfoVisualVariable | RotationInfoVisualVariable | SizeInfoVisualVariable | TransparencyInfoVisualVariable] = None
An array of objects used to set rendering properties. Supports color, size, and opacity visual variables.
FlowRepresentation
FlowTheme
Focus
HeatmapColorStop
HeatmapRenderer
- pydantic model arcgis.map.renderers.HeatmapRenderer
The HeatmapRenderer renders point data into a raster visualization that emphasizes areas of higher density or weighted values.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field color_stops: list[HeatmapColorStop] [Required]
An array of colorStop objects describing the renderer’s color ramp with more specificity than just colors.
- field field: str | None = None
This is optional as this renderer can be created if no field is specified. Each feature gets the same value/importance/weight or with a field where each feature is weighted by the field’s value.
- field legend_options: LegendOptions | None = None
Options for describing the heatmap in the legend.
- field max_density: float | int | None = None
The density value assigned to the final color in the colorStops. Only used for heatmaps calculated with kernel density. This value must be set in conjunction with radius and minDensity.
- field min_density: float | int | None = None
The density value assigned to the first color in the colorStops. Only used for heatmaps calculated with kernel density. This value must be set in conjunction with radius and maxDensity.
- field radius: float | int | None = None
The radius (in points) of the circle representing each point. Only used for heatmaps calculated with kernel density. This value must be set in conjunction with minDensity and maxDensity.
- field reference_scale: Annotated[float, Field(ge=0.0)] | None = 0
When defined, the heatmap will maintain a consistent, fixed rendering across all scales according to its configuration at the scale defined here. The heatmap will not dynamically update as the user zooms in and out. For example, when a referenceScale is defined, the same geographic areas appearing hot/dense will always appear hot/dense as the user zooms in and out.
InputOutputUnit
LegendOptions
- pydantic model arcgis.map.renderers.LegendOptions
Options available for the legend.
- field dot_label: str | None = None
The text that should be displayed in the legend for each dot. This will display next to the number 1. If not present, it will be a localized string for the word ‘Dot’. Only applicable to dot density renderers.
- field max_label: str | None = None
Text in the legend that describes the hottest (most dense) part of the heatmap. Only applicable to Heatmap renderers. If not specified, then a localized label, for ‘High’ will display on the legend.
- field min_label: str | None = None
Text in the legend that describes the coldest (least dense) part of the heatmap. Only applicable to Heatmap renderers. If not specified, then a localized label, for ‘Low’ will display on the legend.
- field order: LegendOrder | None = None
Indicates the order in which the legend is displayed.
LegendOrder
NormalizationType
OthersThresholdColorInfo
- pydantic model arcgis.map.renderers.OthersThresholdColorInfo
Defines the rules for how to aggregate small categories to a generic “others” category for categorical chart renderers, such as pie charts.
- field color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Defines the color used to represent all categories smaller than the percentage defined by threshold. This is typically used to represent a generic “others” category where categories would otherwise be too small to read.
- field label: str | None = None
The label used to describe the “others” category in the legend. When not specified, the legend will display a localized version of “Others”.
- field threshold: Annotated[float, Field(ge=0.0, le=1.0)] | None = 0
Represents the minimum size of individual categories as a percentage of all categories combined. All categories that make up a smaller percentage than the threshold will automatically be aggregated to an “others” category represented by the color specified in color. For example, if the threshold is 0.05, then all categories that make up less than 5% of all categories will be represented with color.
PieChartRenderer
- pydantic model arcgis.map.renderers.PieChartRenderer
This renderer allows you to create pie charts to compare numeric values between categories within the same group.
- field attributes: list[AttributeColorInfo] [Required]
An array of AttributeColorInfo objects defining the color of each slice.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field background_fill_symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | SimpleFillSymbolEsriSFS | None = None
The symbols used to represent the polygon fill behind the pie charts.
- field default_color: list[Annotated[int, Field(ge=0, le=255)]] | None = None
Defines the color used to represent features where all values of attributes are either null or zero. This is typically used to represent areas with ‘no data’ or ‘no values’ in the legend.
- field default_label: str | None = None
The text used to describe the defaultColor in the legend. Typically, this label will be something similar to ‘No data’ or ‘No values’.
- field hole_percentage: Annotated[float, Field(ge=0.0, le=1.0)] | None = 0
Defines the size of the hole to cut from the center of the chart as a percentage of the size of the chart. For example, a value of 0 will render a full pie chart. A value of 0.5 will remove 50% of the center of the pie. This property is used to create a donut chart.
- field legend_options: LegendOptions | None = None
Options for describing the renderer in the legend.
- field others_category: OthersThresholdColorInfo | None = None
Defines how to aggregate small pie slices to a generic “others” category.
- field outline: SimpleLineSymbolEsriSLS | None = None
Sets the outline of the pie chart. The outline width is applied to the outer outline of the pie (and inner outline in the case of donut charts). The outline color is applied to the outer and inner outlines, and the boundaries of the slices.
- field visual_variables: list[SizeInfoVisualVariable] | None = None
An array of sizeInfo objects used to vary the size of the pie charts.
PredominanceRenderer
- pydantic model arcgis.map.renderers.PredominanceRenderer
This renderer is a type of UniqueValue renderer which is based off the valueExpression property rather than field. Optionally, size and/or transparency visual variables may be included with valueExpression. Note that this renderer is supported for ArcGIS Online hosted feature services and feature collections.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field background_fill_symbol: SimpleFillSymbolEsriSFS | None = None
A symbol used for polygon features as a background if the renderer uses point symbols, e.g. for bivariate types & size rendering. Only applicable to polygon layers. PictureFillSymbolEsriPFS can also be used outside of the Map Viewer for Size and Predominance and Size renderers.
- field default_label: str | None = None
Default label for the default symbol used to draw unspecified values.
- field default_symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleFillSymbolEsriSFS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | PointSymbol3D | LineSymbol3D | PolygonSymbol3D | MeshSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D | StyleSymbolReference | None = None
Symbol used when a value cannot be classified.
- field rotation_expression: str | None = None
A constant value or an expression that derives the angle of rotation based on a feature attribute value. When an attribute name is specified, it’s enclosed in square brackets. Rotation is set using a visual variable of type rotationInfo with a specified field or valueExpression property
- field rotation_type: RotationType | None = None
String value which controls the origin and direction of rotation on point features. If the rotationType is defined as arithmetic, the symbol is rotated from East in a counter-clockwise direction where East is the 0 degree axis. If the rotationType is defined as geographic, the symbol is rotated from North in a clockwise direction where North is the 0 degree axis.
- field unique_value_infos: list[UniqueValueInfo] [Required]
An array of uniqueValueInfo objects.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to either a string or a number.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the valueExpression property.
- field visual_variables: list[ColorInfoVisualVariable | RotationInfoVisualVariable | SizeInfoVisualVariable | TransparencyInfoVisualVariable] = None
An array of objects used to set rendering properties.
RampAlgorithm
RatioStyle
RendererType
RotationInfoVisualVariable
- pydantic model arcgis.map.renderers.RotationInfoVisualVariable
The rotation visual variable defines how features rendered with marker symbols are rotated. The rotation value is determined by a value in a field or an Arcade expression calculating a value. Use either the field property or valueExpression when specifying rotation values.
- field axis: Axis | None = Axis.heading
Defines the rotation axis the visual variable should be applied to when rendering features with an ObjectSymbol3DLayer. [Detailed description](static/objectSymbolLayerOrientation.md).
- field field: str | None = None
Attribute field used for setting the rotation of a symbol if no valueExpression is provided.
- field legend_options: LegendOptions | None = None
- field rotation_type: RotationType | None = 'geographic'
Defines the origin and direction of rotation depending on how the angle of rotation was measured. Possible values are geographic which rotates the symbol from the north in a clockwise direction and arithmetic which rotates the symbol from the east in a counter-clockwise direction.
- field type: Literal['rotationInfo'] = 'rotationInfo'
A string value indicating the type of visual variable used for the renderer.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to a number.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade expression] (https://developers.arcgis.com/arcade/) as defined in the valueExpression property.
RotationType
SimpleRenderer
- pydantic model arcgis.map.renderers.SimpleRenderer
A simple renderer is a renderer that uses one symbol only.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific overridable settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field rotation_expression: str | None = None
A constant value or an expression that derives the angle of rotation based on a feature attribute value. When an attribute name is specified, it’s enclosed in square brackets. Rotation is set using a visual variable of type rotationInfo with a specified field or valueExpression property
- field rotation_type: RotationType | None = None
String value which controls the origin and direction of rotation on point features. If the rotationType is defined as arithmetic, the symbol is rotated from East in a counter-clockwise direction where East is the 0 degree axis. If the rotationType is defined as geographic, the symbol is rotated from North in a clockwise direction where North is the 0 degree axis.
- field symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleFillSymbolEsriSFS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | PointSymbol3D | LineSymbol3D | PolygonSymbol3D | MeshSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D | StyleSymbolReference | None [Required]
An object that represents how all features will be drawn.
- field visual_variables: list[ColorInfoVisualVariable | RotationInfoVisualVariable | SizeInfoVisualVariable | TransparencyInfoVisualVariable] = None
An array of objects used to set rendering properties.
Size
- pydantic model arcgis.map.renderers.Size
Specifies the marker size to use at any given map scale. This is required if valueUnit is set to unknown.
- field expression: str = None
The value which allows a size to be defined based on the map scale. Currently the only supported expression is view.scale.
- field stops: list[SizeStop] [Required]
An array of objects that define the size of the symbol at various values of the expression. Each object in the array has a numeric size property and a numeric value property. If the value calculated from the expression matches the value of a stop, then the size corresponding to that stop is selected. For example, if expression is set to view.scale, the value corresponds to the map’s scale. The size represents the symbol size (in points) that corresponds to this scale. If the map scale matches the scale value of a stop, the size corresponding to that stop value is used as the symbol size for the features. If the map scale value falls between two stops, the symbol size is interpolated between the sizes of the two stops. The minSize and maxSize stop values are usually the same, although it is possible to have different values depending on how minSize is calculated versus the maxSize.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to a number.
SizeInfoVisualVariable
- pydantic model arcgis.map.renderers.SizeInfoVisualVariable
The sizeInfo visual variable defines how size is applied to features based on the values of a numeric field attribute. The minimum and maximum values of the data should be indicated along with their respective size values. You must specify minSize and maxSize or stops to construct the size ramp. All features with values falling in between the specified min and max data values (or stops) will be scaled proportionally between the provided min and max sizes.
- field axis: Axis | None = Axis.all
Defines the axis the size visual variable should be applied to when rendering features with an ObjectSymbol3DLayer.
- field field: str | None = None
Attribute field used for size rendering if no valueExpression is provided.
- field legend_options: LegendOptions | None = None
- field max_size: Size | float | None = None
Specifies the largest marker size to use at any given map scale. Can be either a fixed number or object, depending on whether the user chose a fixed range or not.
- field min_size: Size | float | None = None
Specifies the smallest marker size to use at any given map scale. Can be either a fixed number or object, depending on whether the user chose a fixed range or not.
- field stops: list[SizeStop] | None = None
An array of objects that defines the thematic size ramp in a sequence of data or expression stops. At least two stops are required. The stops must be listed in ascending order based on the value of the value property in each stop. This property is required if minDataValue, maxDataValue, minSize, and maxSize are not defined. This property is also required when setting a size visual variable to the minSize or maxSize properties based on expression (e.g. expression: ‘view.scale’).
- field target: Literal['outline'] | None = None
Only used when sizeInfo is used for polygon outlines.
- field use_symbol_value: bool | None = None
When setting a size visual variable on a renderer using an ObjectSymbol3DLayer, this property indicates whether to apply the value defined by the height, width, or depth properties to the corresponding axis of this visual variable instead of proportionally scaling this axis’ value after other axes.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to a number. New style is similar to $view.scale. This is used in combination with the target outline property where the outline looks thinner at smaller scales and thicker at larger scales.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the valueExpression property.
SizeStop
StandardDeviationInterval
StretchRenderer
- pydantic model arcgis.map.renderers.StretchRenderer
This renderer displays continuous raster cell values across a gradual ramp of colors. Use this renderer to draw a single band of continuous data. This renderer works well when you have a large range of values to display, such as with imagery or scientific data.
- field color_ramp: ColorRamp | None = None
- field number_of_standard_deviations: float | int | None = None
The number of standard deviations for standard deviation stretch.
- field sigmoid_strength_level: float | int | None = None
Set this from (1 to 6) to adjust the curvature of Sigmoid curve used in color stretch.
- field stretch_type: StretchType | None = None
The stretch types for stretch raster function.
StretchType
TemporalRenderer
- pydantic model arcgis.map.renderers.TemporalRenderer
Temporal renderers provide time-based rendering of features in a feature layer. It can be useful to visualize historic or real-time data such as earthquake or hurricane occurrences. You can use a temporal renderer to define how observations (regular, historic, latest) and tracks are rendered. You can also show aging of features with respect to the map’s time extent.
- field latest_observation_renderer: SimpleRenderer | None = None
Simple renderer used to symbolize point geometries for the most current observations.
- field observational_renderer: SimpleRenderer | None = None
Simple renderer used to symbolize regular/historic observations.
- field track_renderer: SimpleRenderer | None = None
Simple renderer used to symbolize the tracks.
Theme
- class arcgis.map.renderers.Theme(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Theme to be used only when working with visual variables of type colorInfo or sizeInfo. Default is high-to-low. The centered-on, and extremes themes only apply to colorInfo visual variables.
TimeUnits
TrailCap
TransparencyInfoVisualVariable
- pydantic model arcgis.map.renderers.TransparencyInfoVisualVariable
The transparencyInfo visual variable defines the transparency, or opacity, of each feature’s symbol based on a numeric attribute field value.
- field field: str | None = None
Attribute field used for setting the transparency of a feature if no valueExpression is provided.
- field legend_options: LegendOptions | None = None
- field stops: list[TransparencyStop] | None = None
An array of transparencyStop objects.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to a number.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the valueExpression property.
TransparencyStop
- pydantic model arcgis.map.renderers.TransparencyStop
The transparencyStop object defines the thematic opacity ramp in a sequence of stops. At least two stops are required. The stops must be listed in ascending order based on the value of the value property in each stop.
UniqueValueClass
- pydantic model arcgis.map.renderers.UniqueValueClass
The following is a list of properties found on the uniqueValueClass object. The uniqueValueClass object contains the symbology for grouped unique values in the renderer.
- field alternate_symbols: list[CimSymbolReference] | None = None
An array of symbol alternatives to a primary symbol. When alternative symbols are present, each symbol has minimum scale and maximum scale at which the symbol should be made visible. For any renderer that support alternate symbols, there is a primary symbol that has minimum and maximum scale defined. When rendering these renderer classes, the renderer should pick only one symbol at a given map scale for a given renderer class. The order of picking a symbol should be starting with primary symbol to check if it falls within the map’s scale first before it iterates through alternate symbols in the array starting from 0. The renderer will then pick the first symbol that is visible at current map scale. A symbol is visible if the map scale is greater than symbol’s maximum scale and less than or equal to symbol’s minimum scale.
- field symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleFillSymbolEsriSFS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | PointSymbol3D | LineSymbol3D | PolygonSymbol3D | MeshSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D | StyleSymbolReference | None [Required]
An object used to display the value.
- field values: list[list[str]] [Required]
A list of unique values that should be rendered with the same symbol. Each item in the list represents a set of value combinations represented by the given symbol. The inner array must contain only one value if only field1 is specified, two values if field1 and field2 are specified, or three values if field1, field2, and field3 are specified. The inner arrays must not contain more than three values.
UniqueValueGroup
- pydantic model arcgis.map.renderers.UniqueValueGroup
Represents a group of unique value classes (i.e. symbols). This is used to group symbols under a common heading and/or when representing multiple unique values with a single symbol.
- field classes: list[UniqueValueClass] [Required]
Specifies the classes (i.e. symbols) to group under a common heading. Classes may be included here without a heading when representing multiple values with a single symbol.
UniqueValueInfo
- pydantic model arcgis.map.renderers.UniqueValueInfo
The following is a list of properties found on the uniqueValueInfo object, which is one of the properties on the renderer object. The uniqueValueInfo object contains the symbology for each uniquely drawn value in the renderer.
- field alternate_symbols: list[CimSymbolReference] | None = None
An array of symbol alternatives to a primary symbol. When alternative symbols are present, each symbol has minimum scale and maximum scale at which the symbol should be made visible. For any renderer that support alternate symbols, there is a primary symbol that has minimum and maximum scale defined. When rendering these renderer classes, the renderer should pick only one symbol at a given map scale for a given renderer class. The order of picking a symbol should be starting with primary symbol to check if it falls within the map’s scale first before it iterates through alternate symbols in the array starting from 0. The renderer will then pick the first symbol that is visible at current map scale. A symbol is visible if the map scale is greater than symbol’s maximum scale and less than or equal to symbol’s minimum scale.
- field symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleFillSymbolEsriSFS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | PointSymbol3D | LineSymbol3D | PolygonSymbol3D | MeshSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D | StyleSymbolReference | None = None
An object used to display the value.
UniqueValueRenderer
- pydantic model arcgis.map.renderers.UniqueValueRenderer
This renderer symbolizes features based on one or more matching string attributes.
- field authoring_info: AuthoringInfo | None = None
An object containing metadata about the authoring process for creating a renderer object. This allows the authoring clients to save specific settings so that next time it is accessed via the UI, their selections are remembered. Non-authoring clients can ignore it.
- field background_fill_symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | SimpleFillSymbolEsriSFS | PolygonSymbol3D | None = None
A symbol used for polygon features as a background if the renderer uses point symbols, e.g. for bivariate types & size rendering. Only applicable to polygon layers.
- field default_label: str | None = None
Default label for the default symbol used to draw unspecified values.
- field default_symbol: CimSymbolReference | PictureFillSymbolEsriPFS | PictureMarkerSymbolEsriPMS | SimpleFillSymbolEsriSFS | SimpleLineSymbolEsriSLS | SimpleMarkerSymbolEsriSMS | TextSymbolEsriTS | PointSymbol3D | LineSymbol3D | PolygonSymbol3D | MeshSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D | StyleSymbolReference | None = None
Symbol used when a value cannot be matched.
- field draw_in_class_order: bool | None = None
Indicates whether the order of the classes in the renderer definition should be used for the feature drawing order of the layer. If orderBy is set in the layerDefinition, then that will take precedence over this property.
- field field2: str | None = None
If needed, specify an additional attribute field the renderer uses to match values.
- field field3: str | None = None
If needed, specify an additional attribute field the renderer uses to match values.
- field field_delimiter: str | None = None
String inserted between the values if multiple attribute fields are specified.
- field legend_options: LegendOptions | None = None
Allows the user to override the layer title with a more descriptive title of the renderer.
- field rotation_expression: str | None = None
A constant value or an expression that derives the angle of rotation based on a feature attribute value. When an attribute name is specified, it’s enclosed in square brackets. Rotation is set using a visual variable of type rotationInfo with a specified field or valueExpression property.
- field rotation_type: RotationType | None = None
String property which controls the origin and direction of rotation. If the rotationType is defined as arithmetic the symbol is rotated from East in a counter-clockwise direction where East is the 0 degree axis. If the rotationType is defined as geographic, the symbol is rotated from North in a clockwise direction where North is the 0 degree axis.
- field unique_value_groups: list[UniqueValueGroup] | None = None
An array of uniqueValueGroup objects. If present, then uniqueValueGroups should be used in favor of uniqueValueInfos.
- field unique_value_infos: list[UniqueValueInfo] | None = None
An array of uniqueValueInfo objects. If present, then uniqueValueGroups should not be used.
- field value_expression: str | None = None
An [Arcade expression](https://developers.arcgis.com/arcade/) evaluating to either a string or a number.
- field value_expression_title: str | None = None
The title identifying and describing the associated [Arcade](https://developers.arcgis.com/arcade/) expression as defined in the valueExpression property.
- field visual_variables: list[ColorInfoVisualVariable | RotationInfoVisualVariable | SizeInfoVisualVariable | TransparencyInfoVisualVariable] | None = None
An array of objects used to set rendering properties.
UnivariateSymbolStyle
- class arcgis.map.renderers.UnivariateSymbolStyle(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Symbol style or symbol pair used when creating a renderer of type univariateColorSize with an above-and-below univariateTheme. The custom style indicates the renderer uses a custom symbol pair not provided by the authoring application.
UnivariateTheme
VectorFieldRenderer
- pydantic model arcgis.map.renderers.VectorFieldRenderer
A vector field renderer is a renderer that uses symbolizes a U-V or Magnitude-Direction data.
- field attribute_field: str | None = None
Name of the feature attribute field that contains the data value.
- field flow_representation: FlowRepresentation | None = 'flow-from'
Sets the flow direction of the data.
- field input_unit: InputOutputUnit | None = None
Input unit for Magnitude.
- field output_unit: InputOutputUnit | None = None
Output unit for Magnitude.
- field rotation_type: RotationType | None = None
String value which controls the origin and direction of rotation on point features. If the rotationType is defined as arithmetic, the symbol is rotated from East in a counter-clockwise direction where East is the 0 degree axis. If the rotationType is defined as geographic, the symbol is rotated from North in a clockwise direction where North is the 0 degree axis.
- field style: VectorFieldStyle | None = None
A predefined style.
- field symbol_tile_size: float | int | None = 50
Determines the density of the symbols. Larger tile size, fewer symbols appear in the display. The VectorFieldRenderer draws one symbol within a defined tile size (in pixels). The default is 50 pixels.
- field visual_variables: list[ColorInfoVisualVariable | RotationInfoVisualVariable | SizeInfoVisualVariable | TransparencyInfoVisualVariable] | None = None
An array of objects used to set rendering properties.
VectorFieldStyle
VisualVariableType
Forms
CodedValue
- pydantic model arcgis.map.forms.CodedValue
The coded value domain includes both the actual value that is stored in a database and a description of what the code value means.
- field coded_values: list[UniqueCodedValue] [Required]
A set of valid values with unique names.
FormAttachmentElement
- pydantic model arcgis.map.forms.FormAttachmentElement
Defines how one or more attachments can participate in the form. When present in the form, the user has the ability to upload an attachment specific to the form element.
- field allow_user_rename: bool | None = True
A boolean value indicating whether the user can rename the attachment. If not provided, the default value is true.
- field attachment_keyword: str [Required]
A string to identify the attachment(s). When a file is attached using the form, this property is used to set the value of the keywords field for the attachment. When a form is displaying existing attachments, this property is used to query attachments using an exact match on the keywords field.
- field display_file_name: bool | None = False
A boolean value indicating whether the file name is displayed. If not provided, the default value is false.
- field editable_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is editable. When the expression evaluates to false the element is not editable.
- field file_name_expression: str | None = None
Determines the name of a new attachment. If not specified, a unique name will be generated using the attachmentKeyword and the current timestamp when attachment is added.
- field input_type: FormAttachmentInput | FormAudioInput | FormDocumentInput | FormImageInput | FormSignatureInput | FormVideoInput | None [Required]
The input user interface to use for the attachment.
- field max_attachment_count: int | None = None
An integer that indicates the maximum number of attachments that can be added. If not provided, there is no maximum number required.
- field min_attachment_count: int | None = None
An integer that indicates the minimum number of attachments that must be added. If not provided, there is no minimum number required.
- field type: Literal['attachment'] = 'attachment'
String value indicating which type of element to use.
- field use_original_file_name: bool | None = True
Determines whether the uploaded attachment’s file name is preserved. If false, the name is updated based on filenameFormatExpression. Default is true.
- field visibility_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed.
FormAttachmentInput
- pydantic model arcgis.map.forms.FormAttachmentInput
Defines that any supported file can be attached.
- field attachment_association_type: AttachmentAssociationType | None = AttachmentAssociationType.exact
Indicates if existing attachments should be associated with this element. any will associate all existing attachments to this form element; this can be the only formAttachmentElement within the form. exactOrNone will associate any attachments with the associated keyword and any attachments with no keyword defined; only one form element can have this value defined. exact will associate only attachments that include the specific keyword.
- field input_types: list[FormAudioInput | FormDocumentInput | FormImageInput | FormSignatureInput | FormVideoInput] [Required]
An array of input types that are allowed for the attachment.
FormAudioInput
- pydantic model arcgis.map.forms.FormAudioInput
Defines that an audio file can be attached.
- field input_method: InputMethodType | None = InputMethodType.any
The input method used to attach an audio.
FormBarcodeScannerInput
- pydantic model arcgis.map.forms.FormBarcodeScannerInput
Defines the desired user interface is a barcode or QR code scanner. If the client does not support barcode scanning, a single-line text box should be used.
- field max_length: int | None = None
This represents the maximum number of characters allowed. This only applies for string fields. If not supplied, the value is derived from the length property of the referenced field in the service.
FormComboBoxInput
- pydantic model arcgis.map.forms.FormComboBoxInput
Defines the desired user interface is a list of values in a drop-down that supports typing to filter. Only one value can be selected at a time.
FormDatePickerInput
FormDatetimePickerInput
- pydantic model arcgis.map.forms.FormDatetimePickerInput
Defines the desired user interface is a calendar date picker.
- field include_time: bool | None = None
Indicates if the datetime picker should provide an option to select the time. If not provided, the default value is false.
- field max: int | None = None
The maximum date to allow. The number represents the number of milliseconds since epoch (January 1, 1970) in UTC.
FormDocumentInput
FormExpressionInfo
- pydantic model arcgis.map.forms.FormExpressionInfo
Arcade expression used in the form.
- field return_type: ArcadeReturnType | None = None
Return type of the Arcade expression. This can be determined by the authoring client by executing the expression using a sample feature(s), although it can be corrected by the user.
FormFieldElement
- pydantic model arcgis.map.forms.FormFieldElement
Defines how a field in the dataset participates in the form.
- field domain: CodedValue | InheritedDomain | RangeDomain | None = None
The domain to apply to this field. If defined, it takes precedence over domains defined in field, type, or subtype.
- field editable_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is editable. When the expression evaluates to false the element is not editable. If the referenced field is not editable, the editable expression is ignored and the element is not editable.
- field field_name: str [Required]
A string containing the field name as defined by the feature layer.
- field hint: str | None = None
A string representing placeholder text. This only applies for input types that support text or numeric entry.
- field input_type: FormBarcodeScannerInput | FormComboBoxInput | FormDatePickerInput | FormDatetimePickerInput | FormRadioButtonsInput | FormSwitchInput | FormTextAreaInput | FormTextBoxInput | FormTimeInput | FormTimestampOffsetPickerInput | None [Required]
The input user interface to use for the element.
- field label: str [Required]
A string indicating what the element represents. If not supplied, the label is derived from the alias property in the referenced field in the service.
- field required_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true and the element is visible, the element must have a valid value in order for the feature to be created or edited. When the expression evaluates to false the element is not required. If no expression is provided, the default behavior is that the element is not required. If the referenced field is non-nullable, the required expression is ignored and the element is always required.
- field value_expression: str | None = None
A reference to an Arcade expression that returns a date, number, or string value. When this expression evaluates the value of the field will be updated to the result. This expression is only evaluated when editableExpression (if defined) is false but the field itself allows edits.
- field visibility_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed. Care must be taken when defining a visibility expression for a non-nullable field i.e. to make sure that such fields either have default values or are made visible to users so that they can provide a value before submitting the form.
FormGroupElement
- pydantic model arcgis.map.forms.FormGroupElement
Defines a container that holds a set of form elements that can be expanded, collapsed, or displayed together.
- field form_elements: list[FormAttachmentElement | FormFieldElement | FormRelationshipElement | FormTextElement] [Required]
An array of Form Element objects that represent an ordered list of form elements. Nested group elements are not supported.
- field initial_state: GroupInitialState | None = None
Defines if the group should be expanded or collapsed when the form is initially displayed. If not provided, the default value is expanded
- field visibility_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed.
FormImageInput
- pydantic model arcgis.map.forms.FormImageInput
Defines that an image file should be attached.
- field input_method: InputMethodType | None = InputMethodType.any
The input method used to attach an image.
FormInfo
- pydantic model arcgis.map.forms.FormInfo
Defines the form configuration when a user edits a feature.
- field description: str | None = None
A string that appears in the body of the form as a description.
- field expression_infos: list[FormExpressionInfo] | None = None
List of Arcade expressions used in the form.
- field form_elements: list[FormAttachmentElement | FormFieldElement | FormRelationshipElement | FormTextElement | FormGroupElement | FormUtilityNetworkAssociationElement] [Required]
An array of formElement objects that represent an ordered list of form elements.
Determines whether a previously visible formFieldElement value is retained or cleared when a visibilityExpression applied on the formFieldElement or its parent formGroupElement evaluates to false. Default is false.
FormRelationshipElement
- pydantic model arcgis.map.forms.FormRelationshipElement
Defines how a relationship between feature layers and tables can participate in the form. When present in the form, the user may have the option to add or edit related records.
- field display_count: int | None = None
An integer that indicates the maximum number of records to display.
- field display_type: Literal['list'] = 'list'
A string that defines how the related records should be displayed.
- field editable_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is editable. When the expression evaluates to false the element is not editable. If the referenced related table is not editable, the editable expression is ignored and the element is not editable.
- field order_by_fields: list[OrderByField] | None = None
Array of orderByField objects indicating the display order for the related records, and whether they should be sorted in ascending <code>’asc’</code> or descending <code>’desc’</code> order.
- field relationship_id: int [Required]
The id of the relationship as defined in the feature layer definition
- field type: Literal['relationship'] = 'relationship'
String value indicating which type of element to use.
- field visibility_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed.
FormSignatureInput
FormSwitchInput
FormTextAreaInput
- pydantic model arcgis.map.forms.FormTextAreaInput
Defines the desired user interface is a multi-line text area.
- field max_length: int | None = None
This represents the maximum number of characters allowed. If not supplied, the value is derived from the length property of the referenced field in the service.
FormTextBoxInput
- pydantic model arcgis.map.forms.FormTextBoxInput
Defines the desired user interface is a single-line text box.
- field max_length: int | None = None
This represents the maximum number of characters allowed. This only applies for string fields. If not supplied, the value is derived from the length property of the referenced field in the service.
FormTextElement
- pydantic model arcgis.map.forms.FormTextElement
Configures read-only text in form elements.
- field text: str [Required]
String value indicating the text to be displayed within the formTextElement.
- field text_format: TextFormat | None = TextFormat.plain_text
Defines language of text property. Default is plain-text.
- field type: Literal['text'] = 'text'
String value indicating which type of element to use. Valid value of this property is text.
- field visibility_expression: str | None = None
A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed.
FormTimeInput
- pydantic model arcgis.map.forms.FormTimeInput
Defines the desired user interface is a time picker.
- field max: str | None = None
The maximum time to allow. The number represents an extended ISO-8601 time.
- field min: str | None = None
The minimum time to allow. The number represents an extended ISO-8601 time.
- field time_resolution: TimeResolution | None = 'minutes'
The resolution identifier. If not specified default is ‘minutes’.
FormTimestampOffsetPickerInput
- pydantic model arcgis.map.forms.FormTimestampOffsetPickerInput
Defines the desired user interface is a calendar date and time picker with a time offset.
- field include_time_offset: bool | None = True
Indicates if the timestampoffset picker should provide an option to select the timeoffset. If not provided, the default value is true.
- field max: str | None = None
The maximum timestampoffset to allow. The number represents an ISO-8601 date with a time offset.
- field min: str | None = None
The minimum timestampoffset to allow. The number represents an ISO-8601 date with a time offset.
- field time_resolution: TimeResolution | None = 'minutes'
The resolution identifier. If not specified default is ‘minutes’.
FormVideoInput
- pydantic model arcgis.map.forms.FormVideoInput
Defines that a video file should be attached.
- field input_method: InputMethodType | None = InputMethodType.any
The input method used to attach a video.