The MapObjectView is used to populate Map from a model. More...
This element was introduced in Mobility 1.2.
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.
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 property group was introduced in Mobility 1.2.
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 property group was introduced in 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 property group was introduced in 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 property group was introduced in Mobility 1.2.