Appearance
CoreSplit (Split Screen Control)
Create and manage split screen comparison controls for map layers.
Constructor
ts
new ge3d.control.CoreSplit(options?: CoreSplitOptions): CoreSplitParameters (CoreSplitOptions)
| Parameter | Type | Default | Description |
|---|---|---|---|
| leftLayer | BaseTileLayer | BaseTileLayer[] | - | Layer(s) to display on the left side |
| rightLayer | BaseTileLayer | BaseTileLayer[] | - | Layer(s) to display on the right side |
| isRemoveLeftLayer | Boolean | false | Whether to remove left layer when exiting split screen (default removes right layer) |
Properties
| Property | Type | Description |
|---|---|---|
| type | String | Control type ("coreSplit") |
| isRemoveLeftLayer | Boolean | Whether to remove left layer when exiting split screen |
| leftLayer | BaseTileLayer[] | Left side layers |
| rightLayer | BaseTileLayer[] | Right side layers |
| show | Boolean | Show/hide state |
| enabled | Boolean | Enable/disable state |
| container | HTMLElement | Control's DOM container |
Methods
| Method | Parameters | Return Value | Description |
|---|---|---|---|
| addToLeftLayer | (layers: BaseTileLayer | BaseTileLayer[]) | void | Add layer(s) to left side |
| removeFromLeftLayer | (layers: BaseTileLayer | BaseTileLayer[]) | void | Remove layer(s) from left side |
| addToRightLayer | (layers: BaseTileLayer | BaseTileLayer[]) | void | Add layer(s) to right side |
| removeFromRightLayer | (layers: BaseTileLayer | BaseTileLayer[]) | void | Remove layer(s) from right side |
| setLayerSplitDirection | (layer: BaseTileLayer, splitDirection: Cesium.SplitDirection) | void | Set layer split direction |
Notes
- CoreSplit extends BaseControl and inherits all its properties and methods
- Supports both single layers and arrays of layers for each side
- Automatically handles layer visibility based on split position
- Supports vector data visibility control for GeoJSON layers
- Split position can be controlled by dragging the splitter or programmatically
- When
isRemoveLeftLayeris true, left layers are removed when exiting split screen - When
isRemoveLeftLayeris false, right layers are removed when exiting split screen - The control automatically manages layer split directions
- Supports touch gestures for mobile devices
- Events provide real-time feedback on split position changes
- Vector data (GeoJSON) visibility is automatically managed based on split position
- The control creates a draggable splitter UI element for user interaction