"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9195],{25208:function(e,t,n){var r,o=n(12739),c=n(5265),a=n(41376),i=n(54354),l=n(79847),u=n(95783),s=n(69039),h=n(720),g=n(42010),w=n(41372),f=new g.Z({source:new l.Z}),k=new s.ZP({stroke:new h.Z({color:"black",width:1})}),d=new o.Z(new c.Z([[-4e6,0],[4e6,0]])),Z=new w.Z({source:new u.Z({features:[d]}),style:k}),m=new a.Z({layers:[f,Z],target:"map",view:new i.ZP({center:[0,0],zoom:2})}),v=document.getElementById("status");m.on("singleclick",(function(e){var t=!1;m.forEachFeatureAtPixel(e.pixel,(function(){t=!0}),{hitTolerance:r}),t?(k.getStroke().setColor("green"),v.innerHTML="A feature got hit!"):(k.getStroke().setColor("black"),v.innerHTML="No feature got hit."),d.changed()}));var p=document.getElementById("hitTolerance"),b=document.getElementById("circle"),y=function(){var e=2*(r=parseInt(p.value,10))+2;b.width=e,b.height=e;var t=b.getContext("2d");t.clearRect(0,0,e,e),t.beginPath(),t.arc(r+1,r+1,r+.5,0,2*Math.PI),t.fill(),t.stroke()};p.onchange=y,y()}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(25208)}]); //# sourceMappingURL=hit-tolerance.js.map