void QDeclarativeGraphicsGeoMap::populateMap()
{
    if (!mapData_ || !componentCompleted_)
        return;
    QObjectList kids = children();
    for (int i = 0; i < kids.size(); ++i) {
        // dispatch items appropriately
        QDeclarativeGeoMapObjectView* mapView = qobject_cast<QDeclarativeGeoMapObjectView*>(kids.at(i));
        if (mapView) {
            mapViews_.append(mapView);
            setupMapView(mapView);
            continue;
        }
        QDeclarativeGeoMapObject *mapObject = qobject_cast<QDeclarativeGeoMapObject*>(kids.at(i));
        if (mapObject) {
            mapObjects_.append(mapObject);
            objectMap_.insert(mapObject->mapObject(), mapObject);
            mapData_->addMapObject(mapObject->mapObject());
            mapObject->setMap(this);
            continue;
        }
        QDeclarativeGeoMapMouseArea *mouseArea
        = qobject_cast<QDeclarativeGeoMapMouseArea*>(kids.at(i));
        if (mouseArea) {
            mouseArea->setMap(this);
            mouseAreas_.append(mouseArea);
        }
    }
}
void QDeclarativeGeoMapObject::componentComplete()
{
    QDeclarativeItem::componentComplete();

    QList<QGraphicsItem*> children = childItems();
    for (int i = 0; i < children.size(); ++i) {
        QDeclarativeGeoMapMouseArea *mouseArea
        = qobject_cast<QDeclarativeGeoMapMouseArea*>(children.at(i));
        if (mouseArea) {
            mouseArea->setMap(map_);
            mouseAreas_.append(mouseArea);
        }
    }
}