Basemap class final

A basemap is a non-editable layer that provides background, or reference information, in your map or scene.

A basemap provides a background of geographical context for the content you display in a map or scene. It provides a visual reference to help orient users and a framework on which you can overlay operational layers, perform analysis, and visualize geographic information. The content of a basemap is typically static and does not change frequently.

A basemap is composed of a collection of base layers (Basemap.baseLayers) and reference layers (Basemap.referenceLayers). Base layers are displayed at the bottom of a map or scene, and reference layers are displayed at the top, with the GeoModel.operationalLayers between them.

Typically, you construct a basemap using a basemap style:

  • Use image tile basemap styles for satellite imagery and hillshade.
  • Use vector tile basemap styles such as streets navigation, light gray canvas, and OpenStreetMap (OSM).
  • Create custom basemap styles with your own colors, glyphs, and fonts using the ArcGIS Vector Tile Style Editor.

See BasemapStyle for the full range of the basemap styles provided by Esri. Basemap styles allow you to take advantage of geographically load-balanced services and monitor usage with API keys or named users. See Basemap layers for more information.

If your app works offline, you can construct a local basemap from a tiled layer using a TileCache, such as a tile package (.tpk, .tpkx, .vtpk) or a compact cache, stored on the device.

Implemented types
Mixed in types

Constructors

Basemap()
Creates a basemap. Layers need to be added to the basemap before it can be used.
factory
Basemap.fromJson(Map<String, dynamic> json)
factory
Basemap.fromJsonString(String jsonString)
factory
Basemap.withBaseLayer(Layer? baseLayer)
Creates a basemap with a single base layer.
factory
Basemap.withItem(Item item)
Creates a basemap with a portal item of type PortalItemType.webMap.
factory
Basemap.withLayers({required List<Layer> baseLayers, required List<Layer> referenceLayers})
Creates a basemap with collections of base and reference layers.
factory
Basemap.withStyle(BasemapStyle style, {BasemapStyleParameters? parameters})
Creates a basemap from an initial BasemapStyle with additional parameters to control settings like language.
factory

Properties

apiKey String
The API key allows your app to access ArcGIS location services and private portal items.
getter/setter pairoverride
baseLayers List<Layer>
The collection of base layers in this basemap.
no setter
hashCode int
The hash code for this object.
no setterinherited
item Item?
The portal item associated with this basemap.
no setter
loadError ArcGISException?
The load error.
no setterinherited
loadStatus LoadStatus
The load status.
no setterinherited
name String
The name of this basemap.
getter/setter pair
onLoadStatusChanged Stream<LoadStatus>
A stream that reports changes to the LoadStatus.
no setterinherited
referenceLayers List<Layer>
The collection of reference layers in this basemap.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri?
The URI of this basemap.
no setter

Methods

cancelLoad() → void
Cancels loading metadata for the object.
inherited
clone() Basemap
Clones this instance of Basemap and its members.
load() Future<void>
Loads the metadata for the object asynchronously.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retryLoad() Future<void>
Loads or retries loading metadata for the object asynchronously.
inherited
toJson() Map<String, dynamic>
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
toJsonString() String
Returns a JSON representation of this Object as a String.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

withUri(Uri uri) Basemap?
Creates a basemap with the URI.