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

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[184],{30236:function(e,t,n){var o=n(41376),i=n(79847),r=n(42010),c=n(54354),s=n(81769),u=n(45830),a=n(12810),w=document.getElementById("view-projection"),v=(0,a.U2)(w.value),l=new s.Z({units:"metric",bar:!0,steps:4,text:!0,minWidth:140}),g=new o.Z({controls:(0,u.ce)().extend([l]),layers:[new r.Z({source:new i.Z})],target:"map",view:new c.ZP({center:(0,a.vs)([0,52],"EPSG:4326",v),zoom:6,projection:v})});w.addEventListener("change",(function(){var e=g.getView(),t=e.getProjection(),n=(0,a.U2)(w.value),o=e.getResolution(),i=e.getCenter(),r=e.getRotation(),s=(0,a.vs)(i,t,n),u=o*(0,a._Q)(t,1,i,"m")/(0,a._Q)(n,1,s,"m"),v=new c.ZP({center:s,resolution:u,rotation:r,projection:n});g.setView(v)}))}},function(e){var t=function(t){return e(e.s=t)};t(9877),t(30236)}]);
//# sourceMappingURL=projection-and-scale.js.map