UNPKG

ol-cesium

Version:

OpenLayers Cesium integration library

2 lines 2.67 kB
!function(e){function n(n){for(var r,l,a=n[0],u=n[1],c=n[2],p=0,f=[];p<a.length;p++)l=a[p],o[l]&&f.push(o[l][0]),o[l]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(n);f.length;)f.shift()();return i.push.apply(i,c||[]),t()}function t(){for(var e,n=0;n<i.length;n++){for(var t=i[n],r=!0,a=1;a<t.length;a++){var u=t[a];0!==o[u]&&(r=!1)}r&&(i.splice(n--,1),e=l(l.s=t[0]))}return e}var r={},o={12:0},i=[];function l(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=r,l.d=function(e,n,t){l.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,n){if(1&n&&(e=l(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)l.d(t,r,function(n){return e[n]}.bind(null,r));return t},l.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(n,"a",n),n},l.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},l.p="";var a=window.webpackJsonp=window.webpackJsonp||[],u=a.push.bind(a);a.push=n,a=a.slice();for(var c=0;c<a.length;c++)n(a[c]);var s=u;i.push([175,0]),t()}({175:function(e,n,t){e.exports=t(176)},176:function(e,n,t){"use strict";t.r(n);var r=t(27),o=t(5),i=t(21),l=t(70),a=t(25),u=t(17),c=t(26);Cesium.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0MzAyNzUyYi0zY2QxLTQxZDItODRkOS1hNTA3MDU3ZTBiMDUiLCJpZCI6MjU0MSwiaWF0IjoxNTMzNjI1MTYwfQ.oHn1SUWJa12esu7XUUtEoc1BbEbuZpRocLetw6M6_AA";const s=new c.a({layers:[new u.a({source:new a.b})],controls:Object(l.a)({attributionOptions:{collapsible:!1}}),target:"map",view:new i.a({center:Object(o.l)([25,20],"EPSG:4326","EPSG:3857"),zoom:3})}),p=document.getElementById("time"),f=new r.a({map:s,time(){const e=p.value;if(f.getCesiumScene().globe.enableLighting&&e){const n=new Date;return n.setUTCHours(e),Cesium.JulianDate.fromDate(n)}return Cesium.JulianDate.now()}}),d=f.getCesiumScene();d.terrainProvider=Cesium.createWorldTerrain(),f.setEnabled(!0),p.style.display="none",document.getElementById("enable").addEventListener("click",()=>f.setEnabled(!f.getEnabled())),window.toggleTime=function(){d.globe.enableLighting=!d.globe.enableLighting,"none"==p.style.display?p.style.display="inline-block":p.style.display="none"},n.default={}}}); //# sourceMappingURL=main.c7ab27b9b12321eb73d2.js.map