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
2.5 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9578],{64361:function(e,t,i){var n,o,l=i(91118),a=i(41376),r=i(79847),s=i(42010),c=i(95783),y=i(54354),p=i(65322),f=new c.Z({url:"data/geojson/world-cities.geojson",format:new l.Z}),u={icons:{symbol:{symbolType:"image",src:"data/icon.png",size:[18,28],color:"lightyellow",rotateWithView:!1,offset:[0,9]}},triangles:{symbol:{symbolType:"triangle",size:18,color:["interpolate",["linear"],["get","population"],2e4,"#5aca5b",3e5,"#ff6a19"],rotateWithView:!0}},"triangles-latitude":{symbol:{symbolType:"triangle",size:["interpolate",["linear"],["get","population"],4e4,12,2e6,24],color:["interpolate",["linear"],["get","latitude"],-60,"#ff14c3",-20,"#ff621d",20,"#ffed02",60,"#00ff67"],offset:[0,0],opacity:.95}},circles:{symbol:{symbolType:"circle",size:["interpolate",["linear"],["get","population"],4e4,8,2e6,28],color:"#006688",rotateWithView:!1,offset:[0,0],opacity:["interpolate",["linear"],["get","population"],4e4,.6,2e6,.92]}},"circles-zoom":{symbol:{symbolType:"circle",size:["interpolate",["exponential",2.5],["zoom"],2,1,14,32],color:"#240572",offset:[0,0],opacity:.95}},"rotating-bars":{symbol:{symbolType:"square",rotation:["*",["time"],.1],size:["array",4,["interpolate",["linear"],["get","population"],2e4,4,3e5,28]],color:["interpolate",["linear"],["get","population"],2e4,"#ffdc00",3e5,"#ff5b19"],offset:["array",0,["interpolate",["linear"],["get","population"],2e4,2,3e5,14]]}}},m=new a.Z({layers:[new s.Z({source:new r.Z})],target:document.getElementById("map"),view:new y.ZP({center:[0,0],zoom:2})});function d(e){var t=o;o=new p.Z({source:f,style:e,disableHitDetection:!0}),m.addLayer(o),t&&(m.removeLayer(t),t.dispose()),n=e}var g=document.getElementById("style-valid"),v=document.getElementById("style-invalid");function b(e){var t="string"==typeof e;g.style.display=null===e?"initial":"none",v.firstElementChild.innerText=t?e:"",v.style.display=t?"initial":"none"}var w=document.getElementById("style-editor");w.addEventListener("input",(function(){var e=w.value;try{var t=JSON.parse(e);JSON.stringify(t)!==JSON.stringify(n)&&d(t),b(null)}catch(e){b(e.message)}}));var h=document.getElementById("style-select");function z(){var e=h.value,t=u[e];w.value=JSON.stringify(t,null,2);try{d(t),b()}catch(e){b(e.message)}}h.value="circles",z(),h.addEventListener("change",z),function e(){m.render(),window.requestAnimationFrame(e)}()}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(64361)}]);
//# sourceMappingURL=webgl-points-layer.js.map