Class: Popup

cercalia.Popup


Let you create a window related to marker, where to paint information in HTML format.
Based on ol.Overlay class

new cercalia.Popup(options)

src/cercalia/popup.js, line 19
Name Type Description
options

Popup Options.

Name Type Description
closeOnClick boolean | undefined

Close popup when click on it. Default value false.

customClass boolean | undefined

Custom CSS class to override popup styles.

content string

HTML Popup content Required.

offset Array.<number>

Offset. Default [0, 0]. Required.

minWidth number | undefined

Popup minimum width, in pixels. Default value 240px

maxWidth number | undefined

Popup maximum width, in pixels. Default value 400px

stopEvent boolean | undefined

If true it disable propagation events. So events inside popup won't be fired. Default true.

title string | undefined

Popup title. Default value: 'Info'

visible boolean | undefined

Boolean indicating if Popup is initially visible. Default value: false

zIndex number | undefined

zIndex popup value (css) . Default 1000

fadeAnimation boolean | undefined

Indicates whether to apply 'fadeIn' and 'fadeOut' animation effect

Extends

Methods

destroy()

src/cercalia/popup.js, line 249

Destroy popup and clean the marker reference to this popup

getClass(){string} inherited

src/cercalia/object.js, line 41
Returns:
Get Class name of object

getId(){string} inherited

src/cercalia/object.js, line 33
Returns:
Unique Id.

getOffset(){Array.<number>}

src/cercalia/popup.js, line 181
Returns:
Popup Offset

getOverlay(){ol.Overlay}

src/cercalia/popup.js, line 143
Returns:
The popup object ol.Overlay

getPosition(){Array.<number>|null|undefined}

src/cercalia/popup.js, line 163
Returns:
Popup Position

getZIndex(){number|string}

src/cercalia/popup.js, line 241
Returns:
ZIndex value

hide(opt_fade)

src/cercalia/popup.js, line 219

Hide the popup

Name Type Description
fade boolean

Indicates whether to apply the 'fadeOut' animation effect

isVisible(){boolean}

src/cercalia/popup.js, line 190
Returns:
visible Returns if it's visible

setContent(content)

src/cercalia/popup.js, line 272

Change the popup body. You can put HTML as string.

Name Type Description
content string

Body popup HTML content.

setOffset(offset)

src/cercalia/popup.js, line 172

Sets the popup position

Name Type Description
offset Array.<number>

Couple of values ​​for the offset.

setPosition(lonLat, opt_projectionCode)

src/cercalia/popup.js, line 153

Sets the popup position

Name Type Description
lonLat cercalia.LonLat

Position

projectionCode string

Optional projection code. Default EPSG:3857.

setTitle(title)

src/cercalia/popup.js, line 258

Change the popup title using a string with the HTML content

Name Type Description
title string | null

Title. If null title will be removed.

setZIndex(zIndex)

src/cercalia/popup.js, line 232

Change the popup zIndex

Name Type Description
zIndex number | string

ZIndex value (numerical value or 'auto')