Namespace: imageLoader

ol.ext. imageLoader

Methods


<static> elevationMap( [getPixelColor])

Get a TileLoadFunction to load an x-bil-32 image as elevation map (ie. pixels colors codes elevations as terrain-RGB) If getPixelColor is not define pixel store elevation as rgb, use ol.ext.getElevationFromPixel to get elevation from pixel

Parameters:
Name Type Argument Description
getPixelColor function <optional>

a function that taket an elevation and return a color array [r,g,b,a], default store elevation as terrain-RGB

Returns:

an ol/Tile~LoadFunction

Type
function

<static> grayscale()

Get a TileLoadFunction to transform tiles into grayscale images

Returns:

an ol/Tile~LoadFunction

Type
function

<static> pixelTransform(setPixel)

Get a TileLoadFunction to transform tiles images

Parameters:
Name Type Description
setPixel function

a function that takes a Uint8ClampedArray and the pixel position to transform

Returns:

an ol/Tile~LoadFunction

Type
function

<static> seaLevelMap(level, options)

Returns an Imageloader function to load an x-bil-32 image as sea level map to use as a ol/Tile~LoadFunction or ol/Image~LoadFunction

Parameters:
Name Type Description
level number
options *
Properties
Name Type Argument Default Description
color ol.Color <optional>

fill color

opacity boolean <optional>
true

smooth color on border

minValue number <optional>
-Infinity

minimum level value

Returns:

an ol/Tile~LoadFunction

Type
function

<static> transparent(colors)

Get a TileLoadFunction to turn color or a color range transparent

Parameters:
Name Type Description
colors ol.color.Color | Array.<ol.color.Color>

color or color range to turn transparent

Returns:

an ol/Tile~LoadFunction

Type
function