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
966 B
JavaScript

2 weeks ago
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4085],{91449:function(e,n,t){var r=t(86291),o=t(95883),i=t(41376),c=t(54354),u=new o.Z({url:"https://ahocevar.com/geoserver/wms",params:{LAYERS:"ne:ne"},serverType:"geoserver",crossOrigin:"anonymous"}),a=new r.Z({source:u}),s=new c.ZP({center:[0,0],zoom:1}),f=new i.Z({layers:[a],target:"map",view:s});f.on("singleclick",(function(e){document.getElementById("info").innerHTML="";var n=s.getResolution(),t=u.getFeatureInfoUrl(e.coordinate,n,"EPSG:3857",{INFO_FORMAT:"text/html"});t&&fetch(t).then((function(e){return e.text()})).then((function(e){document.getElementById("info").innerHTML=e}))})),f.on("pointermove",(function(e){if(!e.dragging){var n=f.getEventPixel(e.originalEvent),t=f.forEachLayerAtPixel(n,(function(){return!0}));f.getTargetElement().style.cursor=t?"pointer":""}}))}},function(e){var n=function(n){return e(e.s=n)};n(9877),n(91449)}]);
//# sourceMappingURL=getfeatureinfo-image.js.map