Full documentation coming soon

Quick start example

                        
import {GlobekitView, IcosphereDrawable, PointsDataDrawable, CalloutManager} from 'globekit';

class GlobeKitSample {
    
    constructor() {
        const canvas = document.getElementById('gk-canvas');
        const options = {};
        this.globeKitView = new GlobekitView(canvas, this.gkOnInit, options);
    }
    
    gkOnInit = (gkView) => {
        this.globe = new IcosphereDrawable('./path/to/texture.png');
        
        this.points = new PointsDataDrawable();
        this.points.attachDataset([]);
        this.points.onSelection = this.onSelection;
        
        this.globeKitView.addDrawable(this.globe);
        this.globeKitView.addDrawable(this.points);
        
        const calloutHolder = document.getElementById('callout-holder');
        this.calloutManager = new CalloutManager(calloutHolder);
        this.globeKitView.attachCalloutManager(this.calloutManager);
    }
    
    onSelection = (selections) => {
        if (selections[0]) {
            this.calloutManager.replaceCallouts([selections[0]]);
        }
        else {
            this.calloutManager.removeAllCallouts();
        }
    }
}