ol-cesium
Version:
OpenLayers Cesium integration library
2 lines • 2.1 kB
JavaScript
(()=>{"use strict";var e,t={6249:(e,t,o)=>{var r=o(7774),n=o(3969),l=o(8456),s=o(6459),a=o(9800),i=o(4795),c=o(3797),u=o(4949),w=o(9529),f=o(6424),g=o(5761);const d=new f.Z({source:new w.Z}),p=new u.Z({style(e,t){const o=e.get("fillColor")||"white",s=e.get("strokeColor")||"grey";return new l.ZP({fill:new n.Z({color:o}),stroke:new r.Z({color:s,width:1})})},source:new c.Z({format:new i.Z,url:"data/geojson/buildings.geojson"})}),v=new g.Z({layers:[d,p],target:"map2d",view:new a.ZP({center:[0,0],zoom:2})});p.set("olcs_shadows",!0);const h=new s.ZP({map:v,target:"map3d"});h.setEnabled(!0);const b=h.getCesiumScene();b.shadowMap.enabled=!0,b.globe.enableLighting=!0;const Z=p.getSource();Z.once("featuresloadend",(()=>{"ready"===Z.getState()&&v.getView().fit(p.getSource().getExtent())}));const m=new l.ZP({fill:new n.Z({color:[0,255,0,1]}),stroke:new r.Z({color:[0,153,255,1],width:3})});let y;v.on("click",(e=>{y&&y.setStyle(null),y=v.forEachFeatureAtPixel(e.pixel,((e,t)=>e)),y&&y.setStyle(m)}))}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var l=o[e]={exports:{}};return t[e].call(l.exports,l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,o,n,l)=>{if(!o){var s=1/0;for(u=0;u<e.length;u++){for(var[o,n,l]=e[u],a=!0,i=0;i<o.length;i++)(!1&l||s>=l)&&Object.keys(r.O).every((e=>r.O[e](o[i])))?o.splice(i--,1):(a=!1,l<s&&(s=l));if(a){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[o,n,l]},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.j=816,(()=>{var e={816:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var n,l,[s,a,i]=o,c=0;if(s.some((t=>0!==e[t]))){for(n in a)r.o(a,n)&&(r.m[n]=a[n]);if(i)var u=i(r)}for(t&&t(o);c<s.length;c++)l=s[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(u)},o=self.webpackChunkol_cesium=self.webpackChunkol_cesium||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=r.O(void 0,[351],(()=>r(6249)));n=r.O(n)})();
//# sourceMappingURL=buildings.c01ef1e94a85649f78d7.js.map