new AbstractContext(mizarConfiguration, mode, ctxOptions)
Parameters:
| Name | Type | Description |
|---|---|---|
mizarConfiguration |
Mizar.configuration | Mizar configuration |
mode |
CONTEXT | the type of context |
ctxOptions |
AbstractContext.skyContext | AbstractContext.planetContext | sky or planet options |
- Implements:
Listens to Events:
Methods
-
<protected> _fillDataProvider(layer, mizarDescription)
-
Fill data-provider-type layer by features coming from data object
Parameters:
Name Type Description layerLayer layer in which data should be added. mizarDescriptionObject See the base properties AbstractLayer.configuration and a specific layer for specific properties -
getTileManager()
-
- Implements:
-
registerNoStandardDataProvider(type, loadFunc)
-
Registers no standard data provider and call them in the addLayer method.
Parameters:
Name Type Description typestring data provider key loadFuncfunction Function Example
Registers planets on the sky
var planetProvider = ProviderFactory.create(Constants.PROVIDER.Planet); this.registerNoStandardDataProvider("planets", planetProvider.loadFiles); -
getContextConfiguration()
-
- Implements:
-
getMizarConfiguration()
-
- Implements:
-
getLonLatFromPixel()
-
- Implements:
-
getPixelFromLonLat()
-
- Implements:
-
getElevation()
-
- Implements:
-
getPositionTracker()
-
- Implements:
-
getElevationTracker()
-
- Implements:
-
getLayers()
-
- Implements:
-
getLayerByID()
-
- Implements:
-
getLayerByName()
-
- Implements:
-
addLayer()
-
- Implements:
-
removeLayer()
-
- Implements:
-
removeAllLayers()
-
- Implements:
-
addDraw()
-
- Implements:
-
removeDraw()
-
- Implements:
-
initTouchNavigation(options)
-
Initializes the touch navigation handler.
Parameters:
Name Type Description optionsObject to add touch navigation Properties
Name Type Description navigationNavigation Navigation object -
refresh()
-
- Implements:
-
initCanvas(canvas)
-
Initialization of the canvas element. When no canvas element is provided, sets to full screen.
Parameters:
Name Type Description canvasObject Canvas object Properties
Name Type Argument Description parentElementObject <nullable>
HTML object -
iniGlobeEvents(globe)
-
Initializes the planet or sky events.
Parameters:
Name Type Description globeAbstractGlobe Planet or Sky object -
show()
-
- Implements:
-
showComponents()
-
- Implements:
-
hideComponents()
-
- Implements:
-
hide()
-
- Implements:
-
setComponentVisibility()
-
- Implements:
-
showAdditionalLayers()
-
- Implements:
-
hideAdditionalLayers()
-
- Implements:
-
setBackgroundLayer()
-
- Implements:
-
setBackgroundLayerByID()
-
- Implements:
-
getAdditionalLayers()
-
- Implements:
-
getRenderContext()
-
- Implements:
-
<abstract> disbable()
-
-
<abstract> enable()
-
- Implements:
-
<abstract> setCompassVisible()
-
- Implements:
-
getMode()
-
- Implements:
-
<abstract> setCoordinateSystem()
-
- Implements:
-
getNavigation()
-
- Implements:
-
getCoordinateSystem()
-
- Implements:
-
addAnimation()
-
- Implements:
-
removeAnimation()
-
- Implements:
-
render()
-
- Implements:
- Context#render
-
dispose()
-
- Implements:
-
<abstract> destroy()
-
- Implements:
Type Definitions
-
planetContext
-
Planet context configuration
Type:
- Object
Properties:
Name Type Argument Default Description tileErrorTresholdfloat <optional>
3 continuousRenderingfloat <optional>
false renderContextRenderContext <optional>
Context rendering coordinateSystemAbstractProjection.configuration | AbstractProjection.azimuth_configuration | AbstractProjection.mercator_configuration CRS configuration planetLayerPlanetLayer <optional>
planetLayer navigationAbstractNavigation.planet_configuration | AbstractNavigation.flat_configuration navigation configuration -
skyContext
-
sky context configuration
Type:
- Object
Properties:
Name Type Argument Default Description tileErrorTresholdfloat <optional>
1.5 continuousRenderingfloat <optional>
true radiusfloat <optional>
10.0 Vector distance of the sky minFarint <optional>
15 coordinateSystemAbstractProjection.configuration | AbstractProjection.azimuth_configuration | AbstractProjection.mercator_configuration CRS configuration renderContextRenderContext <optional>
Context rendering navigationAbstractNavigation.astro_configuration navigation configuration compassstring <optional>
"compassDiv" div element where compass is displayed
Documentation