Class: Flashlight

ol.interaction. Flashlight


new Flashlight(flashlight)

Parameters:
Name Type Description
flashlight ol.flashlight.options

options param

    - color {ol.Color} light color, default transparent
    - fill {ol.Color} fill color, default rgba(0,0,0,0.8)
    - radius {number} radius of the flash

Extends

  • ol.interaction.Pointer

Methods


postcompose_()

Postcompose function


setColor(flashlight)

Set flashlight color

Parameters:
Name Type Description
flashlight ol.flashlight.options

options param

    - color {ol.Color} light color, default transparent
    - fill {ol.Color} fill color, default rgba(0,0,0,0.8)

setMap()

Set the map > start postcompose


setPosition(e)

Set position of the flashlight

Parameters:
Name Type Description
e ol.Pixel | ol.MapBrowserEvent

setRadius(radius)

Set flashlight radius

Parameters:
Name Type Description
radius integer