Class: KML

cercalia.KML

new cercalia.KML(options)

Name Type Description
options

Hash table with extra options to configure the KML layer

Name Type Description
name string | undefined optional

Name

map cercalia.Map

Cercalia Map

minResolution number | undefined optional

MinResolution The minimum resolution (inclusive) at which this layer will be visible.

maxResolution number | undefined optional

MaxResolution The maximum resolution (exclusive) below which this layer will be visible.

opacity number | undefined optional

Opacity Opacity. 0-1. Default is 1

projection string | undefined optional

Projection Projection. Default is EPSG:3857

draggable string | undefined optional

Draggable Draggable. Default is false

url string | undefined optional

Url Url of resource

visible string | undefined optional

Visible Visible. Default is false

Methods

Name Type Description
feature cercalia.Feature | cercalia.Marker | ol.Feature

feature.

Returns:
this
Name Type Description
features Array.<cercalia.Feature, ol.Feature>

Array of features.

Returns:
this
Name Type Description
kml string

KML string.

proj string

Data projection.

Returns:
this

clear all features

Returns:
this
Returns:
ClassName from cercalia.KML object.
Returns:
Array of features.
Returns:
kml of features added

getLayer(){ol.layer.Vector}

return cercalia map

Returns:
map

getMaxResolution(){number}

Returns:
maxResolution

getMinResolution(){number}

Returns:
minResolution
Returns:
opacity
Returns:
Projection.

getSource(){ol.source.Vector}

Returns:
url
Returns:
visible
Returns:
Returns the drag status. Values: true or false.

Remove a single feature from the source. If you want to remove all features at once, use the clear() method instead

Name Type Description
feature cercalia.Feature | cercalia.Marker | ol.Feature
Returns:
this

Converts features to draggable. You can drag features.

Name Type Description
draggable boolean

We assign a map to the object. If it's already exist, is deleted in the existing map and KML layer is painted on the map passed as parameter. If parameter is "null", it's removed from the map.

Name Type Description
map cercalia.Map | null

Map.

position number

ZIndex position from layers.

Returns:
this

setMaxResolution(maxResolution){cercalia.KML}

Name Type Description
maxResolution number
Returns:
this

setMinResolution(minResolution){cercalia.KML}

Name Type Description
minResolution number
Returns:
this
Name Type Description
opacity number
Returns:
this
Returns:
Name Type Description
Projection. string Projection.
this cercalia.KML this
Name Type Description
visible number
Returns:
this