You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.2 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2207],{26606:function(e,t,n){var a=n(12739),r=n(41376),o=n(79847),i=n(75469),s=n(42010),w=n(41372),c=n(95783),u=n(54354),h=n(79072),l=n(720),p=n(77975),d=n(69039),f=n(12810),Z=new h.Z({points:2,radius:5,stroke:new l.Z({width:2,color:"black"}),rotateWithView:!0}),g=new h.Z({points:3,radius:5,fill:new p.Z({color:"black"}),rotateWithView:!0}),k=[new d.ZP({image:Z}),new d.ZP({image:g})],m=new c.Z({attributions:'Weather data by <a href="https://openweathermap.org/current">OpenWeather</a>'}),b=new r.Z({layers:[new s.Z({source:new o.Z}),new w.Z({source:m,style:function(e){var t=e.get("wind"),n=(t.deg-180)*Math.PI/180,a=t.speed/10;return Z.setScale([1,a]),Z.setRotation(n),g.setDisplacement([0,g.getRadius()/2+Z.getRadius()*a]),g.setRotation(n),k}})],target:"map",view:new u.ZP({center:[0,0],zoom:2})});fetch("data/openweather/weather.json").then((function(e){return e.json()})).then((function(e){var t=[];e.list.forEach((function(e){var n=new a.Z(new i.Z((0,f.mi)([e.coord.lon,e.coord.lat])));n.setProperties(e),t.push(n)})),m.addFeatures(t),b.getView().fit(m.getExtent())}))}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(26606)}]);
//# sourceMappingURL=wind-arrows.js.map