This is a module that consolidates functions for integration with OpenLayers.
Methods
(async, static) createLayer(params) → {ol.layer.Image}
Obtains the layer instance that can be loaded with OpenLayers.
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Conditions for obtaining an instance of {ol.layer.Image}
Properties
|
- See:
Returns:
Returns an instance of {ol.layer.Image}. For this instance, you can obtain an ImageCollection using getImageCollection and an Image using getImage. You can also switch the date and time using setDate, change the color using setColorMap, and obtain the legend using getLegend.
- Type
- ol.layer.Image
Example
//When importing and using OpenLayers as a module, create an ol object like the following and set it to params.ol.
import ImageCanvas from 'ol/source/ImageCanvas';
import Image from 'ol/layer/Image';
const ol = {
"source": {
ImageCanvas
},
"layer": {
Image
},
};
console.log(ol);
Type Definitions
createLayer-onloadend(image, progress)
This is a callback function executed when data retrieval is completed in the module:ol.createLayer.
Parameters:
| Name | Type | Description |
|---|---|---|
image |
Image | Image instance with loading completed |
progress |
number | Progress rate expressed as a value from 0 to 100% |
createLayer-onloading(progress)
This is a callback function executed while data is being retrieved in the module:ol.createLayer. It is executed each time data is read in units of tiles in COG (Cloud Optimized GeoTIFF).
Parameters:
| Name | Type | Description |
|---|---|---|
progress |
number | Progress rate expressed as a value from 0 to 100% |
createLayer-onloadstart()
This is a callback function executed in the module:ol.createLayer at the timing when the map's scroll zoom is completed and data retrieval begins.