本文整理汇总了C++中MapFrame::getImageLayerByUID方法的典型用法代码示例。如果您正苦于以下问题:C++ MapFrame::getImageLayerByUID方法的具体用法?C++ MapFrame::getImageLayerByUID怎么用?C++ MapFrame::getImageLayerByUID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapFrame
的用法示例。
在下文中一共展示了MapFrame::getImageLayerByUID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
}
else
{
// we've gone as far as we can with placeholders; time to check for the
// final imagery tile.
checkForFinalImagery = true;
}
}
}
if ( checkForFinalImagery )
{
// Then the image requests:
for( TaskRequestList::iterator itr = _requests.begin(); itr != _requests.end(); )
{
bool increment = true;
TileColorLayerRequest* r = static_cast<TileColorLayerRequest*>( itr->get() );
//We only care about the current layer we are checking
if ( r->_layerUID == imageLayer->getUID() )
{
if ( itr->get()->isCompleted() )
{
if ( r->wasCanceled() )
{
//Reset the cancelled task to IDLE and give it a new progress callback.
r->setState( TaskRequest::STATE_IDLE );
r->setProgressCallback( new StampedProgressCallback(
r, terrain->getImageryTaskService( r->_layerUID )));
r->reset();
}
else // success..
{
//See if we even care about the request
if ( !mapf.getImageLayerByUID( r->_layerUID ) )
{
//The maplayer was probably deleted
OE_DEBUG << "Layer uid=" << r->_layerUID << " no longer exists, ignoring TileColorLayerRequest " << std::endl;
itr = _requests.erase(itr);
increment = false;
}
else
{
CustomColorLayerRef* result = static_cast<CustomColorLayerRef*>( r->getResult() );
if ( result )
{
this->setCustomColorLayer( result->_layer );
queueTileUpdate( TileUpdate::UPDATE_IMAGE_LAYER, r->_layerUID );
//OE_NOTICE << "Complete IR (" << _key.str() << ") layer=" << r->_layerId << std::endl;
// remove from the list (don't reference "r" after this!)
itr = _requests.erase( itr );
increment = false;
}
else
{
if (r->_numTries > r->_maxTries)
{
CustomColorLayer oldLayer;
if ( this->getCustomColorLayer( r->_layerUID, oldLayer ) )
{
// apply the old color layer but with a new LOD.
this->setCustomColorLayer( CustomColorLayer(
oldLayer.getMapLayer(),
oldLayer.getImage(),