Class: Imageline

ol.control. Imageline


new Imageline( [options])

Image line control

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Description
className String

class of the control

source ol.source.Vector

a vector source that contains the images

getImage function

a function that gets a feature and return the image url, default return the img propertie

getTitle function

a function that gets a feature and return the title, default return an empty string

collapsed boolean

the line is collapse, default false

collapsible boolean

the line is collapsible, default false

maxFeatures number

the maximum image element in the line, default 100

hover boolean

select image on hover, default false

linkColor string | boolean

link color or false if no link, default false

Fires:
  • event:select
  • event:collapse

Extends

Methods


collapse(b)

Collapse the line

Parameters:
Name Type Description
b boolean

getFeatures()

Get features

Returns:
Type
Array.<ol.Feature>

isCollapsed()

Is the line collapsed

Returns:
Type
boolean

refresh()

Refresh the imageline with new data


select(feature, scroll)

Center image line on a feature

Parameters:
Name Type Description
feature ol.feature
scroll boolean

scroll the line to center on the image, default true


setMap(map)

Remove the control from its current map and attach it to the new map.

Parameters:
Name Type Description
map ol.Map

Map.


toggle()

Collapse the line


useExtent(b)

Set useExtent param and refresh the line

Parameters:
Name Type Description
b boolean