Class: GeoImage

ol.source. GeoImage

Layer source with georeferencement to place it on a map


new GeoImage(options)

Parameters:
Name Type Description
options GeoImageOptions

Extends

  • ol.source.ImageCanvas

Methods


calculateExtent(usemask)

Calculate the extent of the source image.

Parameters:
Name Type Description
usemask boolean

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
extent ol/extent/Extent
resolution number
pixelRatio number
size ol/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
extent module: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
coordinate ol.Coordinate

of the image center.


setCrop(image)

Set image crop extent.

Parameters:
Name Type Description
image ol.extent | Number

crop extent or a number to crop from original size.


setMask(coords)

Set image mask.

Parameters:
Name Type Description
coords ol.geom.LineString

of the mask


setRotation(rotation)

Set image rotation.

Parameters:
Name Type Description
rotation Number

in radian.


setScale(image)

Set image scale.

Parameters:
Name Type Description
image ol.size | Number

scale (along x and y axis or both).