Specifically, it is to use heatmap.js to create a heat map, how to get the canvas of the heat map and paste it on Cesium.
parameter:
- noLisenerCamera?: boolean//Do not monitor the camera
- cameraHeightDistance?: number//The difference between camera heights, re-render the basemap when it is greater than this value
- renderType?: RenderType//rendering type
- points: HeatmapPoint[]
- bounds?: number[]
- heatmapOptions?: BaseHeatmapConfiguration
- heatmapDataOptions?: HeatmapDataOption
- zoomToLayer?: boolean
- onRadiusChange?: (radius: number) => void
Parameter noLisenerCamera
Whether to not monitor the camera.moveEnd event, the default is to monitor;
Mainly used to update the view;
createContainer
method:
Create a DIV container to host
remove remove
Determine whether there is a container, if the container exists
1. document.body.removeChild(this.element) removes the container
2. Remove the provider. There are three types of providers here, so when removing, you need to determine which type of provider it is, and then use the corresponding API to remove it according to the type of provider.
3. Remove the cameraMoveEnd event;
Three drawing methods:
- Entity (default)
- Primitive
- LayerSingleTileImageryProvider
private method createLayer
Create a layer, determine the renderType type, and then call the corresponding method to obtain the implementation layer;
private method createPrimitive
Create layers as primitives
private method createSingleTileImageryLayer
Create layers as layers
private method createEntity
Create layers in entity mode, which is also the default mode;
This article is transferred from https://www.wujingquan.com/posts/3ccc6784.html
This site is only for collection, and the copyright belongs to the original author.