Skip to content

Instantly share code, notes, and snippets.

View ComBatVision's full-sized avatar

Eugene Maksymenko ComBatVision

View GitHub Profile
@ComBatVision
ComBatVision / WorldWindKotlin-example-android.kt
Last active October 1, 2022 15:40
Example of usage WorldWindKotlin on Android
/**
* Creates a simple view of a globe with touch navigation and a few layers.
*/
open class BasicGlobeActivity: Activity() {
/**
* The WorldWindow (GLSurfaceView) maintained by this activity
*/
override lateinit var wwd: WorldWindow
override fun onCreate(savedInstanceState: Bundle?) {
@ComBatVision
ComBatVision / WorldWindKotlin-example-js.kt
Last active October 1, 2022 15:40
Example of usage WorldWindKotlin on JS
fun main() {
// Register an event listener to be called when the page is loaded.
window.onload = {
// Create a WorldWindow for the canvas.
val canvas = document.getElementById("WorldWindow") as HTMLCanvasElement
val wwd = WorldWindow(canvas)
// Add some image layers to the WorldWindow's globe.
with(wwd.engine.layers) {
addLayer(BackgroundLayer())