Basemap QML Type

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

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 100.0
    Inherits:

    Object

    Properties

    Signals

    Methods

    Detailed Description

    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 (baseLayers) and reference layers (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 Enums.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.

    This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

    TypeDefault Property
    LayerbaseLayers (appends to model)
    ArcGISItemitem
    Credentialcredential (since Esri.ArcGISRuntime 100.10)
    RequestConfigurationrequestConfiguration (since Esri.ArcGISRuntime 100.10)

    Example:

    Add a tiled map service to your map's basemap:

    Map {
        id: map
        Basemap {
            ArcGISTiledLayer {
                url: sampleServerWorldStreetMapUrl
            }
        }
    }

    See also ApiKeyResource, JsonSerializable, Loadable, and Basemap.

    Property Documentation

    [since Esri.ArcGISRuntime 100.11] apiKey : string

    Returns the API key.

    This property was introduced in Esri.ArcGISRuntime 100.11.

    See also ApiKeyResource.


    [default] baseLayers : LayerListModel

    Returns the collection of base layers in this basemap (read-only).

    This property may be populated after the basemap loads.

    Base layers are drawn beneath all other layers in the Map or Scene. They are designed to provide a visual reference to help orient the user. Aerial imagery, terrain, and streets are examples of basemap layers. The collection can be empty but it is never null.

    This collection is specific to this basemap so you cannot reuse a collection coming from another Basemap.

    See also Layer and GeoModel::operationalLayers.


    [default, since Esri.ArcGISRuntime 100.10] credential : Credential

    The credential to be used to access a secured basemap.

    A credential can only be provided before the basemap is loaded.

    This property was introduced in Esri.ArcGISRuntime 100.10.


    [read-only] error : Error

    Returns the error object (read-only).

    See also Loadable and Error.


    [since Esri.ArcGISRuntime 100.10] initStyle : Enums.BasemapStyle

    Returns the Enums.BasemapStyle that was used to instantiate the basemap.

    This can only be assigned one time and only during instantiation.

    If the basemap was created by some other means than this property, this value will return Enums.BasemapStyleNone.

    This property was introduced in Esri.ArcGISRuntime 100.10.


    [default] item : ArcGISItem

    A portal item that can be used to initialize the Basemap.

    Note that this property can only be changed or assigned before the basemap is loaded with layers.

    See also Loadable.


    json : jsobject

    JSON that can be used to instantiate the type instance.


    [read-only] loadError : Error

    Returns the load error (read-only).

    Note: load errors are also reported on the error property and emit the errorChanged signal.

    See also Loadable.


    [read-only] loadStatus : Enums.LoadStatus

    Returns the load status (read-only).

    See also Loadable and Enums.LoadStatus.


    name : string

    The name of the Basemap.


    [read-only] referenceLayers : LayerListModel

    Returns the LayerListModel of the referenceLayers (read-only).

    This property may be populated after the basemap loads.

    Reference layers are drawn on top all other layers in the Map or Scene to display information such as boundaries, labels, and traffic networks. The collection can be empty but it is never null.

    This collection is specific to this basemap so you cannot reuse a collection coming from another Basemap.

    See also Layer, GeoModel::operationalLayers, and baseLayers.


    [default, since Esri.ArcGISRuntime 100.10] requestConfiguration : RequestConfiguration

    The configuration parameters used for network requests sent by this basemap.

    This property was introduced in Esri.ArcGISRuntime 100.10.


    [read-only] unknownJson : jsobject

    Returns the unknown JSON from the source JSON.

    See also JsonSerializable.


    [read-only] unsupportedJson : jsobject

    Returns the unsupported data from the source JSON.

    See also JsonSerializable.


    url : url

    Returns the URL of the Basemap.

    url may be a direct URL to web map JSON content or the URL of a portal item.

    The URL can be one of three possible types:

    • The item details page : https://www.myPortal.com/home/item.html?id=12345678901234567890123456789012
    • The map view page : https://www.myPortal.com/home/webmap/viewer.html?webmap=12345678901234567890123456789012
    • The sharing data page : https://www.myPortal.com/sharing/rest/content/items/12345678901234567890123456789012/data

    Note: This property may only be assigned before the Basemap is loaded.


    Signal Documentation

    [since Esri.ArcGISRuntime 100.11] apiKeyChanged()

    Emitted when the apiKey property changes.

    Note: The corresponding handler is onApiKeyChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.11.


    [since Esri.ArcGISRuntime 100.10] credentialChanged()

    Emitted when the credential property changes.

    Note: The corresponding handler is onCredentialChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.10.


    [since Esri.ArcGISRuntime 100.10] initStyleChanged()

    Emitted when the initStyle property changes.

    Note: The corresponding handler is onInitStyleChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.10.


    itemChanged()

    Emitted when the item property of this Basemap changes.

    Note: The corresponding handler is onItemChanged.


    loadErrorChanged()

    Emitted when the loadError property of this Basemap changes.

    Note: load errors are also reported on the error property and emit the errorChanged signal.

    Note: The corresponding handler is onLoadErrorChanged.

    See also Loadable and Object.


    loadStatusChanged()

    Emitted when the loadStatus property of this Basemap changes.

    Note: The corresponding handler is onLoadStatusChanged.

    See also Loadable.


    nameChanged()

    Emitted when the name property of this Basemap changes.

    Note: The corresponding handler is onNameChanged.


    [since Esri.ArcGISRuntime 100.10] requestConfigurationChanged()

    Emitted when the requestConfiguration property changes.

    Note: The corresponding handler is onRequestConfigurationChanged.

    This signal was introduced in Esri.ArcGISRuntime 100.10.


    urlChanged()

    Emitted when the url property of this Basemap changes.

    Note: The corresponding handler is onUrlChanged.


    Method Documentation

    void cancelLoad()

    Cancels loading if it is in progress.

    See also Loadable.


    [since Esri.ArcGISRuntime 200.1] Basemap clone()

    Creates a deep copy of this object.

    All objects referenced by the basemap, such as layers or portal item, are copied as well.

    This method was introduced in Esri.ArcGISRuntime 200.1.


    void load()

    See also Loadable.


    void retryLoad()

    See also Loadable.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.