UNPKG

sj-ng-webgl-globe

Version:

The fastest way to embed a 3D reactive globe in your Angular application using WebGL Earth. It is an open-source virtual globe made with HTML5 and Canvas WebGL technology. It comes with a JavaScript API adapting the popular LeafletJS API. On top of this A

2 lines 2.87 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("sj-ng-webgl-globe",["exports","@angular/core"],e):e((t=t||self)["sj-ng-webgl-globe"]={},t.ng.core)}(this,(function(t,e){"use strict";var o=function(){function t(){}return t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var n=function(){function t(){this.options={center:[null,null],zoom:null,altitude:7e6,atmosphere:!1,sky:!1,minAltitude:20,dragging:!0,tilting:!0,zooming:!0,scrollWheelZoom:!0,unconstrainedRotation:!1,proxyHost:""}}return t.prototype.ngOnInit=function(){var t=this;this.options={center:this.center,zoom:this.zoom,altitude:this.altitude,atmosphere:this.atmosphere,sky:this.sky,minAltitude:this.minAltitude,maxAltitude:this.maxAltitude,dragging:this.dragging,tilting:this.tilting,zooming:this.zooming,scrollWheelZoom:this.scrollWheelZoom,unconstrainedRotation:this.unconstrainedRotation,proxyHost:this.proxyHost},this.globe=new WE.map(this.sjGlobe.nativeElement,this.options),WE.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap contributors"}).addTo(this.globe),console.log(this.markers),void 0!==this.markers&&this.markers.length>0&&this.markers.forEach((function(e,o){var n=WE.marker([e.latitude,e.longitude]).addTo(t.globe);e.isPopupEnable&&n.bindPopup(e.popupHTML,{maxWidth:200,closeButton:!1})}))},t.decorators=[{type:e.Component,args:[{selector:"sj-ng-webgl-globe",template:"<div #sjGlobe></div>",encapsulation:e.ViewEncapsulation.None,styles:["\n .cesium-credit-textContainer{\n display: none;\n }\n "]}]}],t.ctorParameters=function(){return[]},t.propDecorators={sjGlobe:[{type:e.ViewChild,args:["sjGlobe",{static:!0}]}],center:[{type:e.Input,args:["center"]}],zoom:[{type:e.Input,args:["zoom"]}],altitude:[{type:e.Input,args:["altitude"]}],atmosphere:[{type:e.Input,args:["atmosphere"]}],sky:[{type:e.Input,args:["sky"]}],minAltitude:[{type:e.Input,args:["minAltitude"]}],maxAltitude:[{type:e.Input,args:["maxAltitude"]}],dragging:[{type:e.Input,args:["dragging"]}],tilting:[{type:e.Input,args:["tilting"]}],zooming:[{type:e.Input,args:["zooming"]}],scrollWheelZoom:[{type:e.Input,args:["scrollWheelZoom"]}],unconstrainedRotation:[{type:e.Input,args:["unconstrainedRotation"]}],proxyHost:[{type:e.Input,args:["proxyHost"]}],markers:[{type:e.Input,args:["markers"]}]},t}();var i=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[n],imports:[],exports:[n]}]}],t}();t.SJNgWebglGlobeModule=i,t.SjNgWebglGlobeComponent=n,t.SjNgWebglGlobeService=o,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=sj-ng-webgl-globe.umd.min.js.map