Skip to content

Commit

Permalink
refactor(core): add zoom to each extent of tile
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Mar 11, 2019
1 parent 4a4166f commit 23bad33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 8 additions & 0 deletions src/Converter/convertToTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ export default {
tile.setBBoxZ(parent.obb.z.min, parent.obb.z.max);
}

// Set equivalent tiled extent zoom
// Is used to set zoom for each texture fetched with no tiled extent
// It's more simple to set zoom here instead of reverse ingeneer
// Removable with a table pixel/extent.size
if (!tile.extent.zoom) {
tile.extent.zoom = level;
}

tile.add(tile.obb);

setTileFromTiledLayer(tile, layer);
Expand Down
9 changes: 1 addition & 8 deletions src/Process/LayeredMaterialNodeProcessing.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,7 @@ function getSourceExtent(node, extent, targetLevel) {
if (extent.isTiledCrs()) {
return extent.extentParent(targetLevel);
} else {
const parent = node.findAncestorFromLevel(targetLevel);
if (parent.extent) {
// Needed to initNodeElevationTextureFromParent, insertSignificantValuesFromParent,
// isColorLayerDownscaled
// Must be removed
parent.extent.zoom = parent.level;
}
return parent.extent;
return node.findAncestorFromLevel(targetLevel).extent;
}
}

Expand Down

0 comments on commit 23bad33

Please sign in to comment.