コード例 #1
0
ファイル: OsmParser.cpp プロジェクト: abhgangwar/marble
GeoDataDocument *OsmParser::createDocument(OsmNodes &nodes, OsmWays &ways, OsmRelations &relations)
{
    GeoDataDocument* document = new GeoDataDocument;
    GeoDataPolyStyle backgroundPolyStyle;
    backgroundPolyStyle.setFill( true );
    backgroundPolyStyle.setOutline( false );
    backgroundPolyStyle.setColor("#f1eee8");
    GeoDataStyle backgroundStyle;
    backgroundStyle.setPolyStyle( backgroundPolyStyle );
    backgroundStyle.setId( "background" );
    document->addStyle( backgroundStyle );

    foreach(OsmRelation const &relation, relations) {
        relation.create(document, ways, nodes);
    }