;

GeoModel Class

  • GeoModel
  • class Esri::ArcGISRuntime::GeoModel

    A base class for either a Map or a Scene. More...

    Header: #include <GeoModel>
    Since: Esri::ArcGISRuntime 100.12
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::Loadable
    Inherited By:

    Esri::ArcGISRuntime::Map and Esri::ArcGISRuntime::Scene

    This class was introduced in Esri::ArcGISRuntime 100.12.

    Public Functions

    virtual ~GeoModel() override
    Esri::ArcGISRuntime::Basemap *basemap() const
    Esri::ArcGISRuntime::BasemapStyle basemapStyle() const
    Esri::ArcGISRuntime::BookmarkListModel *bookmarks() const
    Esri::ArcGISRuntime::GeoModelFloorDefinition *floorDefinition() const
    Esri::ArcGISRuntime::FloorManager *floorManager() const
    Esri::ArcGISRuntime::Viewpoint initialViewpoint() const
    bool isAutoFetchLegendInfos() const
    Esri::ArcGISRuntime::Item *item() const
    Esri::ArcGISRuntime::LegendInfoListModel *legendInfos() const
    Esri::ArcGISRuntime::LoadSettings *loadSettings() const
    Esri::ArcGISRuntime::LayerListModel *operationalLayers() const
    void setAutoFetchLegendInfos(bool autoFetchLegendInfos)
    void setBasemap(Esri::ArcGISRuntime::Basemap *basemap)
    void setFloorDefinition(Esri::ArcGISRuntime::GeoModelFloorDefinition *floorDefinition)
    void setInitialViewpoint(const Esri::ArcGISRuntime::Viewpoint &initialViewpoint)
    void setItem(Esri::ArcGISRuntime::Item *item)
    void setLoadSettings(Esri::ArcGISRuntime::LoadSettings *loadSettings)
    Esri::ArcGISRuntime::SpatialReference spatialReference() const
    Esri::ArcGISRuntime::FeatureTableListModel *tables() const
    QList<Esri::ArcGISRuntime::TransportationNetworkDataset *> transportationNetworks() const
    QString version() const

    Reimplemented Public Functions

    virtual void cancelLoad() override
    virtual void load() override
    virtual Esri::ArcGISRuntime::Error loadError() const override
    virtual Esri::ArcGISRuntime::LoadStatus loadStatus() const override
    virtual void retryLoad() override

    Signals

    void doneLoading(Esri::ArcGISRuntime::Error loadError)
    void loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Detailed Description

    The base class GeoModel represents the model in a model-view-controller (MVC) architecture, while GeoView represents the view. Map and Scene derive from GeoModel.

    You provide a GeoModel to the appropriate type of view:

    Member Function Documentation

    [signal] void GeoModel::doneLoading(Esri::ArcGISRuntime::Error loadError)

    Signal emitted when this object is done loading.

    • loadError - Details about any error that may have occurred

    Note: If there is a load error, it will also be emitted on the errorOccurred signal.

    See also Loadable and Object.

    [signal] void GeoModel::loadStatusChanged(Esri::ArcGISRuntime::LoadStatus loadStatus)

    Signal emitted when the load status changes for this object.

    See also Loadable.

    [override virtual] GeoModel::~GeoModel()

    Destructor.

    Esri::ArcGISRuntime::Basemap *GeoModel::basemap() const

    Returns optional layers in a map or scene that show background information, roads, landmarks, and so on, to help orient the user of the map or scene.

    Typically these are image tile or vector tile layer types. Basemaps can be composed of different layers organized in Basemap::baseLayers (displayed beneath other layers) and Basemap::referenceLayers (displayed on top of other layers). You can use ready-to-use basemaps, style your own with the ArcGIS Vector Tile Style Editor, or create and publish your own with ArcGIS Pro.

    See also setBasemap() and Basemap.

    Esri::ArcGISRuntime::BasemapStyle GeoModel::basemapStyle() const

    Returns the basemap style the map or scene was created from.

    Esri::ArcGISRuntime::BookmarkListModel *GeoModel::bookmarks() const

    Returns the bookmarks for the map or scene.

    The Map only supports the ViewpointType::BoundingGeometry viewpoint (declared with an extent). The ViewpointType::CenterAndScale viewpoint (declared around a center point) are not supported in the Map.

    The collection is specific to this GeoModel.

    See also Bookmark.

    [override virtual] void GeoModel::cancelLoad()

    Reimplements: Loadable::cancelLoad().

    Cancels loading metadata for the object.

    Cancels loading the metadata if the object is loading and always calls doneLoading.

    Esri::ArcGISRuntime::GeoModelFloorDefinition *GeoModel::floorDefinition() const

    Defines the properties that allow a map or a scene to be floor-aware.

    A floor-aware geo-model is a map or a scene that contains indoor GIS data representing floor plan features. The floor definition must contain GeoModelFloorDefinition::levelLayerDefinition and GeoModelFloorDefinition::facilityLayerDefinition properties at a minimum. The GeoModelFloorDefinition::siteLayerDefinition property is optional. When it is nullptr (default value) this geo-model does not support floor filtering.

    Please note that upon setting floorDefinition, the current FloorManager is invalidated.

    See also setFloorDefinition().

    Esri::ArcGISRuntime::FloorManager *GeoModel::floorManager() const

    Returns the helper class for working with floor filtering.

    This property is created using the floor-aware metadata defined by floorDefinition, if not-null. This property is nullptr if the map/scene does not support floor filtering. A FloorManager must be loaded before you can access its properties.

    Please note that the floorManager is invalidated upon setting the floorDefinition.

    See also FloorManager.

    Esri::ArcGISRuntime::Viewpoint GeoModel::initialViewpoint() const

    Returns the initial viewpoint for the map or scene.

    The visible area of a map or scene after the map or scene first loads. Your app uses it until you add the model, map, or scene to a view and set the viewpoint for the view. After the view has a viewpoint, this InitialViewpoint property is ignored.

    To set the viewpoint for a view, you use a viewpoint method, such as one of the following.

    See also setInitialViewpoint().

    bool GeoModel::isAutoFetchLegendInfos() const

    Returns whether legend infos are automatically fetched by the operational layers in the geo model.

    Returns true if legend infos will be fetched automatically when the LegendInfoListModel is instantiated.

    Esri::ArcGISRuntime::Item *GeoModel::item() const

    Returns the item for the map or scene.

    An ID for a resource, such as a PortalItem (for maps created from a portal) or a LocalItem (for maps and scenes in a map or scene package). Note that a map or scene cannot be instantiated from a LocalItem.

    See also setItem().

    Esri::ArcGISRuntime::LegendInfoListModel *GeoModel::legendInfos() const

    Returns a list model containing legend infos for the geo model's operational layers and any sublayers.

    Returns a LegendInfoListModel representing the legend information for the geo model's operational layers and their sublayers.

    [override virtual] void GeoModel::load()

    Reimplements: Loadable::load().

    Loads the metadata for the object asynchronously.

    Loads the metadata if the object is not loaded and always calls doneLoading.

    [override virtual] Esri::ArcGISRuntime::Error GeoModel::loadError() const

    Reimplements: Loadable::loadError() const.

    Returns the load error.

    See also Error.

    Esri::ArcGISRuntime::LoadSettings *GeoModel::loadSettings() const

    Returns set default behaviors (preferences) and control the rendering behaviors for maps and scenes as they load.

    Set preferences and control rendering behaviors when maps and scenes load. For example, you can specify which tiling mode should be used when feature layers are added or specify whether feature tables should use advanced symbology.

    See also setLoadSettings().

    [override virtual] Esri::ArcGISRuntime::LoadStatus GeoModel::loadStatus() const

    Reimplements: Loadable::loadStatus() const.

    Returns the load status.

    See also LoadStatus.

    Esri::ArcGISRuntime::LayerListModel *GeoModel::operationalLayers() const

    Returns layers that reference data from a file or a service and are typically used to visualize the data in a map or scene, for example, a fleet of vehicles being tracked on a map.

    Operational layers, which display on top of the Basemap::baseLayers, are hosted and managed on the ArcGIS Platform as feature layers, KML layers, WFS layers, tile layers, and more. Several layer types can also be used by your ArcGIS Runtime app as local layers, such as feature layers and tiled layers. You cannot reuse a layer collection coming from a different map or scene. Instead, you must create a new collection of Layer.

    See also Layer and Basemap::baseLayers.

    [override virtual] void GeoModel::retryLoad()

    Reimplements: Loadable::retryLoad().

    Returns loads or retries loading metadata for the object asynchronously.

    Will retry loading the metadata if the object is failed to load. Will load the object if it is not loaded. Will not retry to load the object if the object is loaded. Will always call the done loading if this is called.

    void GeoModel::setAutoFetchLegendInfos(bool autoFetchLegendInfos)

    Sets whether legend infos are automatically fetched by the operational layers in the geo model.

    Set autoFetchLegendInfos to true to have legend infos fetched automatically when the LegendInfoListModel is instantiated.

    See also isAutoFetchLegendInfos().

    void GeoModel::setBasemap(Esri::ArcGISRuntime::Basemap *basemap)

    Sets the basemap to basemap.

    See also basemap.

    void GeoModel::setFloorDefinition(Esri::ArcGISRuntime::GeoModelFloorDefinition *floorDefinition)

    Sets the floorDefinition to floorDefinition.

    Please note that upon setting floorDefinition, the current FloorManager is invalidated.

    See also floorDefinition.

    void GeoModel::setInitialViewpoint(const Esri::ArcGISRuntime::Viewpoint &initialViewpoint)

    Sets the initialViewpoint to initialViewpoint.

    See also initialViewpoint.

    void GeoModel::setItem(Esri::ArcGISRuntime::Item *item)

    Sets the item to item.

    See also item.

    void GeoModel::setLoadSettings(Esri::ArcGISRuntime::LoadSettings *loadSettings)

    Sets the loadSettings to loadSettings.

    See also loadSettings.

    Esri::ArcGISRuntime::SpatialReference GeoModel::spatialReference() const

    Returns a well-known ID (WKID) integer value or a text string definition referred to as a well-known text (WKT) representation that identifies how a geometry's coordinates relate to real-world space.

    Spatial reference ensures that spatial data in different layers or graphic overlays can be used together for accurate viewing or analysis.

    See also SpatialReference.

    Esri::ArcGISRuntime::FeatureTableListModel *GeoModel::tables() const

    Returns a list of tables in the map or scene. Unlike operationalLayers, Tables are not displayed by the GeoView.

    The collection is specific to this GeoModel. Tables can be added and removed from the GeoModel through this model. Tables are not loaded by default. Tables are loaded internally when asynchronous operations such as query are performed. Alternatively, they can be loaded by calling FeatureTable::load.

    See also FeatureTable.

    QList<Esri::ArcGISRuntime::TransportationNetworkDataset *> GeoModel::transportationNetworks() const

    Returns a collection of transportation network datasets defined for the map or scene.

    Map and Scene authors can use ArcGIS Pro to create mobile map or scene packages containing maps and scenes that include transportation networks. If so, this property will be populated with the collection of TransportationNetworkDataset objects.

    A TransportationNetworkDataset from this collection can be used to construct one of the network analysis tasks (such as RouteTask, ServiceAreaTask, and ClosestFacilityTask).

    See also RouteTask and MobileScenePackage.

    QString GeoModel::version() const

    Returns the version for the map or scene.

    The version for the web map or web scene specification used by ArcGIS Runtime. This value is used to for persistence. The incoming version can be different.

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