MapObjectView QML Type

The MapObjectView is used to populate Map with map objects from a model. 更多...

import 语句: import Qt.labs.location 1.0

特性

方法

详细描述

The MapObjectView is used to populate Map with map objects, either from a model or via addMapObject or removeMapObject .

The MapObjectView type only makes sense when contained in a Map, meaning that it will not work when added inside other QML elements. This can also be intended as an object layer on top of a Map.

特性文档编制

delegate : Component

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

model : Variant

This property holds the model that provides data used for creating the map items defined by the delegate. Only QAbstractItemModel based models are supported.


方法文档编制

void addMapObject ( MapObject object )

添加给定 object MapObjectView (for example MapIconObject , MapRouteObject ), and, indirectly, to the underlying map. If the object already is on the MapObjectView , it will not be added again.

另请参阅 removeMapObject .

void removeMapObject ( MapObject object )

移除给定 object MapObjectView (for example MapIconObject , MapRouteObject ), and, indirectly, from the underlying map.

另请参阅 addMapObject .