(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[49855],{96587:function(e,t,n){Promise.resolve().then(n.bind(n,8504))},90771:function(e,t,n){"use strict";var i=n(57437),r=n(31143),o=n(31691),s=n(17150),a=n(67208),l=n(71586),c=n(94013),p=n(36137),d=n(89414),u=n(2265),m=n(78236),g=n(33968);t.Z=e=>{let{children:t,preview:n}=e,[x,f]=(0,u.useState)(!0),h=(0,o.Z)(),b=(0,s.Z)(h.breakpoints.down("sm"));return(0,i.jsxs)(a.Z,{variant:"outlined",style:b?{margin:0,marginTop:"20px",padding:5}:{marginTop:"20px"},children:[(0,i.jsxs)(l.Z,{style:b?{padding:0,margin:"10px"}:{justifyContent:"flex-end"},children:[(0,i.jsx)(c.Z,{size:"small",color:"primary",onClick:()=>{f(e=>!e)},children:x?"Collapse Code":"Expand Code"}),(0,i.jsx)(c.Z,{size:"small",color:"primary",onClick:()=>{let e=x?t:n;e&&navigator.clipboard.writeText(e.toString())},children:(0,i.jsx)(r.Z,{fontSize:"small"})})]}),(0,i.jsx)(p.Z,{style:b?{padding:0}:{paddingTop:"16px"},children:(0,i.jsx)(d.ZP,{container:!0,spacing:0,children:(0,i.jsx)(d.ZP,{item:!0,xs:12,children:x?(0,i.jsx)(m.Z,{language:"typescript",style:g.Z,children:t?t.toString():""}):(0,i.jsx)(m.Z,{language:"typescript",style:g.Z,children:n?n.toString():""})})})})]})}},48951:function(e,t,n){"use strict";var i=n(57437),r=n(26225),o=n.n(r),s=n(2265),a=n(16449);let l=(0,s.forwardRef)((e,t)=>{let{children:n,title:r="",meta:s,...l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o(),{children:[(0,i.jsx)("title",{children:"".concat(r," | Geopois: Geospatial React UI and Maps Tools")}),(0,i.jsx)("meta",{name:"description",content:"Integrate maps and geospatial data into your React or Next.js apps easily with geopois. Perfect for developers looking to enhance spatial data visualization."},"desc"),(0,i.jsx)("meta",{property:"og:title",content:"Geopois: Geospatial React UI and Maps Tools"}),(0,i.jsx)("meta",{property:"og:description",content:"Integrate maps and geospatial data into your React or Next.js apps easily with geopois. Perfect for developers looking to enhance spatial data visualization."}),(0,i.jsx)("meta",{property:"og:image",content:"https://geopois.com/favicon/geopois.png"}),s]}),(0,i.jsx)(a.Z,{ref:t,...l,children:n})]})});t.Z=l},18810:function(e,t,n){"use strict";var i=n(57437),r=n(2265),o=n(16449),s=n(67208),a=n(97260),l=n(5002),c=n(8350),p=n(36137),d=n(31691);let u={"& .MuiCardHeader-action":{mr:0}},m=r.forwardRef((e,t)=>{let{border:n=!1,boxShadow:r,children:m,content:g=!0,contentClass:x="",contentSX:f={},darkTitle:h,secondary:b,shadow:Z,sx:w={},title:j,...v}=e,y=(0,d.Z)();return(0,i.jsx)(o.Z,{sx:{[y.breakpoints.down("sm")]:{marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0}},children:(0,i.jsxs)(s.Z,{ref:t,...v,sx:{border:n?"1px solid":"none",borderColor:"dark"===y.palette.mode?y.palette.background.default:y.palette.grey[300]+98,":hover":{boxShadow:r?Z||("dark"===y.palette.mode?"0 2px 14px 0 rgb(33 150 243 / 10%)":"0 2px 14px 0 rgb(32 40 45 / 8%)"):"inherit"},[y.breakpoints.down("sm")]:{marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0,boxShadow:"none",border:"none"},...w},children:[!h&&j&&(0,i.jsx)(a.Z,{sx:u,title:j,action:b}),h&&j&&(0,i.jsx)(a.Z,{sx:u,title:(0,i.jsx)(l.Z,{variant:"h3",children:j}),action:b}),j&&(0,i.jsx)(c.Z,{}),g&&(0,i.jsx)(p.Z,{sx:{[y.breakpoints.down("sm")]:{paddingLeft:0,paddingRight:0},...f},className:x,children:m}),!g&&m]})})});t.Z=m},58041:function(e,t,n){"use strict";var i=n(57437),r=n(2265),o=n(17150),s=n(16449),a=n(67208),l=n(97260),c=n(5002),p=n(8350),d=n(36137),u=n(31691);let m=r.forwardRef((e,t)=>{let{children:n,className:r,content:m=!0,contentClass:g,darkTitle:x,secondary:f,sx:h={},contentSX:b={},title:Z,...w}=e,j=(0,u.Z)(),v=(0,o.Z)(j.breakpoints.down("sm"));return(0,i.jsx)(s.Z,{sx:{margin:0,padding:0,[j.breakpoints.down("sm")]:{paddingLeft:0,paddingRight:0}},children:(0,i.jsxs)(a.Z,{ref:t,sx:{border:"1px solid",borderColor:"dark"===j.palette.mode?j.palette.dark.light+15:j.palette.grey[200],":hover":{boxShadow:"dark"===j.palette.mode?"0 2px 14px 0 rgb(33 150 243 / 10%)":"0 2px 14px 0 rgb(32 40 45 / 8%)"},[j.breakpoints.down("sm")]:{marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0,boxShadow:"none",border:"none"},...h},...w,children:[!v&&!x&&Z&&(0,i.jsx)(l.Z,{sx:{p:2.5},title:(0,i.jsx)(c.Z,{variant:"h5",children:Z}),action:f}),!v&&x&&Z&&(0,i.jsx)(l.Z,{sx:{p:2.5},title:(0,i.jsx)(c.Z,{variant:"h4",children:Z}),action:f}),!v&&Z&&(0,i.jsx)(p.Z,{sx:{opacity:1,borderColor:"dark"===j.palette.mode?j.palette.dark.light+15:j.palette.grey[200]}}),m&&(0,i.jsx)(d.Z,{sx:{p:2.5,[j.breakpoints.down("sm")]:{paddingLeft:0,paddingRight:0},...b},className:g||"",children:n}),!m&&n]})})});t.Z=m},53239:function(e,t,n){"use strict";n.d(t,{RK:function(){return r},dv:function(){return i}});let i=3,r=260},8504:function(e,t,n){"use strict";n.d(t,{default:function(){return w}});var i=n(57437),r=n(89414),o=n(48951),s=n(53239),a=n(18810),l=n(58041),c=n(2265),p=n(50807),d=n(15492),u=n(42348),m=n(8906),g=n(16808),x=n(74150);n(86037);var f=n(95925),h=n.n(f),b=()=>{let e=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(!e.current)return;let t=new u.Z({collapsible:!1}),n=new p.Z({layers:[new g.Z({source:new x.Z})],controls:(0,m.c)({attribution:!1}).extend([t]),target:"map",view:new d.ZP({center:[0,0],zoom:2})});function i(){let e=n.getSize();if(!e)return;let i=e[0]<600;t.setCollapsible(i),t.setCollapsed(i)}return window.addEventListener("resize",i),i(),()=>{n.setTarget()}},[]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{id:"map",className:h().map,ref:e})})},Z=n(90771),w=()=>(0,i.jsx)(o.Z,{title:"Openlayers Attributions",children:(0,i.jsx)(a.Z,{title:"Openlayers Attributions",children:(0,i.jsx)(r.ZP,{container:!0,spacing:s.dv,children:(0,i.jsx)(r.ZP,{item:!0,xs:12,md:12,children:(0,i.jsxs)(l.Z,{title:"Openlayers Attributions",children:[(0,i.jsx)(b,{}),(0,i.jsx)(Z.Z,{preview:"\nconst node = mapNode.current;\nif (!node) return;\n\nconst attribution = new Attribution({\n  collapsible: false\n});\nconst map = new Map({\n  layers: [\n    new TileLayer({\n      source: new OSM()\n    })\n  ],\n  controls: defaultControls({ attribution: false }).extend([attribution]),\n  target: 'map',\n  view: new View({\n    center: [0, 0],\n    zoom: 2\n  })\n});\n\nfunction checkSize() {\n  const size = map.getSize();\n  if (!size) return;\n  const small = size[0] < 600;\n  attribution.setCollapsible(small);\n  attribution.setCollapsed(small);\n}\n\nwindow.addEventListener('resize', checkSize);\ncheckSize();\n\nreturn () => {\n  map.setTarget();\n};\n",children:"\nimport React, { useEffect, useRef } from 'react';\n//import ol\nimport Map from 'ol/Map';\nimport OSM from 'ol/source/OSM';\nimport TileLayer from 'ol/layer/Tile';\nimport View from 'ol/View';\nimport { Attribution, defaults as defaultControls } from 'ol/control';\n\n// Import Styles\nimport 'ol/ol.css';\nimport styles from '../osmStyles.module.scss';\n\nconst AttributionsComponent = () => {\n  const mapNode = useRef(null);\n\n  useEffect(() => {\n    const node = mapNode.current;\n    if (!node) return;\n\n    const attribution = new Attribution({\n      collapsible: false\n    });\n    const map = new Map({\n      layers: [\n        new TileLayer({\n          source: new OSM()\n        })\n      ],\n      controls: defaultControls({ attribution: false }).extend([attribution]),\n      target: 'map',\n      view: new View({\n        center: [0, 0],\n        zoom: 2\n      })\n    });\n\n    function checkSize() {\n      const size = map.getSize();\n      if (!size) return;\n      const small = size[0] < 600;\n      attribution.setCollapsible(small);\n      attribution.setCollapsed(small);\n    }\n\n    window.addEventListener('resize', checkSize);\n    checkSize();\n\n    return () => {\n      map.setTarget();\n    };\n  }, []);\n\n  return (\n    <>\n      <div id=\"map\" className={styles.map} ref={mapNode}></div>\n    </>\n  );\n};\n\nexport default AttributionsComponent;\n"})]})})})})})},95925:function(e){e.exports={map:"osmStyles_map__fZ96p"}},16808:function(e,t,n){"use strict";var i=n(26682),r=n(77999);class o extends i.Z{constructor(e){super(e)}createRenderer(){return new r.Z(this)}}t.Z=o},74150:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var i=n(59198);let r='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class o extends i.Z{constructor(e){super({attributions:void 0!==(e=e||{}).attributions?e.attributions:[r],attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:void 0!==e.crossOrigin?e.crossOrigin:"anonymous",interpolate:e.interpolate,maxZoom:void 0!==e.maxZoom?e.maxZoom:19,opaque:void 0===e.opaque||e.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:void 0!==e.url?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:e.wrapX,zDirection:e.zDirection})}}t.Z=o},59198:function(e,t,n){"use strict";var i=n(83660),r=n(14078);class o extends i.Z{constructor(e){let t=void 0!==(e=e||{}).projection?e.projection:"EPSG:3857";super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,opaque:e.opaque,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:void 0!==e.tileGrid?e.tileGrid:(0,r.dl)({extent:(0,r.Tl)(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize}),tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=void 0!==e.gutter?e.gutter:0}getGutter(){return this.gutter_}}t.Z=o}},function(e){e.O(0,[63736,41868,2657,19472,44584,66751,26379,19506,66662,69120,18914,50807,77297,7143,73787,14078,88910,83660,77999,92971,52117,1744],function(){return e(e.s=96587)}),_N_E=e.O()}]);