Class: KML

cercalia.KML

new cercalia.KML(options)

Name Type Description
options cercaliax.KMLOptions

Hash table with extra options to configure the KML layer

Methods

addFeature(feature){cercalia.KML}

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

feature.

Returns:
this

addFeatures(features){cercalia.KML}

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

Array of features.

Returns:
this

addFeaturesFromKML(kml, proj){cercalia.KML}

Name Type Description
kml string

KML string.

proj string

Data projection.

Returns:
this

clear all features

Returns:
this

getClass(){string}

Returns:
ClassName from cercalia.KML object.

getFeatures(){Array}

Returns:
Array of features.

getKML(){string}

Returns:
kml of features added

getLayer(){ol.layer.Vector}

getMap(){cercalia.Map|undefined}

return cercalia map

Returns:
map

getMaxResolution(){number}

Returns:
maxResolution

getMinResolution(){number}

Returns:
minResolution

getOpacity(){number}

Returns:
opacity

getProjection(){string}

Returns:
Projection.

getSource(){ol.source.Vector}

getUrl(){string}

Returns:
url

getVisible(){number}

Returns:
visible

isDraggable(){boolean}

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

removeFeature(feature){cercalia.KML}

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

setDraggable(draggable)

Converts features to draggable. You can drag features.

Name Type Description
draggable boolean

setMap(map, position){cercalia.KML}

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

setOpacity(opacity){cercalia.KML}

Name Type Description
opacity number
Returns:
this

setProjection(){string}

Returns:
Name Type Description
Projection. string Projection.
this cercalia.KML this

setVisible(visible){cercalia.KML}

Name Type Description
visible number
Returns:
this