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

215 lines (208 loc) 9.07 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) : typeof define === 'function' && define.amd ? define('sj-ng-webgl-globe', ['exports', '@angular/core'], factory) : (global = global || self, factory(global['sj-ng-webgl-globe'] = {}, global.ng.core)); }(this, (function (exports, core) { 'use strict'; /** * @fileoverview added by tsickle * Generated from: lib/sj-ng-webgl-globe.service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var SjNgWebglGlobeService = /** @class */ (function () { function SjNgWebglGlobeService() { } SjNgWebglGlobeService.decorators = [ { type: core.Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ SjNgWebglGlobeService.ctorParameters = function () { return []; }; /** @nocollapse */ SjNgWebglGlobeService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function SjNgWebglGlobeService_Factory() { return new SjNgWebglGlobeService(); }, token: SjNgWebglGlobeService, providedIn: "root" }); return SjNgWebglGlobeService; }()); /** * @fileoverview added by tsickle * Generated from: lib/sj-ng-webgl-globe.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @record */ function Options() { } if (false) { /** @type {?|undefined} */ Options.prototype.center; /** @type {?|undefined} */ Options.prototype.zoom; /** @type {?|undefined} */ Options.prototype.altitude; /** @type {?|undefined} */ Options.prototype.atmosphere; /** @type {?|undefined} */ Options.prototype.sky; /** @type {?|undefined} */ Options.prototype.minAltitude; /** @type {?|undefined} */ Options.prototype.maxAltitude; /** @type {?|undefined} */ Options.prototype.dragging; /** @type {?|undefined} */ Options.prototype.tilting; /** @type {?|undefined} */ Options.prototype.zooming; /** @type {?|undefined} */ Options.prototype.scrollWheelZoom; /** @type {?|undefined} */ Options.prototype.unconstrainedRotation; /** @type {?|undefined} */ Options.prototype.proxyHost; } var SjNgWebglGlobeComponent = /** @class */ (function () { function SjNgWebglGlobeComponent() { this.options = { center: [null, null], zoom: null, altitude: 7000000, atmosphere: false, sky: false, minAltitude: 20, dragging: true, tilting: true, zooming: true, scrollWheelZoom: true, unconstrainedRotation: false, proxyHost: '' }; } /** * @return {?} */ SjNgWebglGlobeComponent.prototype.ngOnInit = /** * @return {?} */ function () { var _this = 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); if (this.markers !== undefined && this.markers.length > 0) { this.markers.forEach((/** * @param {?} m * @param {?} i * @return {?} */ function (m, i) { /** @type {?} */ var marker = WE.marker([m.latitude, m.longitude]).addTo(_this.globe); if (m.isPopupEnable) { marker.bindPopup(m.popupHTML, { maxWidth: 200, closeButton: false }); } })); } }; SjNgWebglGlobeComponent.decorators = [ { type: core.Component, args: [{ selector: 'sj-ng-webgl-globe', template: "<div #sjGlobe></div>", encapsulation: core.ViewEncapsulation.None, styles: ["\n .cesium-credit-textContainer{\n display: none;\n }\n "] }] } ]; /** @nocollapse */ SjNgWebglGlobeComponent.ctorParameters = function () { return []; }; SjNgWebglGlobeComponent.propDecorators = { sjGlobe: [{ type: core.ViewChild, args: ['sjGlobe', { static: true },] }], center: [{ type: core.Input, args: ['center',] }], zoom: [{ type: core.Input, args: ['zoom',] }], altitude: [{ type: core.Input, args: ['altitude',] }], atmosphere: [{ type: core.Input, args: ['atmosphere',] }], sky: [{ type: core.Input, args: ['sky',] }], minAltitude: [{ type: core.Input, args: ['minAltitude',] }], maxAltitude: [{ type: core.Input, args: ['maxAltitude',] }], dragging: [{ type: core.Input, args: ['dragging',] }], tilting: [{ type: core.Input, args: ['tilting',] }], zooming: [{ type: core.Input, args: ['zooming',] }], scrollWheelZoom: [{ type: core.Input, args: ['scrollWheelZoom',] }], unconstrainedRotation: [{ type: core.Input, args: ['unconstrainedRotation',] }], proxyHost: [{ type: core.Input, args: ['proxyHost',] }], markers: [{ type: core.Input, args: ['markers',] }] }; return SjNgWebglGlobeComponent; }()); if (false) { /** @type {?} */ SjNgWebglGlobeComponent.prototype.globe; /** @type {?} */ SjNgWebglGlobeComponent.prototype.options; /** @type {?} */ SjNgWebglGlobeComponent.prototype.sjGlobe; /** @type {?} */ SjNgWebglGlobeComponent.prototype.center; /** @type {?} */ SjNgWebglGlobeComponent.prototype.zoom; /** @type {?} */ SjNgWebglGlobeComponent.prototype.altitude; /** @type {?} */ SjNgWebglGlobeComponent.prototype.atmosphere; /** @type {?} */ SjNgWebglGlobeComponent.prototype.sky; /** @type {?} */ SjNgWebglGlobeComponent.prototype.minAltitude; /** @type {?} */ SjNgWebglGlobeComponent.prototype.maxAltitude; /** @type {?} */ SjNgWebglGlobeComponent.prototype.dragging; /** @type {?} */ SjNgWebglGlobeComponent.prototype.tilting; /** @type {?} */ SjNgWebglGlobeComponent.prototype.zooming; /** @type {?} */ SjNgWebglGlobeComponent.prototype.scrollWheelZoom; /** @type {?} */ SjNgWebglGlobeComponent.prototype.unconstrainedRotation; /** @type {?} */ SjNgWebglGlobeComponent.prototype.proxyHost; /** @type {?} */ SjNgWebglGlobeComponent.prototype.markers; } /** * @fileoverview added by tsickle * Generated from: lib/sj-ng-webgl-globe.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var SJNgWebglGlobeModule = /** @class */ (function () { function SJNgWebglGlobeModule() { } SJNgWebglGlobeModule.decorators = [ { type: core.NgModule, args: [{ declarations: [SjNgWebglGlobeComponent], imports: [], exports: [SjNgWebglGlobeComponent] },] } ]; return SJNgWebglGlobeModule; }()); exports.SJNgWebglGlobeModule = SJNgWebglGlobeModule; exports.SjNgWebglGlobeComponent = SjNgWebglGlobeComponent; exports.SjNgWebglGlobeService = SjNgWebglGlobeService; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=sj-ng-webgl-globe.umd.js.map