arcgis.widgets module¶
The arcgis.widgets module provides components for visualizing GIS data and analysis. This module includes the MapView Jupyter notebook widget for visualizing maps and layers
MapView¶
-
class
arcgis.widgets.
MapView
(**kwargs)¶ Bases:
ipywidgets.widgets.domwidget.DOMWidget
Mapping widget for Jupyter Notebook
-
add_layer
(item, options=None)¶ Adds layers from the provided item
-
basemap
¶ A trait for unicode strings.
-
center
¶ An instance of a Python list.
-
clear_graphics
()¶
-
draw
(shape, popup=None, symbol=None, attributes=None)¶ Draws a shape.
Arguments: shape is one of [“circle”, “downarrow”, “ellipse”, “extent”, “freehandpolygon”, “freehandpolyline”, “leftarrow”, “line”, “multipoint”, “point”, “polygon”, “polyline”, “rectangle”, “rightarrow”, “triangle”, “uparrow”, or geometry dict object]
popup is a dict containing “title” and “content” as keys that will be displayed when the shape is clicked
symbol is a symbol specified in json format as described at http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000n5000000 a default symbol is used is one is not specified. Tip: a helper utility to get the symbol format for several predefined symbols is available at https://developers.arcgis.com/javascript/3/samples/portal_symbols/
attributes is a dict containing name value pairs of fields and field values associated with the graphic.
-
end_time
¶ A trait for unicode strings.
-
extent
¶
-
id
¶ A trait for unicode strings.
-
mode
¶ A trait for unicode strings.
-
on_click
(callback, remove=False)¶ Register a callback to execute when the map is clicked.
The callback will be called with one argument, the clicked widget instance.
- remove : bool (optional)
- Set to true to remove the callback from the list of callbacks.
-
on_draw_end
(callback, remove=False)¶ Register a callback to execute when something is drawn
The callback will be called with two argument, the clicked widget instance, and the geometry drawn
- remove : bool (optional)
- Set to true to remove the callback from the list of callbacks.
-
remove_layers
()¶
-
set_time_extent
(start_time, end_time)¶
-
start_time
¶ A trait for unicode strings.
-
width
¶ A trait for unicode strings.
-
zoom
¶ An int trait.
-