本文整理汇总了C++中TileSource::name方法的典型用法代码示例。如果您正苦于以下问题:C++ TileSource::name方法的具体用法?C++ TileSource::name怎么用?C++ TileSource::name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TileSource
的用法示例。
在下文中一共展示了TileSource::name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyStyling
std::shared_ptr<Tile> TileBuilder::build(TileID _tileID, const TileData& _tileData, const TileSource& _source) {
m_selectionFeatures.clear();
auto tile = std::make_shared<Tile>(_tileID, *m_scene->mapProjection(), &_source);
tile->initGeometry(m_scene->styles().size());
m_styleContext.setKeywordZoom(_tileID.s);
for (auto& builder : m_styleBuilder) {
if (builder.second)
builder.second->setup(*tile);
}
for (const auto& datalayer : m_scene->layers()) {
if (datalayer.source() != _source.name()) { continue; }
for (const auto& collection : _tileData.layers) {
if (!collection.name.empty()) {
const auto& dlc = datalayer.collections();
bool layerContainsCollection =
std::find(dlc.begin(), dlc.end(), collection.name) != dlc.end();
if (!layerContainsCollection) { continue; }
}
for (const auto& feat : collection.features) {
applyStyling(feat, datalayer);
}
}
}
for (auto& builder : m_styleBuilder) {
builder.second->addLayoutItems(m_labelLayout);
}
float tileSize = m_scene->mapProjection()->TileSize() * m_scene->pixelScale();
m_labelLayout.process(_tileID, tile->getInverseScale(), tileSize);
for (auto& builder : m_styleBuilder) {
tile->setMesh(builder.second->style(), builder.second->build());
}
tile->setSelectionFeatures(m_selectionFeatures);
return tile;
}