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.1 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[74],{303:function(e,n,t){"use strict";t.r(n);var o,a=t(30),r=t(3),i=t(228),c=t(19),w=t(10),g=t(2),s=t(11),u=t(21),l=t(15),d=t(67),m=new s.c({fill:new u.a({color:"rgba(255, 255, 255, 0.6)"}),stroke:new l.a({color:"#319FD3",width:1}),text:new d.a}),f=new r.a({layers:[new i.a({imageRatio:2,source:new w.a({url:"data/geojson/countries.geojson",format:new a.a}),style:function(e){return m.getText().setText(e.get("name")),m}})],target:"map",view:new g.a({center:[0,0],zoom:1})}),p=new c.a({source:new w.a,map:f,style:new s.c({stroke:new l.a({color:"#f00",width:1}),fill:new u.a({color:"rgba(255,0,0,0.1)"})})}),v=function(e){f.getLayers().item(0).getFeatures(e).then((function(e){var n=e.length>0?e[0]:void 0,t=document.getElementById("info");t.innerHTML=n?n.getId()+": "+n.get("name"):" ",n!==o&&(o&&p.getSource().removeFeature(o),n&&p.getSource().addFeature(n),o=n)}))};f.on("pointermove",(function(e){e.dragging||v(e.pixel)})),f.on("click",(function(e){v(e.pixel)}))}},[[303,0]]]);
//# sourceMappingURL=image-vector-layer.js.map