Class: Imageline

ol.control. Imageline

Image line control


new Imageline( [options])

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Description
className String

class of the control

source Array.<ol.source.Vector> | ol.source.Vector

vector sources that contains the images

layers Array.<ol.layer.Vector>

A list of layers to display images. If no source and no layers, all visible layers will be considered.

getImage function

a function that gets a feature and return the image url or false if no image to Show, 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

useExtent number

only show feature in the current extent

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


setLayers(layers)

Set layers to use in the control

Parameters:
Name Type Description
layers Array.<ol.Layer>

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