QtMobility Reference Documentation

Contents

QML MapObjectView Element

The MapObjectView is used to populate Map from a model. More...

  • List of all members, including inherited members
  • Properties

    Detailed Description

    The MapObjectView is used to populate Map with MapObjects from a model. The MapObjectView element only makes sense when contained in a Map object, meaning that it has no standalone presentation.

    Note: For model data, currently only LandmarkModel is supported. Using other types of models results in undefined behavior.

    Assuming you have a LandmarkModel identified by landmarkModel, an example usage:

             Map {
                 id: map
                 plugin : Plugin { name : "nokia" }
                 anchors.fill: parent; size.width: parent.width; size.height: parent.height; zoomLevel: 12
                 center: myPositionSource.position.coordinate
    
                 MapObjectView {
                     id: circle_basic_view
                     model: landmarkModel
                     delegate: Component {
                         id: circleMapDelegate
                         MapCircle {
                             color: "red"
                             radius: 500
                             center: landmark.coordinate
                         }
                     }
                 }

    The MapObjectView element is part of the QtMobility.location 1.2 module.

    Property Documentation

    delegate : Component

    This property holds the delegate which defines how each item in the model should be displayed. The Component must contain exactly one MapObject -derived element as the root element.

    This documentation was introduced in Qt Mobility Mobility 1.2.


    model : model

    This property holds the model that provides data for populating data with delegates.

    Note: Currently only LandmarkModel is supported. Using other models results in undefined behavior.

    This documentation was introduced in Qt Mobility Mobility 1.2.


    visible : bool

    This property holds whether the delegate objects created from the model are visible or not. Default value is true.

    This documentation was introduced in Qt Mobility Mobility 1.2.


    z : int

    This property holds the z-value of the MapObjectView. It determines the z-value of the instantiated delegates.

    As with other Map objects, objects with same z-value are drawn in insertion order.

    This documentation was introduced in Qt Mobility Mobility 1.2.