new Texture(options)
Add texture effects on maps or layers
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
* |
Properties
|
Requires:
- module:ol.filter
Extends
Requires
- module:ol.filter
Methods
-
getActive()
-
Get filter active
- Inherited From:
Returns:
- Type
- bool
-
getPattern(x, y)
-
Get translated pattern
Parameters:
Name Type Description x
number offset
y
number offset
-
postcompose()
-
Draw pattern over the map on postcompose
-
setActive(b)
-
Activate / deactivate filter
Parameters:
Name Type Description b
bool - Inherited From:
-
setFilter(options)
-
Set texture
Parameters:
Name Type Description options
* Properties
Name Type Description img
Image | undefined Image object for the texture
src
string Image source URI
scale
number scale to draw the image. Default 1.
rotate
bool Whether to rotate the texture with the view (may cause animation lags on mobile or slow devices). Default is true.
crossOrigin
null | string | undefined The crossOrigin attribute for loaded images.