The result of fetching the basemaps available for a portal. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Properties
Signals
- countChanged()
- errorChanged()
- itemAdded(int index)
- itemRemoved(int index)
Methods
- void append(Basemap basemap)
- void clear()
- bool contains(Basemap basemap)
- error forEach(callback)
- Basemap get(int index)
- int indexOf(Basemap basemap)
- void insert(int index, Basemap basemap)
- void move(int from, int to)
- void remove(int index, int count)
- void removeOne(Basemap basemap)
Detailed Description
The request is made by calling fetchBasemaps and if the operation is succesful, this type is returned by the portal's basemaps method.
The basemaps contained in the model are initially unloaded.
The model returns data for the following roles:
Role | Type | Description |
---|---|---|
name | string | The basemap's name. |
url | url | The basemap's URL. |
accessInformation | string | The item's access information. |
created | date | The date this item was created. |
description | string | The item's description. |
itemId | string | The item's ID. |
type | Enums.ItemType | The item's type. |
modified | date | The date this item was last modified. |
snippet | string | The item's snippet. |
tags | list<string> | The item's tags. |
title | string | The item's title. |
thumbnailUrl | url | The local file URL of the thumbnail image for this item. |
Example: Accessing roles from a BasemapListModel from within a QML delegate:
Image { id: basemapImg anchors { bottom: basemapLabel.top; horizontalCenter: parent.horizontalCenter } height: parent.height - ( basemapLabel.height * 2 ); width: height source: thumbnailUrl fillMode: Image.PreserveAspectCrop } Text { id: basemapLabel anchors { bottom: parent.bottom; left: parent.left; right: parent.right } height: 16 z: 100 horizontalAlignment: Text.AlignHCenter text: title wrapMode: Text.Wrap elide: Text.ElideRight font.pointSize: 8 font.bold: index === basemapsGrid.currentIndex }
See also Portal, Basemap, and Loadable.
Property Documentation
error : Error |
Returns the Error object (read-only).
Signal Documentation
Emitted when the count
property of the model changes.
Note: The corresponding handler is onCountChanged
.
Signal emitted when the error
property changes, which can indicate that an error occurred.
Note: The corresponding handler is onErrorChanged
.
Signal emitted when an item is added to the list model.
index is the index of the added Item.
Note: The corresponding handler is onItemAdded
.
This signal was introduced in Esri.ArcGISRuntime 100.15.
Signal emitted when an item is removed from the list model.
index is the index of the removed Item.
Note: The corresponding handler is onItemRemoved
.
This signal was introduced in Esri.ArcGISRuntime 100.15.
Method Documentation
bool contains(Basemap basemap) |
Returns true
if the list model contains the specified basemap.
Receives a callback function to execute for each Basemap in the model.
The callback function can take 0 to 3 optional arguments, in order:
- element Current Basemap.
- index Current index in array.
- array Reference to BasemapListModel.
Returns undefined if no error occurred, and an error message otherwise.
const error = BasemapListModel.forEach(function(element, index, array) { ... }); if (error) { console.error(error.message); }
int indexOf(Basemap basemap) |
Returns the index of the basemap specified.
This method was introduced in Esri::ArcGISRuntime 100.5..
void insert(int index, Basemap basemap) |
Inserts a Basemap basemap at the specified index in the list.
Moves one Basemap from an index in the list model to a different index.
Removes one or more objects starting at the specified index.
- index Index of first object to remove.
- count Number of objects to remove. This parameter defaults to
1
.
void removeOne(Basemap basemap) |
Removes the specified basemap (basemap) from the list model.
This method was introduced in Esri::ArcGISRuntime 100.5..