Map
- class arcgis.map.Map(**kwargs)
- property basemap
Returns a BasemapManager object that can be used to handle basemap related properties and methods on the Map.
- property 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
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, title=None)
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 } }
- property layer_list
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
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
The
offline_areas
property is the resource manager for offline areas cached for theWebMap
object.- Returns:
The
OfflineMapAreaManager
for theWebMap
object.
- print(file_format, extent, dpi=92, output_dimensions=(500, 500), scale=None, rotation=None, spatial_reference=None, layout_template='MAP_ONLY', time_extent=None, layout_options=None)
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 paramter.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.
- 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, thumbnail=None, metadata=None, owner=None, folder=None)
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
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=None, thumbnail=None, metadata=None)
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)
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)
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, extent, rotation=None, time_extent=None, index=None)
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.
Bookmark
- class arcgis.map.map_widget.Bookmark(bookmark, bm_mngr)
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=None, extent=None, rotation=None, time_extent=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)
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, drawing_info=None, popup_info=None, index=None, options=None)
Add a layer or table to the map.
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.
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.
# 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.add(item, drawing_info={"renderer": renderer})
- draw(shape, popup=None, symbol=None, attributes=None, title=None)
Draw a shape on the map. This will add the shape as a feature collection to your layers of the map.
Note
Anything can be drawn from known
Geometry
objects.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)
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.
- layer_visibility(index)
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.
- move(index, group)
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)
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)
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.
- Returns:
PopupManager class for the layer specified.
- remove(index=None, is_layer=True)
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)
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, new_index)
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)
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.
- update_layer(index=None, labeling_info=None, renderer=None, scale_symbols=None, transparency=None, options=None, form=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)
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
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
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
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
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.
- property layer_list
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
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, thumbnail=None, metadata=None, owner=None, folder=None)
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 = ws.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
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
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=None, thumbnail=None, metadata=None)
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
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)
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)
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
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
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)
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, drawing_info=None, popup_info=None, index=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.
- layer_visibility(index)
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.
- move_to_basemap(index)
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)
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=None, is_layer=True)
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.
- update_layer(index=None, labeling_info=None, renderer=None, scale_symbols=None, transparency=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
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)
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
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
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=None, end_time=None, time_interval=None, layer_idx=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
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
The
basemap_gallery
property allows for viewing of your portal’s custom basemap group.
- property basemaps
List of possible basemaps to use. All those starting with ‘arcgis’ require you to be authenticated.
- property basemaps3d
List of possible 3D basemaps to use with a Scene. All those starting with ‘arcgis’ require you to be authenticated.
- move_from_basemap(index)
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)
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, map, parent)
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)
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)
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, group=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)
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)
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)
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, new_index)
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()
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)
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, field=None, normalization_field=None, normalization_type=None, normalization_total=None, classification_method=None, standard_deviation_interval=None, num_classes=None, value_expression=None, value_expression_title=None, sql_expression=None, sql_where=None, outline_optimization_enabled=False, min_value=None, max_value=None, default_symbol_enabled=True, for_binning=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, dot_value_optimization_enabled=True, dot_blending_enabled=True, outline_optimization_enabled=False, scheme=None, for_binning=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=None, scheme=None, statistics=None, fade_ratio=None, fade_to_transparent=True, radius=None, min_ratio=None, max_ratio=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, shape=None, include_size_variable=None, outline_optimization_enabled=False, size_optimization_enabled=False, scheme=None, for_binning=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, include_opacity_variable=None, include_size_variable=None, outline_optimization_enabled=False, size_optimization_enabled=False, statistics=None, sort_by=None, scheme=None, default_symbol_enabled=True, for_binning=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, field2, classification_method=None, focus=None, num_classes=None, outline_optimization_enabled=False, size_optimization_enabled=False, legend_options=None, relationship_scheme=None, default_symbol_enabled=True, for_binning=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.
- univariate_color_size_renderer(field=None, normalization_field=None, value_expression=None, value_expression_title=None, theme=None, sql_expression=None, sql_where=None, statistics=None, min_value=None, max_value=None, default_symbol_enabled=None, color_options=None, size_options=None, symbol_options=None, legend_options=None, for_binning=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
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=None, end_time=None, time_interval=None, layer_idx=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)
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
Get an instance of the Renderer dataclass found in the layer. :return: Renderer dataclass for the layer specified.
- smart_mapping()
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()
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, 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, item_properties=None, folder=None, min_scale=None, max_scale=None, layers_to_ignore=None, refresh_schedule='Never', refresh_rates=None, enable_updates=False, ignore_layers=None, tile_services=None, future=False)
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 2.5 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.
>>> ignore_layers = [ "https://services.arcgis.com/ERmEceOGq5cHrItq/arcgis/rest/services/SaveTheBaySync/FeatureServer/1", "https://services.arcgis.com/ERmEceOGq5cHrItq/arcgis/rest/services/WildfireSync/FeatureServer/0" ]
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()
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, refresh_schedule=None, refresh_rates=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
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=None, future=False)
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)
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
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.
- edit(title=None, description=None, expression_infos=None, field_infos=None, layer_options=None, media_infos=None, popup_elements=None, show_attachments=None)
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.
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, can be a number or string. Number values are assumed to be double. Knowing the ArcadeReturnType allows the authoring client to present fields in relevant contexts. For example, numeric fields in numeric contexts such as chart values.
AssociationType
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.
Show JSON schema
{ "title": "FieldInfo", "description": "Defines how a field in the dataset participates (or does not participate) in a popup window.", "type": "object", "properties": { "fieldName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string containing the field name as defined by the service.", "title": "Fieldname" }, "format": { "anyOf": [ { "$ref": "#/$defs/Format" }, { "type": "null" } ], "default": null, "description": "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." }, "isEditable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "A Boolean determining whether users can edit this field. Not applicable to Arcade expressions.", "title": "Iseditable" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Label" }, "statisticType": { "anyOf": [ { "$ref": "#/$defs/StatisticType" }, { "type": "null" } ], "default": null, "description": "Used in a 1:many or many:many relationship to compute the statistics on the field to show in the popup." }, "stringFieldOption": { "anyOf": [ { "$ref": "#/$defs/StringFieldOption" }, { "type": "null" } ], "default": null, "description": "A string determining what type of input box editors see when editing the field. Applies only to string fields. Not applicable to Arcade expressions." }, "tooltip": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string providing an editing hint for editors of the field. Not applicable to Arcade expressions.", "title": "Tooltip" }, "visible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "A Boolean determining whether the field is visible in the popup window.", "title": "Visible" } }, "$defs": { "DateFormat": { "description": "A string used with date fields to specify how the date should be formatted.", "enum": [ "dayShortMonthYear", "dayShortMonthYearLongTime", "dayShortMonthYearLongTime24", "dayShortMonthYearShortTime", "dayShortMonthYearShortTime24", "longDate", "longDateLongTime", "longDateLongTime24", "longDateShortTime", "longDateShortTime24", "longMonthDayYear", "longMonthDayYearLongTime", "longMonthDayYearLongTime24", "longMonthDayYearShortTime", "longMonthDayYearShortTime24", "longMonthYear", "shortDate", "shortDateLE", "shortDateLELongTime", "shortDateLELongTime24", "shortDateLEShortTime", "shortDateLEShortTime24", "shortDateLongTime", "shortDateLongTime24", "shortDateShortTime", "shortDateShortTime24", "shortMonthYear", "year" ], "title": "DateFormat", "type": "string" }, "Format": { "description": "The format object can be used with numerical or date fields to provide\nmore detail about how values should be formatted for display.", "properties": { "dateFormat": { "anyOf": [ { "$ref": "#/$defs/DateFormat" }, { "type": "null" } ], "default": null, "description": "A string used with date fields to specify how the date should be formatted." }, "digitSeparator": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "A Boolean used with numerical fields. If True, allows the number to have a digit (or thousands) separator. Depending on the locale, this separator is a decimal point or a comma. If False, means that no separator will be used.", "title": "Digitseparator" }, "places": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer used with numerical fields to specify the number of decimal places. Any places beyond this value are rounded.", "title": "Places" } }, "title": "Format", "type": "object" }, "StatisticType": { "description": "Used in a 1:many or many:many relationship to compute the statistics on\nthe field to show in the popup.", "enum": [ "avg", "count", "max", "min", "stddev", "sum", "var" ], "title": "StatisticType", "type": "string" }, "StringFieldOption": { "description": "A string determining what type of input box editors see when editing the\nfield. Applies only to string fields. Not applicable to Arcade expressions.", "enum": [ "richtext", "textarea", "textbox" ], "title": "StringFieldOption", "type": "string" } } }
- field field_name = None (alias 'fieldName')
A string containing the field name as defined by the service.
- field format = 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 = True (alias 'isEditable')
A Boolean determining whether users can edit this field. Not applicable to Arcade expressions.
- field label = 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 = None (alias 'statisticType')
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 = None (alias 'stringFieldOption')
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.
Show JSON schema
{ "title": "Format", "description": "The format object can be used with numerical or date fields to provide\nmore detail about how values should be formatted for display.", "type": "object", "properties": { "dateFormat": { "anyOf": [ { "$ref": "#/$defs/DateFormat" }, { "type": "null" } ], "default": null, "description": "A string used with date fields to specify how the date should be formatted." }, "digitSeparator": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "A Boolean used with numerical fields. If True, allows the number to have a digit (or thousands) separator. Depending on the locale, this separator is a decimal point or a comma. If False, means that no separator will be used.", "title": "Digitseparator" }, "places": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer used with numerical fields to specify the number of decimal places. Any places beyond this value are rounded.", "title": "Places" } }, "$defs": { "DateFormat": { "description": "A string used with date fields to specify how the date should be formatted.", "enum": [ "dayShortMonthYear", "dayShortMonthYearLongTime", "dayShortMonthYearLongTime24", "dayShortMonthYearShortTime", "dayShortMonthYearShortTime24", "longDate", "longDateLongTime", "longDateLongTime24", "longDateShortTime", "longDateShortTime24", "longMonthDayYear", "longMonthDayYearLongTime", "longMonthDayYearLongTime24", "longMonthDayYearShortTime", "longMonthDayYearShortTime24", "longMonthYear", "shortDate", "shortDateLE", "shortDateLELongTime", "shortDateLELongTime24", "shortDateLEShortTime", "shortDateLEShortTime24", "shortDateLongTime", "shortDateLongTime24", "shortDateShortTime", "shortDateShortTime24", "shortMonthYear", "year" ], "title": "DateFormat", "type": "string" } } }
- field date_format = None (alias 'dateFormat')
A string used with date fields to specify how the date should be formatted.
LayerOptions
- pydantic model arcgis.map.popups.LayerOptions
Additional options available for the popup layer.
Show JSON schema
{ "title": "LayerOptions", "description": "Additional options available for the popup layer.", "type": "object", "properties": { "returnTopmostRaster": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Indicates whether or not only the topmost raster should be displayed.", "title": "Returntopmostraster" }, "showNoDataRecords": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Indicates whether or not the NoData records should be displayed.", "title": "Shownodatarecords" } } }
MediaInfo
- pydantic model arcgis.map.popups.MediaInfo
Defines an image or a chart to be displayed in a popup window.
Show JSON schema
{ "title": "MediaInfo", "description": "Defines an image or a chart to be displayed in a popup window.", "type": "object", "properties": { "altText": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string providing the alternate text for the media.", "title": "Alttext" }, "caption": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string caption describing the media.", "title": "Caption" }, "refreshInterval": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": 0, "description": "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`.", "title": "Refreshinterval" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string title for the media.", "title": "Title" }, "type": { "anyOf": [ { "$ref": "#/$defs/MediaType" }, { "type": "null" } ], "default": null, "description": "A string defining the type of media." }, "value": { "anyOf": [ { "$ref": "#/$defs/Value" }, { "type": "null" } ], "default": null, "description": "A value object containing information about how the image should be retrieved or how the chart should be constructed." } }, "$defs": { "MediaType": { "description": "A string defining the type of media.", "enum": [ "barchart", "columnchart", "image", "linechart", "piechart" ], "title": "MediaType", "type": "string" }, "Value": { "description": "The value object contains information for popup windows about how images should be retrieved or charts constructed.", "properties": { "colors": { "anyOf": [ { "items": { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Colors" }, "fields": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Used with charts. An array of strings, with each string containing the name of a field to display in the chart.", "title": "Fields" }, "linkURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing a URL to be launched in a browser when a user clicks the image.", "title": "Linkurl" }, "normalizeField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with charts. An optional string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field.", "title": "Normalizefield" }, "sourceURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing the URL to the image.", "title": "Sourceurl" }, "tooltipField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table.", "title": "Tooltipfield" } }, "title": "Value", "type": "object" } } }
- field refresh_interval = 0 (alias 'refreshInterval')
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.
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.
Show JSON schema
{ "title": "OrderByField", "description": "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.", "type": "object", "properties": { "field": { "description": "Name of a field. The value of this field will drive the sorting.", "title": "Field", "type": "string" }, "order": { "allOf": [ { "$ref": "#/$defs/Order" } ], "description": "Indicates whether features are sorted in ascending or descending order of the field values." } }, "$defs": { "Order": { "description": "Indicates whether features are sorted in ascending or descending order of\nthe field values.", "enum": [ "asc", "desc" ], "title": "Order", "type": "string" } }, "required": [ "field", "order" ] }
PopupElementAttachments
- pydantic model arcgis.map.popups.PopupElementAttachments
Configures attachments in popup elements.
Show JSON schema
{ "title": "PopupElementAttachments", "description": "Configures attachments in popup elements.", "type": "object", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value describing the element in detail.", "title": "Description" }, "displayType": { "anyOf": [ { "$ref": "#/$defs/AttachmentDisplayType" }, { "type": "null" } ], "default": null, "description": "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." }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value indicating what the element represents.", "title": "Title" }, "type": { "const": "attachments", "default": "attachments", "enum": [ "attachments" ], "title": "Type", "type": "string" } }, "$defs": { "AttachmentDisplayType": { "description": "This property applies to elements of type `attachments`. A string value\nindicating how to display the attachment. If `list` is specified, attachments\nshow as links. If `preview` is specified, attachments expand to the width of\nthe pop-up. The default `auto` setting allows applications to choose the most\nsuitable default experience.", "enum": [ "auto", "list", "preview" ], "title": "AttachmentDisplayType", "type": "string" } } }
- field display_type = None (alias 'displayType')
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.
Show JSON schema
{ "title": "PopupElementExpression", "description": "A pop-up element defined by an arcade expression.", "type": "object", "properties": { "expressionInfo": { "allOf": [ { "$ref": "#/$defs/PopupExpressionInfo" } ], "description": "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)." }, "type": { "const": "expression", "default": "expression", "description": "Specifies the type of element.", "enum": [ "expression" ], "title": "Type", "type": "string" } }, "$defs": { "ArcadeReturnType": { "description": "Return type of the Arcade expression, can be a number or string.\nNumber values are assumed to be `double`.\nKnowing the `ArcadeReturnType` allows the authoring client to present\nfields in relevant contexts. For example, numeric fields in numeric\ncontexts such as chart values.", "enum": [ "number", "string" ], "title": "ArcadeReturnType", "type": "string" }, "PopupExpressionInfo": { "description": "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).", "properties": { "expression": { "description": "The Arcade expression.", "title": "Expression", "type": "string" }, "returnType": { "anyOf": [ { "$ref": "#/$defs/ArcadeReturnType" }, { "type": "null" } ], "default": "string", "description": "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." }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Title of the expression.", "title": "Title" } }, "required": [ "expression" ], "title": "PopupExpressionInfo", "type": "object" } }, "required": [ "expressionInfo" ] }
- field expression_info [Required] (alias 'expressionInfo')
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.
Show JSON schema
{ "title": "PopupElementFields", "description": "Configures fields in popup elements.", "type": "object", "properties": { "attributes": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "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).", "title": "Attributes" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value describing the element in detail.", "title": "Description" }, "fieldInfos": { "anyOf": [ { "items": { "$ref": "#/$defs/FieldInfo" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Fieldinfos" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value indicating what the element represents.", "title": "Title" }, "type": { "const": "fields", "default": "fields", "description": "Specifies the type of element.", "enum": [ "fields" ], "title": "Type", "type": "string" } }, "$defs": { "DateFormat": { "description": "A string used with date fields to specify how the date should be formatted.", "enum": [ "dayShortMonthYear", "dayShortMonthYearLongTime", "dayShortMonthYearLongTime24", "dayShortMonthYearShortTime", "dayShortMonthYearShortTime24", "longDate", "longDateLongTime", "longDateLongTime24", "longDateShortTime", "longDateShortTime24", "longMonthDayYear", "longMonthDayYearLongTime", "longMonthDayYearLongTime24", "longMonthDayYearShortTime", "longMonthDayYearShortTime24", "longMonthYear", "shortDate", "shortDateLE", "shortDateLELongTime", "shortDateLELongTime24", "shortDateLEShortTime", "shortDateLEShortTime24", "shortDateLongTime", "shortDateLongTime24", "shortDateShortTime", "shortDateShortTime24", "shortMonthYear", "year" ], "title": "DateFormat", "type": "string" }, "FieldInfo": { "description": "Defines how a field in the dataset participates (or does not participate) in a popup window.", "properties": { "fieldName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string containing the field name as defined by the service.", "title": "Fieldname" }, "format": { "anyOf": [ { "$ref": "#/$defs/Format" }, { "type": "null" } ], "default": null, "description": "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." }, "isEditable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "A Boolean determining whether users can edit this field. Not applicable to Arcade expressions.", "title": "Iseditable" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Label" }, "statisticType": { "anyOf": [ { "$ref": "#/$defs/StatisticType" }, { "type": "null" } ], "default": null, "description": "Used in a 1:many or many:many relationship to compute the statistics on the field to show in the popup." }, "stringFieldOption": { "anyOf": [ { "$ref": "#/$defs/StringFieldOption" }, { "type": "null" } ], "default": null, "description": "A string determining what type of input box editors see when editing the field. Applies only to string fields. Not applicable to Arcade expressions." }, "tooltip": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string providing an editing hint for editors of the field. Not applicable to Arcade expressions.", "title": "Tooltip" }, "visible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "A Boolean determining whether the field is visible in the popup window.", "title": "Visible" } }, "title": "FieldInfo", "type": "object" }, "Format": { "description": "The format object can be used with numerical or date fields to provide\nmore detail about how values should be formatted for display.", "properties": { "dateFormat": { "anyOf": [ { "$ref": "#/$defs/DateFormat" }, { "type": "null" } ], "default": null, "description": "A string used with date fields to specify how the date should be formatted." }, "digitSeparator": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "A Boolean used with numerical fields. If True, allows the number to have a digit (or thousands) separator. Depending on the locale, this separator is a decimal point or a comma. If False, means that no separator will be used.", "title": "Digitseparator" }, "places": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer used with numerical fields to specify the number of decimal places. Any places beyond this value are rounded.", "title": "Places" } }, "title": "Format", "type": "object" }, "StatisticType": { "description": "Used in a 1:many or many:many relationship to compute the statistics on\nthe field to show in the popup.", "enum": [ "avg", "count", "max", "min", "stddev", "sum", "var" ], "title": "StatisticType", "type": "string" }, "StringFieldOption": { "description": "A string determining what type of input box editors see when editing the\nfield. Applies only to string fields. Not applicable to Arcade expressions.", "enum": [ "richtext", "textarea", "textbox" ], "title": "StringFieldOption", "type": "string" } } }
- field attributes = 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 = None (alias 'fieldInfos')
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.
Show JSON schema
{ "title": "PopupElementMedia", "description": "Configures media in popup elements.", "type": "object", "properties": { "attributes": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "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).", "title": "Attributes" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value describing the element in detail.", "title": "Description" }, "mediaInfos": { "anyOf": [ { "items": { "$ref": "#/$defs/MediaInfo" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Mediainfos" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value indicating what the element represents.", "title": "Title" }, "type": { "const": "media", "default": "media", "enum": [ "media" ], "title": "Type", "type": "string" } }, "$defs": { "MediaInfo": { "description": "Defines an image or a chart to be displayed in a popup window.", "properties": { "altText": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string providing the alternate text for the media.", "title": "Alttext" }, "caption": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string caption describing the media.", "title": "Caption" }, "refreshInterval": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": 0, "description": "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`.", "title": "Refreshinterval" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string title for the media.", "title": "Title" }, "type": { "anyOf": [ { "$ref": "#/$defs/MediaType" }, { "type": "null" } ], "default": null, "description": "A string defining the type of media." }, "value": { "anyOf": [ { "$ref": "#/$defs/Value" }, { "type": "null" } ], "default": null, "description": "A value object containing information about how the image should be retrieved or how the chart should be constructed." } }, "title": "MediaInfo", "type": "object" }, "MediaType": { "description": "A string defining the type of media.", "enum": [ "barchart", "columnchart", "image", "linechart", "piechart" ], "title": "MediaType", "type": "string" }, "Value": { "description": "The value object contains information for popup windows about how images should be retrieved or charts constructed.", "properties": { "colors": { "anyOf": [ { "items": { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Colors" }, "fields": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Used with charts. An array of strings, with each string containing the name of a field to display in the chart.", "title": "Fields" }, "linkURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing a URL to be launched in a browser when a user clicks the image.", "title": "Linkurl" }, "normalizeField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with charts. An optional string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field.", "title": "Normalizefield" }, "sourceURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing the URL to the image.", "title": "Sourceurl" }, "tooltipField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table.", "title": "Tooltipfield" } }, "title": "Value", "type": "object" } } }
- field attributes = 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).
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.
Show JSON schema
{ "title": "PopupElementRelationship", "description": "Provides the ability to navigate and view related records from a layer or table associated within the popup.", "type": "object", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string that describes the element in detail.", "title": "Description" }, "displayCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer that indicates the maximum number of records to display.", "title": "Displaycount" }, "displayType": { "const": "list", "default": "list", "description": "A string that defines how the related records should be displayed.", "enum": [ "list" ], "title": "Displaytype", "type": "string" }, "orderByFields": { "anyOf": [ { "items": { "$ref": "#/$defs/OrderByField" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Orderbyfields" }, "relationshipId": { "description": "The id of the relationship as defined in the feature layer definition", "title": "Relationshipid", "type": "integer" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string value indicating what the element represents.", "title": "Title" }, "type": { "const": "relationship", "default": "relationship", "description": "String value indicating which type of element to use.", "enum": [ "relationship" ], "title": "Type", "type": "string" } }, "$defs": { "Order": { "description": "Indicates whether features are sorted in ascending or descending order of\nthe field values.", "enum": [ "asc", "desc" ], "title": "Order", "type": "string" }, "OrderByField": { "description": "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.", "properties": { "field": { "description": "Name of a field. The value of this field will drive the sorting.", "title": "Field", "type": "string" }, "order": { "allOf": [ { "$ref": "#/$defs/Order" } ], "description": "Indicates whether features are sorted in ascending or descending order of the field values." } }, "required": [ "field", "order" ], "title": "OrderByField", "type": "object" } }, "required": [ "relationshipId" ] }
- field display_count = None (alias 'displayCount')
An integer that indicates the maximum number of records to display.
- field display_type = 'list' (alias 'displayType')
A string that defines how the related records should be displayed.
- field order_by_fields = None (alias 'orderByFields')
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.
Show JSON schema
{ "title": "PopupElementText", "description": "Configures text in popup elements.", "type": "object", "properties": { "text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String value indicating the text to be displayed within the popupElement. If no `text` property is provided, the popupElement will display whatever is set in the popupInfo.description property.", "title": "Text" }, "type": { "const": "text", "default": "text", "enum": [ "text" ], "title": "Type", "type": "string" } } }
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).
Show JSON schema
{ "title": "PopupElementUtilityNetworkAssociations", "description": "Provides the ability to navigate and view associated objects from a layer or table associated within the [pop-up](popupInfo.md).", "type": "object", "properties": { "associatedAssetGroup": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The id of the asset group to filter utility network associations.", "title": "Associatedassetgroup" }, "associatedAssetType": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The id of the asset type to filter utility network associations.", "title": "Associatedassettype" }, "associationsType": { "anyOf": [ { "$ref": "#/$defs/AssociationType" }, { "type": "null" } ], "description": "String value indicating which type of utility network associations to use." }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string that describes the element in detail.", "title": "Description" }, "displayCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer that indicates the maximum number of records to display.", "title": "Displaycount" }, "orderByFields": { "anyOf": [ { "items": { "$ref": "#/$defs/OrderByField" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Orderbyfields" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string value indicating what the element represents.", "title": "Title" }, "type": { "const": "utilityNetworkAssociations", "default": "utilityNetworkAssociations", "description": "String value indicating which type of element to use.", "enum": [ "utilityNetworkAssociations" ], "title": "Type", "type": "string" } }, "$defs": { "AssociationType": { "enum": [ "connectivity", "containment", "structural" ], "title": "AssociationType", "type": "string" }, "Order": { "description": "Indicates whether features are sorted in ascending or descending order of\nthe field values.", "enum": [ "asc", "desc" ], "title": "Order", "type": "string" }, "OrderByField": { "description": "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.", "properties": { "field": { "description": "Name of a field. The value of this field will drive the sorting.", "title": "Field", "type": "string" }, "order": { "allOf": [ { "$ref": "#/$defs/Order" } ], "description": "Indicates whether features are sorted in ascending or descending order of the field values." } }, "required": [ "field", "order" ], "title": "OrderByField", "type": "object" } }, "required": [ "associationsType" ] }
- field associated_asset_group = None (alias 'associatedAssetGroup')
The id of the asset group to filter utility network associations.
- field associated_asset_type = None (alias 'associatedAssetType')
The id of the asset type to filter utility network associations.
- field associations_type [Required] (alias 'associationsType')
String value indicating which type of utility network associations to use.
- field display_count = None (alias 'displayCount')
An integer that indicates the maximum number of records to display.
- field order_by_fields = None (alias 'orderByFields')
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.
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).
Show JSON schema
{ "title": "PopupExpressionInfo", "description": "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).", "type": "object", "properties": { "expression": { "description": "The Arcade expression.", "title": "Expression", "type": "string" }, "returnType": { "anyOf": [ { "$ref": "#/$defs/ArcadeReturnType" }, { "type": "null" } ], "default": "string", "description": "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." }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Title of the expression.", "title": "Title" } }, "$defs": { "ArcadeReturnType": { "description": "Return type of the Arcade expression, can be a number or string.\nNumber values are assumed to be `double`.\nKnowing the `ArcadeReturnType` allows the authoring client to present\nfields in relevant contexts. For example, numeric fields in numeric\ncontexts such as chart values.", "enum": [ "number", "string" ], "title": "ArcadeReturnType", "type": "string" } }, "required": [ "expression" ] }
- field return_type = 'string' (alias 'returnType')
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.
Show JSON schema
{ "title": "PopupInfo", "description": "Defines the look and feel of popup windows when a user clicks or queries a feature.", "type": "object", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Description" }, "expressionInfos": { "anyOf": [ { "items": { "$ref": "#/$defs/PopupExpressionInfo" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "List of Arcade expressions added to the pop-up.", "title": "Expressioninfos" }, "fieldInfos": { "anyOf": [ { "items": { "$ref": "#/$defs/FieldInfo" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Fieldinfos" }, "layerOptions": { "anyOf": [ { "$ref": "#/$defs/LayerOptions" }, { "type": "null" } ], "default": null, "description": "Additional options that can be defined for the popup layer." }, "mediaInfos": { "anyOf": [ { "items": { "$ref": "#/$defs/MediaInfo" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Mediainfos" }, "popupElements": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/PopupElementAttachments" }, { "$ref": "#/$defs/PopupElementExpression" }, { "$ref": "#/$defs/PopupElementFields" }, { "$ref": "#/$defs/PopupElementMedia" }, { "$ref": "#/$defs/PopupElementRelationship" }, { "$ref": "#/$defs/PopupElementText" }, { "$ref": "#/$defs/PopupElementUtilityNetworkAssociations" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "description": "An array of popupElement objects that represent an ordered list of popup elements.", "title": "Popupelements" }, "relatedRecordsInfo": { "anyOf": [ { "$ref": "#/$defs/RelatedRecordsInfo" }, { "type": "null" } ], "default": null, "description": "Applicable only when the pop-up contains a relationship content element. This is needed for backward compatibility for some web maps." }, "showAttachments": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Indicates whether attachments will be loaded for feature layers that have attachments.", "title": "Showattachments" }, "showLastEditInfo": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Indicates whether popup will display information about when and who last edited the feature. Applicable only to layers that have been configured to keep track of such information.", "title": "Showlasteditinfo" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string that appears at the top of the popup window as a title.", "title": "Title" } }, "$defs": { "ArcadeReturnType": { "description": "Return type of the Arcade expression, can be a number or string.\nNumber values are assumed to be `double`.\nKnowing the `ArcadeReturnType` allows the authoring client to present\nfields in relevant contexts. For example, numeric fields in numeric\ncontexts such as chart values.", "enum": [ "number", "string" ], "title": "ArcadeReturnType", "type": "string" }, "AssociationType": { "enum": [ "connectivity", "containment", "structural" ], "title": "AssociationType", "type": "string" }, "AttachmentDisplayType": { "description": "This property applies to elements of type `attachments`. A string value\nindicating how to display the attachment. If `list` is specified, attachments\nshow as links. If `preview` is specified, attachments expand to the width of\nthe pop-up. The default `auto` setting allows applications to choose the most\nsuitable default experience.", "enum": [ "auto", "list", "preview" ], "title": "AttachmentDisplayType", "type": "string" }, "DateFormat": { "description": "A string used with date fields to specify how the date should be formatted.", "enum": [ "dayShortMonthYear", "dayShortMonthYearLongTime", "dayShortMonthYearLongTime24", "dayShortMonthYearShortTime", "dayShortMonthYearShortTime24", "longDate", "longDateLongTime", "longDateLongTime24", "longDateShortTime", "longDateShortTime24", "longMonthDayYear", "longMonthDayYearLongTime", "longMonthDayYearLongTime24", "longMonthDayYearShortTime", "longMonthDayYearShortTime24", "longMonthYear", "shortDate", "shortDateLE", "shortDateLELongTime", "shortDateLELongTime24", "shortDateLEShortTime", "shortDateLEShortTime24", "shortDateLongTime", "shortDateLongTime24", "shortDateShortTime", "shortDateShortTime24", "shortMonthYear", "year" ], "title": "DateFormat", "type": "string" }, "FieldInfo": { "description": "Defines how a field in the dataset participates (or does not participate) in a popup window.", "properties": { "fieldName": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string containing the field name as defined by the service.", "title": "Fieldname" }, "format": { "anyOf": [ { "$ref": "#/$defs/Format" }, { "type": "null" } ], "default": null, "description": "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." }, "isEditable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "A Boolean determining whether users can edit this field. Not applicable to Arcade expressions.", "title": "Iseditable" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Label" }, "statisticType": { "anyOf": [ { "$ref": "#/$defs/StatisticType" }, { "type": "null" } ], "default": null, "description": "Used in a 1:many or many:many relationship to compute the statistics on the field to show in the popup." }, "stringFieldOption": { "anyOf": [ { "$ref": "#/$defs/StringFieldOption" }, { "type": "null" } ], "default": null, "description": "A string determining what type of input box editors see when editing the field. Applies only to string fields. Not applicable to Arcade expressions." }, "tooltip": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string providing an editing hint for editors of the field. Not applicable to Arcade expressions.", "title": "Tooltip" }, "visible": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "A Boolean determining whether the field is visible in the popup window.", "title": "Visible" } }, "title": "FieldInfo", "type": "object" }, "Format": { "description": "The format object can be used with numerical or date fields to provide\nmore detail about how values should be formatted for display.", "properties": { "dateFormat": { "anyOf": [ { "$ref": "#/$defs/DateFormat" }, { "type": "null" } ], "default": null, "description": "A string used with date fields to specify how the date should be formatted." }, "digitSeparator": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "A Boolean used with numerical fields. If True, allows the number to have a digit (or thousands) separator. Depending on the locale, this separator is a decimal point or a comma. If False, means that no separator will be used.", "title": "Digitseparator" }, "places": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer used with numerical fields to specify the number of decimal places. Any places beyond this value are rounded.", "title": "Places" } }, "title": "Format", "type": "object" }, "LayerOptions": { "description": "Additional options available for the popup layer.", "properties": { "returnTopmostRaster": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Indicates whether or not only the topmost raster should be displayed.", "title": "Returntopmostraster" }, "showNoDataRecords": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Indicates whether or not the NoData records should be displayed.", "title": "Shownodatarecords" } }, "title": "LayerOptions", "type": "object" }, "MediaInfo": { "description": "Defines an image or a chart to be displayed in a popup window.", "properties": { "altText": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string providing the alternate text for the media.", "title": "Alttext" }, "caption": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string caption describing the media.", "title": "Caption" }, "refreshInterval": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "null" } ], "default": 0, "description": "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`.", "title": "Refreshinterval" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string title for the media.", "title": "Title" }, "type": { "anyOf": [ { "$ref": "#/$defs/MediaType" }, { "type": "null" } ], "default": null, "description": "A string defining the type of media." }, "value": { "anyOf": [ { "$ref": "#/$defs/Value" }, { "type": "null" } ], "default": null, "description": "A value object containing information about how the image should be retrieved or how the chart should be constructed." } }, "title": "MediaInfo", "type": "object" }, "MediaType": { "description": "A string defining the type of media.", "enum": [ "barchart", "columnchart", "image", "linechart", "piechart" ], "title": "MediaType", "type": "string" }, "Order": { "description": "Indicates whether features are sorted in ascending or descending order of\nthe field values.", "enum": [ "asc", "desc" ], "title": "Order", "type": "string" }, "OrderByField": { "description": "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.", "properties": { "field": { "description": "Name of a field. The value of this field will drive the sorting.", "title": "Field", "type": "string" }, "order": { "allOf": [ { "$ref": "#/$defs/Order" } ], "description": "Indicates whether features are sorted in ascending or descending order of the field values." } }, "required": [ "field", "order" ], "title": "OrderByField", "type": "object" }, "PopupElementAttachments": { "description": "Configures attachments in popup elements.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value describing the element in detail.", "title": "Description" }, "displayType": { "anyOf": [ { "$ref": "#/$defs/AttachmentDisplayType" }, { "type": "null" } ], "default": null, "description": "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." }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value indicating what the element represents.", "title": "Title" }, "type": { "const": "attachments", "default": "attachments", "enum": [ "attachments" ], "title": "Type", "type": "string" } }, "title": "PopupElementAttachments", "type": "object" }, "PopupElementExpression": { "description": "A pop-up element defined by an arcade expression.", "properties": { "expressionInfo": { "allOf": [ { "$ref": "#/$defs/PopupExpressionInfo" } ], "description": "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)." }, "type": { "const": "expression", "default": "expression", "description": "Specifies the type of element.", "enum": [ "expression" ], "title": "Type", "type": "string" } }, "required": [ "expressionInfo" ], "title": "PopupElementExpression", "type": "object" }, "PopupElementFields": { "description": "Configures fields in popup elements.", "properties": { "attributes": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "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).", "title": "Attributes" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value describing the element in detail.", "title": "Description" }, "fieldInfos": { "anyOf": [ { "items": { "$ref": "#/$defs/FieldInfo" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Fieldinfos" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value indicating what the element represents.", "title": "Title" }, "type": { "const": "fields", "default": "fields", "description": "Specifies the type of element.", "enum": [ "fields" ], "title": "Type", "type": "string" } }, "title": "PopupElementFields", "type": "object" }, "PopupElementMedia": { "description": "Configures media in popup elements.", "properties": { "attributes": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "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).", "title": "Attributes" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value describing the element in detail.", "title": "Description" }, "mediaInfos": { "anyOf": [ { "items": { "$ref": "#/$defs/MediaInfo" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Mediainfos" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An optional string value indicating what the element represents.", "title": "Title" }, "type": { "const": "media", "default": "media", "enum": [ "media" ], "title": "Type", "type": "string" } }, "title": "PopupElementMedia", "type": "object" }, "PopupElementRelationship": { "description": "Provides the ability to navigate and view related records from a layer or table associated within the popup.", "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string that describes the element in detail.", "title": "Description" }, "displayCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer that indicates the maximum number of records to display.", "title": "Displaycount" }, "displayType": { "const": "list", "default": "list", "description": "A string that defines how the related records should be displayed.", "enum": [ "list" ], "title": "Displaytype", "type": "string" }, "orderByFields": { "anyOf": [ { "items": { "$ref": "#/$defs/OrderByField" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Orderbyfields" }, "relationshipId": { "description": "The id of the relationship as defined in the feature layer definition", "title": "Relationshipid", "type": "integer" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string value indicating what the element represents.", "title": "Title" }, "type": { "const": "relationship", "default": "relationship", "description": "String value indicating which type of element to use.", "enum": [ "relationship" ], "title": "Type", "type": "string" } }, "required": [ "relationshipId" ], "title": "PopupElementRelationship", "type": "object" }, "PopupElementText": { "description": "Configures text in popup elements.", "properties": { "text": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String value indicating the text to be displayed within the popupElement. If no `text` property is provided, the popupElement will display whatever is set in the popupInfo.description property.", "title": "Text" }, "type": { "const": "text", "default": "text", "enum": [ "text" ], "title": "Type", "type": "string" } }, "title": "PopupElementText", "type": "object" }, "PopupElementUtilityNetworkAssociations": { "description": "Provides the ability to navigate and view associated objects from a layer or table associated within the [pop-up](popupInfo.md).", "properties": { "associatedAssetGroup": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The id of the asset group to filter utility network associations.", "title": "Associatedassetgroup" }, "associatedAssetType": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The id of the asset type to filter utility network associations.", "title": "Associatedassettype" }, "associationsType": { "anyOf": [ { "$ref": "#/$defs/AssociationType" }, { "type": "null" } ], "description": "String value indicating which type of utility network associations to use." }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string that describes the element in detail.", "title": "Description" }, "displayCount": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer that indicates the maximum number of records to display.", "title": "Displaycount" }, "orderByFields": { "anyOf": [ { "items": { "$ref": "#/$defs/OrderByField" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Orderbyfields" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A string value indicating what the element represents.", "title": "Title" }, "type": { "const": "utilityNetworkAssociations", "default": "utilityNetworkAssociations", "description": "String value indicating which type of element to use.", "enum": [ "utilityNetworkAssociations" ], "title": "Type", "type": "string" } }, "required": [ "associationsType" ], "title": "PopupElementUtilityNetworkAssociations", "type": "object" }, "PopupExpressionInfo": { "description": "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).", "properties": { "expression": { "description": "The Arcade expression.", "title": "Expression", "type": "string" }, "returnType": { "anyOf": [ { "$ref": "#/$defs/ArcadeReturnType" }, { "type": "null" } ], "default": "string", "description": "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." }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Title of the expression.", "title": "Title" } }, "required": [ "expression" ], "title": "PopupExpressionInfo", "type": "object" }, "RelatedRecordsInfo": { "description": "Applicable only when popupInfo contains a relationship content element. This is needed for backward compatibility for some web maps.", "properties": { "orderByFields": { "anyOf": [ { "items": { "$ref": "#/$defs/OrderByField" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Array of orderByField objects indicating the field display order for the related records, and whether they should be sorted in ascending (asc) or descending (desc) order.", "title": "Orderbyfields" }, "showRelatedRecords": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Required boolean value indicating whether to display related records. If True, client should let the user navigate to the related records. Defaults to True if the layer participates in a relationship AND the related layer/table has already been added to the map (either as an operationalLayer or as a table).", "title": "Showrelatedrecords" } }, "title": "RelatedRecordsInfo", "type": "object" }, "StatisticType": { "description": "Used in a 1:many or many:many relationship to compute the statistics on\nthe field to show in the popup.", "enum": [ "avg", "count", "max", "min", "stddev", "sum", "var" ], "title": "StatisticType", "type": "string" }, "StringFieldOption": { "description": "A string determining what type of input box editors see when editing the\nfield. Applies only to string fields. Not applicable to Arcade expressions.", "enum": [ "richtext", "textarea", "textbox" ], "title": "StringFieldOption", "type": "string" }, "Value": { "description": "The value object contains information for popup windows about how images should be retrieved or charts constructed.", "properties": { "colors": { "anyOf": [ { "items": { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Colors" }, "fields": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Used with charts. An array of strings, with each string containing the name of a field to display in the chart.", "title": "Fields" }, "linkURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing a URL to be launched in a browser when a user clicks the image.", "title": "Linkurl" }, "normalizeField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with charts. An optional string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field.", "title": "Normalizefield" }, "sourceURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing the URL to the image.", "title": "Sourceurl" }, "tooltipField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table.", "title": "Tooltipfield" } }, "title": "Value", "type": "object" } } }
- field description = 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 = None (alias 'expressionInfos')
List of Arcade expressions added to the pop-up.
- field field_infos = None (alias 'fieldInfos')
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 = None (alias 'layerOptions')
Additional options that can be defined for the popup layer.
- field media_infos = None (alias 'mediaInfos')
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 = None (alias 'popupElements')
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 = None (alias 'showAttachments')
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.
Show JSON schema
{ "title": "Value", "description": "The value object contains information for popup windows about how images should be retrieved or charts constructed.", "type": "object", "properties": { "colors": { "anyOf": [ { "items": { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Colors" }, "fields": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Used with charts. An array of strings, with each string containing the name of a field to display in the chart.", "title": "Fields" }, "linkURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing a URL to be launched in a browser when a user clicks the image.", "title": "Linkurl" }, "normalizeField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with charts. An optional string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field.", "title": "Normalizefield" }, "sourceURL": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Used with images. A string containing the URL to the image.", "title": "Sourceurl" }, "tooltipField": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String value indicating the tooltip for a chart specified from another field. This field is needed when related records are not used. It is used for showing tooltips from another field in the same layer or related layer/table.", "title": "Tooltipfield" } } }
- field colors = 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 = 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 = None (alias 'linkURL')
Used with images. A string containing a URL to be launched in a browser when a user clicks the image.
- field normalize_field = None (alias 'normalizeField')
Used with charts. An optional string containing the name of a field. The values of all fields in the chart will be normalized (divided) by the value of this field.
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.
Show JSON schema
{ "title": "Border", "description": "Optional border on the line that is used to improve the contrast of the line color against various background colors.", "type": "object", "properties": { "color": { "description": "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.", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "title": "color", "type": "array" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "A value between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" } }, "required": [ "color" ] }
Callout
- pydantic model arcgis.map.symbols.Callout
Callout configuration for a symbol.
Show JSON schema
{ "title": "Callout", "description": "Callout configuration for a symbol.", "type": "object", "properties": { "border": { "anyOf": [ { "$ref": "#/$defs/Border" }, { "type": "null" } ], "default": null }, "color": { "description": "The color of the line.", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "title": "color", "type": "array" }, "size": { "description": "The width of the line in points.", "minimum": 0.0, "title": "Size", "type": "number" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "A value between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" }, "type": { "const": "line", "default": "line", "description": "The type of the callout. A callout of type `line` connects an offset symbol or label with its location.", "enum": [ "line" ], "title": "Type", "type": "string" } }, "$defs": { "Border": { "description": "Optional border on the line that is used to improve the contrast of the line color against various background colors.", "properties": { "color": { "description": "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.", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "title": "color", "type": "array" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "A value between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" } }, "required": [ "color" ], "title": "Border", "type": "object" } }, "required": [ "color", "size" ] }
CimSymbolReference
- pydantic model arcgis.map.symbols.CimSymbolReference
Represents a symbol reference that contains a CIM symbol. In addition to type listed below, a symbol reference will contain additional properties.
Show JSON schema
{ "title": "CimSymbolReference", "description": "Represents a symbol reference that contains a CIM symbol. In addition to `type` listed below, a symbol reference will contain additional properties.", "type": "object", "properties": { "type": { "const": "CIMSymbolReference", "default": "CIMSymbolReference", "description": "Specifies the type of symbol used.", "enum": [ "CIMSymbolReference" ], "title": "Type", "type": "string" } }, "additionalProperties": true }
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.
Show JSON schema
{ "title": "ExtrudeSymbol3DLayer", "description": "ExtrudeSymbol3DLayer is used to render Polygon geometries by extruding them upward from the ground, creating a 3D volumetric object.", "type": "object", "properties": { "castShadows": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Boolean to control the shadow casting behavior of the rendered geometries.", "title": "Castshadows" }, "edges": { "anyOf": [ { "$ref": "#/$defs/SketchEdges" }, { "$ref": "#/$defs/SolidEdges" }, { "type": "null" } ], "default": null, "description": "Specifies an edge visualization style.", "title": "Edges" }, "enable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enable" }, "material": { "anyOf": [ { "$ref": "#/$defs/Material" }, { "type": "null" } ], "default": null }, "size": { "description": "Extrusion height in meters.", "title": "Size", "type": "number" }, "type": { "const": "Extrude", "default": "Extrude", "description": "Specifies the type of symbol used.", "enum": [ "Extrude" ], "title": "Type", "type": "string" } }, "$defs": { "Material": { "description": "The material used to shade the geometry.", "properties": { "color": { "anyOf": [ { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "color" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "A value between `100` (full transparency) and `0` (full opacity). Ignored if no color is specified.", "title": "Transparency" } }, "title": "Material", "type": "object" }, "SketchEdges": { "description": "The sketch edge rendering configuration of a symbol layer. Edges of type `sketch` are rendered with a hand-drawn look in mind.", "properties": { "color": { "description": "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.", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "title": "color", "type": "array" }, "extensionLength": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A size in points by which to extend edges beyond their original end points.", "title": "Extensionlength" }, "size": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Edge size in points, positive only", "title": "Size" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "The value has to lie between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" }, "type": { "const": "sketch", "default": "sketch", "description": "The type of edge visualization.", "enum": [ "sketch" ], "title": "Type", "type": "string" } }, "required": [ "color" ], "title": "SketchEdges", "type": "object" }, "SolidEdges": { "description": "The solid edge rendering configuration of a symbol layer. Edges of type `solid` are rendered in a single color, unaffected by scene lighting.", "properties": { "color": { "description": "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.", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "title": "color", "type": "array" }, "extensionLength": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A size in points by which to extend edges beyond their original end points.", "title": "Extensionlength" }, "size": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Edge size in points, positive only", "title": "Size" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "The value has to lie between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" }, "type": { "const": "solid", "default": "solid", "description": "The type of edge visualization.", "enum": [ "solid" ], "title": "Type", "type": "string" } }, "required": [ "color" ], "title": "SolidEdges", "type": "object" } }, "required": [ "size" ] }
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.
Show JSON schema
{ "title": "FillSymbol3DLayer", "description": "FillSymbol3DLayer is used to render the surfaces of flat 2D Polygon geometries and 3D volumetric meshes in a SceneView.", "type": "object", "properties": { "castShadows": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Boolean to control the shadow casting behavior of the rendered geometries (only applies to MeshSymbol3D).", "title": "Castshadows" }, "edges": { "anyOf": [ { "$ref": "#/$defs/SketchEdges" }, { "$ref": "#/$defs/SolidEdges" }, { "type": "null" } ], "default": null, "description": "Specifies an edge visualization style (only applies to MeshSymbol3D). Edges describe the style applied to visually important edges of 3D objects.", "title": "Edges" }, "enable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enable" }, "material": { "anyOf": [ { "$ref": "#/$defs/Material" }, { "type": "null" } ], "default": null }, "outline": { "anyOf": [ { "$ref": "#/$defs/Outline" }, { "type": "null" } ], "default": null, "description": "The outline of the symbol layer (only applies to PolygonSymbol3D)." }, "pattern": { "anyOf": [ { "$ref": "#/$defs/Pattern" }, { "type": "null" } ], "default": null }, "type": { "const": "Fill", "default": "Fill", "description": "Specifies the type of symbol used.", "enum": [ "Fill" ], "title": "Type", "type": "string" } }, "$defs": { "LineCap": { "description": "Shape of the tips at the start and end of each line geometry. This also applies to the tips of each pattern segment along the line.", "enum": [ "butt", "round", "square" ], "title": "LineCap", "type": "string" }, "LinePattern": { "description": "A pattern used to render a line.", "properties": { "style": { "$ref": "#/$defs/LineStyle" }, "type": { "const": "style", "default": "style", "description": "The type of pattern applied to a line.", "enum": [ "style" ], "title": "Type", "type": "string" } }, "required": [ "style" ], "title": "LinePattern", "type": "object" }, "LineStyle": { "description": "String value representing the pattern used to render a line.", "enum": [ "dash", "dash-dot", "dash-dot-dot", "dot", "long-dash", "long-dash-dot", "null", "short-dash", "short-dash-dot", "short-dash-dot-dot", "short-dot", "solid" ], "title": "LineStyle", "type": "string" }, "Material": { "description": "The material used to shade the geometry.", "properties": { "color": { "anyOf": [ { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "color" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "A value between `100` (full transparency) and `0` (full opacity). Ignored if no color is specified.", "title": "Transparency" } }, "title": "Material", "type": "object" }, "Outline": { "description": "The outline of the symbol layer.", "properties": { "color": { "anyOf": [ { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "color" }, "pattern": { "anyOf": [ { "$ref": "#/$defs/LinePattern" }, { "type": "null" } ], "default": null }, "patternCap": { "anyOf": [ { "$ref": "#/$defs/LineCap" }, { "type": "null" } ], "default": "butt" }, "size": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Outline size in points, positive only", "title": "Size" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "The value has to lie between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" } }, "title": "Outline", "type": "object" }, "Pattern": { "description": "The pattern used to render the fill of the polygon (only applies to PolygonSymbol3D).", "properties": { "style": { "$ref": "#/$defs/PolygonStyle" }, "type": { "const": "style", "default": "style", "description": "The type of pattern applied to the polygon fill.", "enum": [ "style" ], "title": "Type", "type": "string" } }, "required": [ "style" ], "title": "Pattern", "type": "object" }, "PolygonStyle": { "description": "String value representing predefined styles that can be set as polygon fills.", "enum": [ "backward-diagonal", "cross", "diagonal-cross", "forward-diagonal", "horizontal", "none", "solid", "vertical" ], "title": "PolygonStyle", "type": "string" }, "SketchEdges": { "description": "The sketch edge rendering configuration of a symbol layer. Edges of type `sketch` are rendered with a hand-drawn look in mind.", "properties": { "color": { "description": "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.", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "title": "color", "type": "array" }, "extensionLength": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A size in points by which to extend edges beyond their original end points.", "title": "Extensionlength" }, "size": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Edge size in points, positive only", "title": "Size" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "The value has to lie between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" }, "type": { "const": "sketch", "default": "sketch", "description": "The type of edge visualization.", "enum": [ "sketch" ], "title": "Type", "type": "string" } }, "required": [ "color" ], "title": "SketchEdges", "type": "object" }, "SolidEdges": { "description": "The solid edge rendering configuration of a symbol layer. Edges of type `solid` are rendered in a single color, unaffected by scene lighting.", "properties": { "color": { "description": "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.", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "title": "color", "type": "array" }, "extensionLength": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "A size in points by which to extend edges beyond their original end points.", "title": "Extensionlength" }, "size": { "anyOf": [ { "minimum": 0.0, "type": "number" }, { "type": "null" } ], "default": null, "description": "Edge size in points, positive only", "title": "Size" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "The value has to lie between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" }, "type": { "const": "solid", "default": "solid", "description": "The type of edge visualization.", "enum": [ "solid" ], "title": "Type", "type": "string" } }, "required": [ "color" ], "title": "SolidEdges", "type": "object" } } }
- field cast_shadows = True (alias 'castShadows')
Boolean to control the shadow casting behavior of the rendered geometries (only applies to MeshSymbol3D).
Font
- pydantic model arcgis.map.symbols.Font
Font used for text symbols.
Show JSON schema
{ "title": "Font", "description": "Font used for text symbols.", "type": "object", "properties": { "decoration": { "anyOf": [ { "$ref": "#/$defs/Decoration" }, { "type": "null" } ], "default": "none", "description": "The text decoration." }, "family": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The font family.", "title": "Family" }, "size": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The font size in points. Ignored when font is used on TextSymbol3DLayer.", "title": "Size" }, "style": { "anyOf": [ { "$ref": "#/$defs/Style" }, { "type": "null" } ], "default": "normal", "description": "The text style." }, "weight": { "anyOf": [ { "$ref": "#/$defs/Weight" }, { "type": "null" } ], "default": "normal", "description": "The text weight." } }, "$defs": { "Decoration": { "description": "The text decoration.", "enum": [ "line-through", "none", "underline" ], "title": "Decoration", "type": "string" }, "Style": { "description": "The text style.", "enum": [ "italic", "normal", "oblique" ], "title": "Style", "type": "string" }, "Weight": { "description": "The text weight.", "enum": [ "bold", "bolder", "lighter", "normal" ], "title": "Weight", "type": "string" } } }
Halo
- pydantic model arcgis.map.symbols.Halo
Halo definition.
Show JSON schema
{ "title": "Halo", "description": "Halo definition.", "type": "object", "properties": { "color": { "anyOf": [ { "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "color" }, "size": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Width of the halo in points.", "title": "Size" }, "transparency": { "anyOf": [ { "maximum": 100, "minimum": 0, "type": "integer" }, { "type": "null" } ], "default": null, "description": "A value between `100` (full transparency) and `0` (full opacity).", "title": "Transparency" } } }
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.
Show JSON schema
{ "title": "IconSymbol3DLayer", "description": "IconSymbol3DLayer is used to render Point geometries using a flat 2D icon (e.g. a circle) with a PointSymbol3D in a SceneView.", "type": "object", "properties": { "anchor": { "anyOf": [ { "$ref": "#/$defs/Anchor" }, { "type": "null" } ], "default": "center" }, "anchorPosition": { "anyOf": [ { "items": { "type": "number" }, "maxItems": 2, "minItems": 2, "type": "array" }, { "type": "null" } ], "default": null, "description": "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.", "title": "Anchorposition" }, "enable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Enable" }, "material": { "anyOf": [ { "$ref": "#/$defs/Material" }, { "type": "null" } ], "default": null }, "outline": { "anyOf": [ { "$ref": "#/$defs/Outline" }, { "type": "null" } ], "default": null, "description": "Sets properties of the outline of the IconSymbol3DLayer." }, "resource": { "anyOf": [ { "$ref": "#/$defs/IconSymbol3DLayerResource" }, { "type": "null" } ], "default": null, "description": "The shape (primitive) or image URL (href) used to visualize the features.", "title": "IconSymbol3DLayer Resource" }, "size": { "description": "Icon size in points, positive only", "minimum": 0.0, "title": "Size", "type": "number" }, "type": { "const": "Icon", "default": "Icon", "description": "Specifies the type of symbol used.", "enum": [ "Icon" ], "title": "Type", "type": "string" } }, "$defs": { "Anchor": { "enum": [ "bottom", "bottomLeft", "bottomRight", "center", "left", "origin", "relative", "right", "top", "topLeft", "topRight" ], "title": "Anchor", "type": "string" },