-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the Cesium Map models, views, & collections more modular #2189
Comments
- Add MapInteraction, GeoPoint and GeoBoundingBox models - Make the CesiumWidgetView methods smaller and more modular - Move Map model attributes to the MapInteraction model (selectedFeatures, currentPosition, currentScale, and currentViewExtent) - In MapAsset models, listen for changes to cesiumOptions and update Cesium model - In map connectors, don't use new models as defaults to avoid instantiating new models unnecessarily - Pass GeoPoint and GeoScale models directly to the ScaleBarView Issues #2189, #2180, #2187
The Remaining Tasks:
Ideas for Further ImprovementWhile the current refactoring addresses immediate concerns, here are additional considerations that could either be implemented in this iteration, moved to separate issues, or passed on (to consider):
|
- Fix issues with drawing polygons, including drawing polygons over poles - Allow drawn polygons to have properties set like other layers (color, opacity, etc) - When drawing, draw both points and polygons - Add CustomDataSource support - Greatly reduce the number of re-renders Cesium must do (improve map performance) - Add connectors between GeoPoints collection and polygons & points Entities Issues #2180 and #2189
Other ideas for further improvement:
|
As we plan to introduce numerous features to our Cesium map, it has become clear that our current structure could be improved so that it scales better with this complexity. This issue came up while working on the DrawTool feature, which requires a different action when the map is clicked.
The aim of this issue is to make some small improvements to the models, views, & collections that comprise the Cesium map to allow easier integration of new features and make the code more maintainable.
Some specific improvements could include:
Create a MapInteraction Model: Move attributes like
currentScale
,currentViewExtent
,mousePosition
, etc., into a new MapInteraction model to decouple these from the main map model. This will allow us to handle different kinds of interactions without bloating the main map model.Introduce GeoPoint and GeoBoundingBox Models: Factor out redundant code into new models such as
GeoPoint
andGeoBoundingBox
. These models can handle operations related to geographical points and bounding boxes, making the code more DRY.Refactor CesiumWidget View Methods: The methods in the
CesiumWidget
view should be made smaller and more modular to increase readability and testability. Each method should have a single responsibility and should be easy to understand.The text was updated successfully, but these errors were encountered: