I want to populate a Qml Map with map elements (like MapCircle, ...) from a QAbstractListModel. There seem to be two Qml tools suitable for this, MapItemView [1] and Repeater [2]. The Repeater is more powerful (e.g. it allows nested models) - so is there any reason to use the MapItemView instead of a Repeater?
Regards,
[1] http://doc.qt.io/qt-5/qml-qtlocation-mapitemview.html
[2] http://doc.qt.io/qt-5/qml-qtquick-repeater.html
MapItemView source: http://code.qt.io/cgit/qt/qtlocation.git/tree/src/location/declarativemaps/qdeclarativegeomapitemview.cpp
Repeater source: http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/items/qquickrepeater.cpp
Viewsonly instantiate as much as needed. So what is outside theviewportwon't clutter your memory and initial creation time will be better. TheRepeateris dump. It will createItemss for every element in the model, no matter whether they will be shown or not. - derMMapItemViewadds all items to the Map. I am not sure whatRepeaterexactly does but probably it will also add the items just to the map. The map itself handles the visible item rendering. - Hyndrix