Global

Type Definitions


animationControler

An animation controler object an object to control animation with start, stop and isPlaying function.
To be used with olx.Map#animateFeature or ol.layer.Vector#animateFeature

Type:
  • Object
Properties:
Name Type Description
start function

start animation.

stop function

stop animation option arguments can be passed in animationend event.

isPlaying function

return true if animation is playing.


CanvasFilterOptions

Type:
  • Object
Properties:
Name Type Description
url url

Takes an IRI pointing to an SVG filter element

blur number

Gaussian blur value in px

brightness number

linear multiplier to the drawing, under 100: darkens the image, over 100 brightens it

contrast number

Adjusts the contrast, under 0: black, 100 no change

shadow ol.pixel

Applies a drop shadow effect, pixel offset

shadowBlur number

Blur radius

shadowColor number
grayscale number

0: unchanged, 100: completely grayscale

hueRotate number

Hue rotation angle in deg

invert number

Inverts the drawing, 0: unchanged, 100: invert

saturate number

Saturates the drawing, 0: unsaturated, 100: unchanged

sepia number

Converts the drawing to sepia, 0: sepia, 100: unchanged


FilterColorizeOptions

Type:
  • Object
Properties:
Name Type Description
color ol.Color

style to fill with

operation string

'enhance' or a CanvasRenderingContext2D.globalCompositeOperation

value number

a value to modify the effect value [0-1]

inner boolean

mask inner, default false

preserveAlpha boolean

preserve alpha channel, default false


FilterPencilSketchOptions

Type:
  • Object
Properties:
Name Type Description
blur number

blur value in pixel, default 8

value number

intensity value [0,1], default .8


FilterPointillismOptions

Type:
  • Object
Properties:
Name Type Description
saturate number

saturation, default 2


FilterPointillismOptions

Type:
  • Object
Properties:
Name Type Description
saturate number

saturation, default 2


FilterTextureOptions

Type:
  • Object
Properties:
Name Type Argument Description
img Image | undefined

Image object for the texture

src string

Image source URI

scale number

scale to draw the image. Default 1.

opacity number <optional>
rotate boolean

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.


GeoImageOptions

Type:
  • Object
Properties:
Name Type Description
url url

url of the static image

image image

the static image, if not provided, use url to load an image

imageCenter ol.Coordinate

coordinate of the center of the image

imageScale ol.Size | number

[scalex, scaley] of the image

imageRotate number

angle of the image in radian, default 0

imageCrop ol.Extent

of the image to be show (in the image) default: [0,0,imageWidth,imageHeight]

imageMask Array.<ol.Coordinate>

linestring to mask the image on the map


HexagonLayout

Layout of a Hexagon. Flat means the bottom part of the hexagon is flat.

Type:
  • 'pointy' | 'flat'

olLegendItemOptions

ol/legend/Item options

Type:
  • Object
Properties:
Name Type Description
title string

row title

className className
feature ol.Feature

a feature to draw on the legend

typeGeom string

type geom to draw with the style or the properties if no feature is provided

properties Object

a set of properties to use with a style function

style ol.style.Style.styleLike

a style or a style function to use to draw the legend symbol

textStyle ol.style.Text

a text style to draw the item title in the legend

width number | undefined

the symbol width, default use the default width

height number | undefined

ths symbol height, default use the default height

margin number | undefined

svgOperation

Type:
  • Object
Properties:
Name Type Description
attributes.feoperation string

filter primitive tag name

attributes.operations Array.<ol.ext.SVGOperation>

a list of operations


Template

Template

Type:
  • Object
Properties:
Name Type Description
title string | function

title of the popup, attribute name or a function that takes a feature and returns the title

attributes Object.<TemplateAttributes>

a list of template attributes


TemplateAttributes

Template attributes for popup

Type:
  • Object
Properties:
Name Type Description
title string
format function

a function that takes an attribute and a feature and returns the formated attribute

before string

string to instert before the attribute (prefix)

after string

string to instert after the attribute (sudfix)

visible boolean | function

boolean or a function (feature, value) that decides the visibility of a attribute entry


viewTourDestinations

Destination

Type:
  • Object
Properties:
Name Type Argument Default Description
type string <optional>
flyto

animation type (flyTo, moveTo), default flyTo

duration number <optional>
2000

animation duration

center= ol.coordinate <optional>

destination coordinate, default current center

zoom number <optional>

destination zoom, default current zoom

zoomAt number <optional>
-2

zoom to fly to, default min (current zoom, zoom) -2

easing function <optional>

easing function used during the animation, defaults ol/easing~inAndOut

rotation number <optional>

The rotation of the view at the end of the animation

anchor anchor <optional>

Optional anchor to remain fixed during a rotation or resolution animation.