Constructor
new KML(name, optionsopt)
Name | Type | Attributes | Description |
---|---|---|---|
name | string | ||
options | * | <optional> |
- Source
Extends
Members
_id
- Overrides
- Source
(protected) _pickingColor :Vec3
Layer picking color. Assign when added to the planet.
- Overrides
- Source
pickingEnabled
Set layer picking events active.
- Overrides
- Source
planet
Returns planet instance.
- Overrides
- Source
Methods
(abstract, protected) _assignPlanet(planet)
Assign the planet.
Name | Type | Description |
---|---|---|
planet | Planet | Planet render node. |
- Overrides
- Source
_bindEventsDefault(entityCollection)
Name | Type | Description |
---|---|---|
entityCollection |
- Overrides
- Source
- To Do
- (refactoring) could be used in somethig like bindEntityCollectionQuad(...)
(abstract, protected) _bindPicking()
Assign picking color to the layer.
- Overrides
- Source
(protected) _convertCoordonatesIntoEntities(coordonates, color) → {any}
Creates billboards or polylines from array of lonlat.
Name | Type | Description |
---|---|---|
coordonates | Array | |
color | string |
- Source
- Type:
- any
(protected) _correctFullExtent()
Special correction of the whole globe extent.
- Overrides
- Source
_createEntityCollectionsTree()
- Overrides
- Source
(protected) _getXmlContent() → {Document}
- Source
- Type:
- Document
(protected) _parseKMLcoordinates()
- Source
(protected) _reindexEntitiesArray(startIndex)
Refresh collected entities indexes from startIndex entities collection array position.
Name | Type | Description |
---|---|---|
startIndex | number | Entity array index. |
- Overrides
- Source
abortMaterialLoading(material)
Abort exact material loading.
Name | Type | Description |
---|---|---|
material | Material | Segment material. |
- Inherited From
- Source
add(entity, rightNowopt) → {Vector}
Adds entity to the layer.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entity | Entity | Entity. | ||
rightNow | boolean | <optional> | false | Entity insertion option. False is default. |
- Overrides
- Source
- Returns this layer.
- Type:
- Vector
addEntities(entities, rightNowopt) → {Vector}
Adds entity array to the layer.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entities | Array.<Entity> | Entities array. | ||
rightNow | boolean | <optional> | false | Entity insertion option. False is default. |
- Overrides
- Source
- Returns this layer.
- Type:
- Vector
(async) addKmlFromFiles(kmls, coloropt, billboardopt) → {Promise.<{entities: Array.<Entity>, extent: Extent}>}
Name | Type | Attributes | Description |
---|---|---|---|
kmls | Array.<File> | ||
color | string | <optional> | |
billboard | Billboard | <optional> |
- Source
(async) addKmlFromUrl(url, coloropt, billboardopt) → {Promise.<{entities: Array.<Entity>, extent: Extent}>}
Name | Type | Attributes | Description |
---|---|---|---|
url | string | Url of the KML to display. './myFile.kml' or 'http://mySite/myFile.kml' for example. | |
color | string | <optional> | |
billboard | Billboard | <optional> |
- Source
addTo(planet) → {Vector}
Adds layer to the planet.
Name | Type | Description |
---|---|---|
planet | Planet | Planet scene object. |
- Overrides
- Source
- Type:
- Vector
bringToFront()
Set zIndex to the maximal value depend on other layers on the planet.
- Overrides
- Source
clear()
TODO: Clear the layer.
- Overrides
- Source
each(callback)
Safety entities loop.
Name | Type | Description |
---|---|---|
callback |
- Overrides
- Source
flyExtent()
Fly extent.
- Overrides
- Source
getAttribution() → {string}
Gets layer attribution.
- Overrides
- Source
Layer attribution
- Type:
- string
getEntities() → {Array.<Entity>}
Returns stored entities.
- Overrides
- Source
- Type:
- Array.<Entity>
getExtent() → {Extent}
Gets layer extent.
- Overrides
- Source
- Layer geodetic extent.
- Type:
- Extent
getExtentMerc() → {Extent}
Gets layer web-mercator extent.
- Overrides
- Source
- Layer extent.
- Type:
- Extent
getHeight() → {number}
Gets layer height.
- Overrides
- Source
- Type:
- number
getID() → {string}
Gets layer identifier.
- Overrides
- Source
- Layer object id.
- Type:
- string
getVisibility() → {boolean}
Gets layer visibility.
- Overrides
- Source
- Layer visibility.
- Type:
- boolean
getZIndex() → {number}
Gets z-index.
- Overrides
- Source
- Type:
- number
(abstract) hasImageryTiles() → {boolean}
Returns true if a layer has imagery tiles.
- Overrides
- Source
- Imagery tiles flag.
- Type:
- boolean
insert(entity, index, rightNowopt) → {Vector}
Adds entity to the layer in the index position.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entity | Entity | Entity. | ||
index | Number | Index position. | ||
rightNow | boolean | <optional> | false | Entity insertion option. False is default. |
- Overrides
- Source
- Returns this layer.
- Type:
- Vector
isBaseLayer() → {boolean}
Returns true if the layer is a base.
- Overrides
- Source
- Base layer flag.
- Type:
- boolean
isEqual(layer) → {boolean}
Compares layers instances.
Name | Type | Description |
---|---|---|
layer | Layer | Layer instance to compare. |
- Overrides
- Source
- Returns true if the layers is the same instance of the input.
- Type:
- boolean
(abstract) loadMaterial(material)
Start to load tile material.
Name | Type | Description |
---|---|---|
material | Material | Current material. |
- Overrides
- Source
remove() → {Layer}
Removes from planet.
- Overrides
- Source
-This layer.
- Type:
- Layer
removeEntities(entities) → {Vector}
Removes entities from layer.
Name | Type | Description |
---|---|---|
entities | Array.<Entity> | Entity array. |
- Overrides
- Source
- Returns this layer.
- Type:
- Vector
removeEntity(entity) → {Vector}
Remove entity from layer. TODO: memory leaks.
Name | Type | Description |
---|---|---|
entity | Entity | Entity to remove. |
- Overrides
- Source
- Returns this layer.
- Type:
- Vector
setAttribution(html)
Sets layer attribution text.
Name | Type | Description |
---|---|---|
html | string | HTML code that represents layer attribution, it could be just a text. |
- Overrides
- Source
setBaseLayer(isBaseLayer)
Sets base layer type true.
Name | Type | Description |
---|---|---|
isBaseLayer | boolean |
- Overrides
- Source
setColor(color)
Name | Type | Description |
---|---|---|
color | string |
- Source
setEntities(entities) → {Vector}
Removes current entities from layer and adds new entities.
Name | Type | Description |
---|---|---|
entities | Array.<Entity> | New entity array. |
- Overrides
- Source
- Returns layer instance.
- Type:
- Vector
setExtent(extent)
Sets visible geographical extent.
Name | Type | Description |
---|---|---|
extent | Extent | Layer visible geographical extent. |
- Overrides
- Source
setHeight(height)
Sets height over the ground.
Name | Type | Description |
---|---|---|
height | number | Layer height. |
- Overrides
- Source
(abstract) setVisibility(visibility)
Sets layer visibility.
Name | Type | Description |
---|---|---|
visibility | boolean | Layer visibility. |
- Overrides
- Source
setZIndex(zIndex)
Sets z-index.
Name | Type | Description |
---|---|---|
zIndex | number | Layer z-index. |
- Overrides
- Source
viewExtent()
View extent.
- Overrides
- Source