-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Draw on Cesium map feature #2204
Conversation
- Create the initial DrawTool view and layout methods Issue #2180
- Still a WIP - Make draw tool work directly with Map model, independent of widget - Rename DrawTool to DrawToolView Issue #2180
- 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
Issues #2189, 2180
- Still needs methods to clear the polygon and stop drawing; proper UI; testing Issue #2180
- Add the GeoPoints collection, with methods for serializing to GeoJson - Add a model that listens to a GeoPoints collection and updates a CesiumVectorData model with new geometry - Use these in the DrawToolView - Enable clearing a polygon - Show on first click, line on second click, polygon on subsequent clicks Issue #2180
- Switch from GeoJson to CZML (improves ability to draw around poles) - Set up the DrawTool for actions like deleting & moving points, running a callback with user-created points as argument Issue #2180
- 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
- In CesiumVectorData, in the new runVisualizers method, re-run in cases where visualizers are waiting for an async process to complete. - Fixes issue with Cesium Geohashes not showing up - Add some missing JSDocs to CesiumVectorData Issue #2180
- Style draw tool buttons - Hide edit & delete point buttons for now (not implemented) - Enable configuring hiding a layer in the layer list - Fix issue with removing entities in CesiumVectorData Issue #2180
Add an ID to the polygon created when drawing on map so that it is updated when new points are added rather than creating a new one Issue #2180
Findings from @artntek
|
@rushirajnenuji, I am working on reproducing the problem described above. Other than that, I don't expect to make changes to this PR, so please feel free to start reviewing anytime! |
@rushirajnenuji reported a behaviour he encountered where datasets and the catalog keep refreshing on the map (see video). He noted that no external triggers seem to cause it, and that he hadn't seen this happen before. This should be addressed before we release this feature. |
- Add min height to markdown sections with portals - Also rename methods from postRender to what they do, because backbone calls these methods automatically even though this isn't documented! fixes #2195
again after content has been loaded. Fixes #2192
The issues observed by @rushirajnenuji and @artntek seemed to stem from the Cesium camera events triggering unpredictably (reported here and here). I added a work around so that instead of relying solely on Cesium's "moveStart" event, we trigger our own "moveStartAndCameraChanged" event that occurs after the camera starts moving and has moved enough to be considered a "changed" camera position. This seems to resolve the issue, although it's very difficult to reproduce so more testing will be needed. This branch at it's current state, which now also includes the develop changes, is deployed at http://metacatui.test.dataone.org/ |
Going to merge this into |
This PR introduces the feature that allows a user to draw an arbitrary polygon on a map. While we don't yet have anything set up to use this custom polygon, the "save" button has the ability to send the coordinates a callback function. This will support us in developing upcoming features: 1) allow users to download a subset of geospatial data, and 2) allow users to plot a subset of the data.
In making these changes, I also did a little refactoring of some of the related models and collections to make them more modular & reusable.