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([[3013],{29335:function(e,t,r){var n=r(12739),o=r(41376),l=r(54354),a=r(64132),i=r(79847),u=r(95783),c=r(69039),f=r(42010),s=r(41372);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,l=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(l.push(n.value),!t||l.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw o}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var y=(0,r(12810).mi)([-73.98189,40.76805]),p="rgba(120, 120, 120, 1)",g="Columbus Circle",h=null,v=function(e,t,r,n){e.fillStyle="rgba(255,0,0,1)",e.strokeStyle=n,e.lineWidth=1,e.textAlign="center",e.textBaseline="middle",e.font="bold 30px verdana",e.filter="drop-shadow(7px 7px 2px #e81)",e.fillText(g,t,r),e.strokeText(g,t,r)},m=new n.Z({geometry:new a.Z(y,50)});m.set("label-color",p),m.setStyle(new c.ZP({renderer:function(e,t){var r=b(e,2),n=b(r[0],2),o=n[0],l=n[1],a=b(r[1],2),i=a[0],u=a[1],c=t.context,f=i-o,s=u-l,d=Math.sqrt(f*f+s*s),y=1.4*d,p=c.createRadialGradient(o,l,0,o,l,y);p.addColorStop(0,"rgba(255,0,0,0)"),p.addColorStop(.6,"rgba(255,0,0,0.2)"),p.addColorStop(1,"rgba(255,0,0,0.8)"),c.beginPath(),c.arc(o,l,d,0,2*Math.PI,!0),c.fillStyle=p,c.fill(),c.strokeStyle="rgba(255,0,0,1)",c.stroke(),v(c,o,l,m.get("label-color"))},hitDetectionRenderer:function(e,t){var r=b(e[0],2),n=r[0],o=r[1],l=t.context;v(l,n,o,m.get("label-color"))}}));var w=new o.Z({layers:[new f.Z({source:new i.Z,visible:!0}),new s.Z({source:new u.Z({features:[m]})})],target:"map",view:new l.ZP({center:y,zoom:19})});w.on("pointermove",(function(e){var t=w.forEachFeatureAtPixel(e.pixel,(function(e){return e.set("label-color","rgba(255,255,255,1)"),e}));h&&h!=t&&h.set("label-color",p),h=t}))}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(29335)}]);
//# sourceMappingURL=custom-hit-detection-renderer.js.map