The user interface for the BasemapGallery. More...
Since: | Esri.ArcGISRuntime 100.12 |
Properties
- allowTooltips : bool
- controller : var
- currentBasemap : var
- gallery : var
- geoModel : var
- portal : var
- style : int
Methods
- void setGeoModelFromGeoView(GeoView view)
Detailed Description
The BasemapGallery displays a collection of items representing basemaps from either ArcGIS Online, a user-defined portal, or an array of Basemaps. When the user selects a basemap from the BasemapGallery, the basemap rendered in the current geoModel is removed from the given map/scene and replaced with the basemap selected in the gallery.
Note: By default, the BasemapGallery will attempt to fetch the set of developer basemaps, which require an access token to access.
Property Documentation
allowTooltips : bool |
When this property is true, mouse-hover tooltips are enabled for gallery items.
Defaults to true
.
controller : var |
The controller handles binding logic between the BasemapGallery and the GeoModel
and the Portal
where applicable.
The CPP controller is documented here.
currentBasemap : var |
Currently applied basemap on the associated GeoModel
. This may be a basemap which does not exist in the gallery.
gallery : var |
The list of basemaps currently visible in the gallery. Items added or removed from this list will update the gallery.
geoModel : var |
The GeoModel
for this tool. Should be a Scene
or a Map
.
portal : var |
The Portal
contains basemaps which will be fetched and displayed in the gallery if applicable. When a valid Portal is set then `Portal.fetchBasemapsAsync` is immediately called.
Note: Changing the current active portal will reset the contents of the gallery.
style : int |
The style of the basemap gallery. The gallery can be displayed as a list, grid, or automatically switch between the two based on screen real estate.
Defaults to ViewStyle.Automatic
.
Method Documentation
void setGeoModelFromGeoView(GeoView view) |
Convenience function for QML/C++ users which allows the map/scene to be extracted from a SceneView or MapView assigned to view in QML code.
This is only a concern as [Map/Scene]QuickView does not expose a [Map/Scene] property in QML.
For example, to hook up BasemapGallery with a MapQuickView:
MapView { BasemapGallery { id: gallery anchors { left: view.left top: view.top margins: 5 } onMapChanged: gallery.setGeoModelFromGeoView(this) }