ESRI Map

Last Updated: February 15, 2017

class tethys_sdk.gizmos.ESRIMap(height='100%', width='100%', basemap='topo', view={'center': [-100, 40], 'zoom': 2}, layers=[])

ESRI Map View

The ESRI Map View is similar to Map View, but it is powered by ArcGIS API for JavaScript 4.0

Attributes
height(string, required): Height of map container in normal css units width(string, required): Width of map container in normal css units basemap(string, required): Basemap layer. Values=[streets,satellite,hybrid,topo,gray,dark-gray,oceans, national-geographic,terrain,osm,dark-gray-vector,gray-vector,street-vector, topo-vector,streets-night-vector,streets-relief-vector,streets-navigation-vector] zoom(string,required): Zoom Level of the Basemap. view(EMView): An EVView object specifying the initial view or extent for the map

Example

# CONTROLLER
from tethys_sdk.gizmos import ESRIMapView

esri_map_view_options = {'height': '700px',
                           'width': '100%',
                           'basemap':'topo'}

# TEMPLATE

{% gizmo esri_map_view_options %}

EMLayer

class tethys_sdk.gizmos.EMLayer(type, url)

EMLayer objects are used to define map layers for the ESRI Map Gizmo.

type

The ESRI Layer Type (e.g.: FeatureLayer, ImageLayer)

Type:str,required
url

The ESRI Layer WMS url

Type:str,required

Example

#Define ArcGIS FeatureLayer

esri_feature_layer = EMLayer(type='FeatureLayer', url='http://geoserver.byu.edu/arcgis/rest/services/Alabama_Flood/Flood_45/MapServer/0')

#Define ArcGIS ImageLayer

esri_image_layer = EMLayer(type='ImageryLayer', url='https://sampleserver6.arcgisonline.com/arcgis/rest/services/NLCDLandCover2001/ImageServer')

EMView

s .. autoclass:: tethys_sdk.gizmos.EMView