本文整理汇总了C++中GeoWriter::writeAttribute方法的典型用法代码示例。如果您正苦于以下问题:C++ GeoWriter::writeAttribute方法的具体用法?C++ GeoWriter::writeAttribute怎么用?C++ GeoWriter::writeAttribute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoWriter
的用法示例。
在下文中一共展示了GeoWriter::writeAttribute方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeMultipolygon
void OsmRelationTagWriter::writeMultipolygon( const GeoDataPolygon& polygon,
const OsmPlacemarkData& osmData, GeoWriter& writer )
{
writer.writeStartElement( osm::osmTag_relation );
OsmObjectAttributeWriter::writeAttributes( osmData, writer );
OsmTagTagWriter::writeTags( osmData, writer );
writer.writeStartElement( osm::osmTag_member );
QString memberId = QString::number( osmData.memberReference( -1 ).id() );
writer.writeAttribute( "type", "way" );
writer.writeAttribute( "ref", memberId );
writer.writeAttribute( "role", "outer" );
writer.writeEndElement();
for ( int index = 0; index < polygon.innerBoundaries().size(); ++index ) {
writer.writeStartElement( osm::osmTag_member );
QString memberId = QString::number( osmData.memberReference( index ).id() );
writer.writeAttribute( "type", "way" );
writer.writeAttribute( "ref", memberId );
writer.writeAttribute( "role", "inner" );
writer.writeEndElement();
}
writer.writeEndElement();
}
示例2: write
bool OsmTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
{
Q_UNUSED( node );
writer.writeStartElement( "osm" );
writer.writeAttribute( "version", osm::osmTag_version06 );
writer.writeAttribute( "generator", "Marble " + Marble::MARBLE_VERSION_STRING );
return true;
}
示例3: writeAttributes
void OsmObjectAttributeWriter::writeAttributes( const OsmPlacemarkData& osmData, GeoWriter &writer )
{
writer.writeAttribute( "id", QString::number( osmData.id() ) );
writer.writeOptionalAttribute( "action", osmData.action() );
writer.writeOptionalAttribute( "changeset", osmData.changeset() );
writer.writeOptionalAttribute( "timestamp", osmData.timestamp() );
writer.writeOptionalAttribute( "uid", osmData.uid() );
writer.writeOptionalAttribute( "user", osmData.user() );
writer.writeOptionalAttribute( "version", osmData.version() );
writer.writeOptionalAttribute( "visible", osmData.isVisible() );
}
示例4: write
bool DgmlMapTagWriter::write(const GeoNode *node, GeoWriter& writer) const
{
const GeoSceneMap *map = static_cast<const GeoSceneMap*>( node );
writer.writeStartElement( dgml::dgmlTag_Map );
writer.writeAttribute( "bgcolor", map->backgroundColor().name() );
writer.writeAttribute( "labelColor", map->labelColor().name() );
writer.writeStartElement( "canvas" );
writer.writeEndElement();
writer.writeStartElement( "target" );
writer.writeEndElement();
for( int i = 0; i < map->layers().count(); ++i )
{
writeElement( map->layers().at( i ), writer );
}
writer.writeEndElement();
return true;
}
示例5: write
bool KmlDataTagWriter::write( const GeoNode *node,
GeoWriter& writer ) const
{
const GeoDataData *data = static_cast<const GeoDataData*>( node );
writer.writeStartElement( kml::kmlTag_Data );
writer.writeAttribute( "name", data->name() );
writer.writeOptionalElement( kml::kmlTag_displayName, data->displayName() );
writer.writeElement( "value", data->value().toString() );
writer.writeEndElement();
return true;
}