HorizonEngine
Interface to a Virtual Horizon engine.
To register a set of horizon options, call the registerHorizonOptions function:
horizonEngine.registerHorizonOptions(horizonOptions1)
horizonEngine.registerHorizonOptions(horizonOptions2)To unregister a set of horizon options, call the unregisterHorizonOptions function:
horizonEngine.registerHorizonOptions(horizonOptions1)
horizonEngine.registerHorizonOptions(horizonOptions2)
...
horizonEngine.unregisterHorizonOptions(horizonOptions2)To generate horizon results for specific sets of options, call the generateHorizon function:
horizonEngine.registerHorizonOptions(horizonOptions1)
horizonEngine.registerHorizonOptions(horizonOptions2)
horizonEngine.registerHorizonOptions(horizonOptions3)
...
val horizonResults = generateHorizon(
options = listOf(horizonOptions1, horizonOptions3),
navigationSnapshot = navigationSnapshot
)
horizonResults.forEach { result ->
val options = result.options
val snapshot = result.snapshot
val position = result.position
...
}Important: This is a Public Preview API. It may be changed or removed at any time.
Functions
Provides horizon data for the given location, based on a list of registered sets of horizon options.
Registers a set of horizon options. These options define the extent of the paths on the horizon and the map attributes that are collected for these paths.
Unregisters a previously registered set of horizon options. If the options set was not previously registered, the engine returns immediately.