Extends
- ol.source.ImageCanvas
Methods
-
calculateExtent(usemask)
-
Calculate the extent of the source image.
Parameters:
Name Type Description usemaskboolean return the mask extent, default return the image extent
Returns:
- Type
- ol.extent
-
calculateImage(extent, resolution, pixelRatio, size)
-
calculate image at extent / resolution
Parameters:
Name Type Description extentol/extent/Extent resolutionnumber pixelRationumber sizeol/size/Size Returns:
- Type
- HTMLCanvasElement
-
getCenter()
-
Get coordinate of the image center.
Returns:
coordinate of the image center.
- Type
- ol.Coordinate
-
getCrop()
-
Get image crop extent.
Returns:
image crop extent.
- Type
- ol.extent
-
getExtent(extent)
-
Get the extent of the source.
Parameters:
Name Type Description extentmodule:ol/extent~Extent If provided, no new extent will be created. Instead, that extent's coordinates will be overwritten.
Returns:
- Type
- ol.extent
-
getGeoImage()
-
Get the image.
-
getMask()
-
Get image mask.
Returns:
coords of the mask
- Type
- ol.geom.LineString
-
getRotation()
-
Get image rotation.
Returns:
rotation in radian.
- Type
- Number
-
getScale()
-
Get image scale.
Returns:
image scale (along x and y axis).
- Type
- ol.size
-
setCenter(coordinate)
-
Set coordinate of the image center.
Parameters:
Name Type Description coordinateol.Coordinate of the image center.
-
setCrop(image)
-
Set image crop extent.
Parameters:
Name Type Description imageol.extent | Number crop extent or a number to crop from original size.
-
setMask(coords)
-
Set image mask.
Parameters:
Name Type Description coordsol.geom.LineString of the mask
-
setRotation(rotation)
-
Set image rotation.
Parameters:
Name Type Description rotationNumber in radian.
-
setScale(image)
-
Set image scale.
Parameters:
Name Type Description imageol.size | Number scale (along x and y axis or both).