Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces several changes to the base Layer and layer-related classes. The main changes includes the migration of
LayerUpdateState
andLayerUpdateStrategy
to typescript, the reorganization of Layer properties for better separation of concerns and the addition of a startup lifecycle method as a first step to cleanup the mess that isView#preprocessLayer
. This will not break existing layers within iTowns but could break custom layers inheriting directly fromLayer
.Motivation and Context
The motivation for the following changes is as follow:
Layer#startup
lifecycle method for separation of concerns, allowing for more explicit initialization of layers. Follow-up: removeView#preprocessLayer
and most of the complexity ofView#addLayer
.LayerUpdateState
andLayerUpdateStrategy
to typescript (I will personally rebase Further simplify tile subdivision mechanism #2525 on this PR since there is some function paramater changes tochooseNextLevelToFetch
).Follow-up: migrate TileMesh-related modules to typescript (see Migrate TileMesh-related modules to typescript #2557) / migrate
LayerNodeProcessing
ImageryLayers
to its own module as I have short-term plan to migrate all layers to typescript (with some type hacks) and have no plan to migrateImageryLayers
(which given the code needs an entire refactoring...).Follow-up: migrate Layer modules to typescript
Layer
and children.layerUpdateStrategy
used only onRasterLayer
-derived classesstyle
used only on*3DTilesLayer
,FeatureGeometryLayer
andColorLayer
mergeFeatures
/addLabel
used only onFeatureGeometryLayer
andColorLayer
Follow-up: migrate Layer modules to typescript
Changes considered but not done on this PR:
View#preprocessLayer
Screenshots (if appropriate)