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 featurecercalia.Feature | cercalia.Marker | ol.Feature feature.
Returns:
this
-
addFeatures(features){cercalia.KML}
-
Name Type Description featuresArray.<cercalia.Feature, ol.Feature> Array of features.
Returns:
this
-
addFeaturesFromKML(kml, proj){cercalia.KML}
-
Name Type Description kmlstring KML string.
projstring Data projection.
Returns:
this
-
clear(){cercalia.KML}
-
clear all features
Returns:
this
-
getClass(){string}
-
Returns:
ClassName fromcercalia.KMLobject.
-
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:trueorfalse.
-
removeFeature(feature){cercalia.KML}
-
Remove a single feature from the source. If you want to remove all features at once, use the
clear()method insteadName Type Description featurecercalia.Feature | cercalia.Marker | ol.Feature Returns:
this
-
setDraggable(draggable)
-
Converts features to
draggable. You can drag features.Name Type Description draggableboolean -
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 mapcercalia.Map | null Map.
positionnumber ZIndex position from layers.
Returns:
this
-
setMaxResolution(maxResolution){cercalia.KML}
-
Name Type Description maxResolutionnumber Returns:
this
-
setMinResolution(minResolution){cercalia.KML}
-
Name Type Description minResolutionnumber Returns:
this
-
setOpacity(opacity){cercalia.KML}
-
Name Type Description opacitynumber Returns:
this
-
setProjection(){string}
-
Returns:
Name Type Description Projection.string Projection. thiscercalia.KML this -
setVisible(visible){cercalia.KML}
-
Name Type Description visiblenumber Returns:
this