void MapFrame::refreshComputedValues() { _highestMinLevel = 0; _elevationLayers.clear(); for (LayerVector::const_iterator i = _layers.begin(); i != _layers.end(); ++i) { TerrainLayer* terrainLayer = dynamic_cast<TerrainLayer*>(i->get()); if (terrainLayer) { const optional<unsigned>& minLevel = terrainLayer->getTerrainLayerRuntimeOptions().minLevel(); if (minLevel.isSet() && minLevel.value() > _highestMinLevel) { _highestMinLevel = minLevel.value(); } ElevationLayer* elevation = dynamic_cast<ElevationLayer*>(terrainLayer); if (elevation) { _elevationLayers.push_back(elevation); } } } }
void MapFrame::refreshComputedValues() { // cache the min LOD based on all image/elev layers _highestMinLevel = 0; for (LayerVector::const_iterator i = _layers.begin(); i != _layers.end(); ++i) { TerrainLayer* terrainLayer = dynamic_cast<TerrainLayer*>(i->get()); if (terrainLayer) { const optional<unsigned>& minLevel = terrainLayer->getTerrainLayerRuntimeOptions().minLevel(); if (minLevel.isSet() && minLevel.value() > _highestMinLevel) { _highestMinLevel = minLevel.value(); } } } }