diff --git a/404.html b/404.html index 4cdf54fd..6205f751 100644 --- a/404.html +++ b/404.html @@ -1,16 +1,13 @@ - +
- -0&&l.getRangeAt(0);a.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;var c=!1;try{c=document.execCommand("copy")}catch(s){}r.remove(),i&&(l.removeAllRanges(),l.addRange(i)),o&&o.focus()}(t),l(!0),i.current=window.setTimeout((function(){l(!1)}),1e3)}),[t]);return(0,a.useEffect)((function(){return function(){return window.clearTimeout(i.current)}}),[]),a.createElement("button",{type:"button","aria-label":o?(0,p.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,p.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,p.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.Z)("clean-btn",n,tt.copyButton,o&&tt.copyButtonCopied),onClick:c},a.createElement("span",{className:tt.copyButtonIcons,"aria-hidden":"true"},a.createElement(Ke,{className:tt.copyButtonIcon}),a.createElement(et,{className:tt.copyButtonSuccessIcon})))}function at(e){return a.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}const rt={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function ot(e){var t=e.className,n=e.onClick,r=e.isEnabled,o=(0,p.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return a.createElement("button",{type:"button",onClick:n,className:(0,u.Z)("clean-btn",t,r&&rt.wordWrapButtonEnabled),"aria-label":o,title:o},a.createElement(at,{className:rt.wordWrapButtonIcon,"aria-hidden":"true"}))}function lt(e){var t,n,r,o,l,i,c,s,d,p,f,v=e.children,h=e.className,g=void 0===h?"":h,b=e.metastring,E=e.title,y=e.showLineNumbers,k=e.language,N=(0,q.L)().prism,C=N.defaultLanguage,L=N.magicComments,T=null!=(t=null!=k?k:null==(n=g.split(" ").find((function(e){return e.startsWith("language-")})))?void 0:n.replace(/language-/,""))?t:C,Z=Te(),_=(r=(0,a.useState)(!1),o=r[0],l=r[1],i=(0,a.useState)(!1),c=i[0],s=i[1],d=(0,a.useRef)(null),p=(0,a.useCallback)((function(){var e=d.current.querySelector("code");o?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),l((function(e){return!e}))}),[d,o]),f=(0,a.useCallback)((function(){var e=d.current,t=e.scrollWidth>e.clientWidth||d.current.querySelector("code").hasAttribute("style");s(t)}),[d]),ze(d,f),(0,a.useEffect)((function(){f()}),[o,f]),(0,a.useEffect)((function(){return window.addEventListener("resize",f,{passive:!0}),function(){window.removeEventListener("resize",f)}}),[f]),{codeBlockRef:d,isEnabled:o,isCodeScrollable:c,toggle:p}),w=function(e){var t,n;return null!=(t=null==e||null==(n=e.match(xe))?void 0:n.groups.title)?t:""}(b)||E,x=je(v,{metastring:b,language:T,magicComments:L}),B=x.lineClassNames,O=x.code,H=null!=y?y:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(b);return a.createElement(Se,{as:"div",className:(0,u.Z)(g,T&&!g.includes("language-"+T)&&"language-"+T)},w&&a.createElement("div",{className:Me.codeBlockTitle},w),a.createElement("div",{className:Me.codeBlockContent},a.createElement(Je,(0,m.Z)({},De,{theme:Z,code:O,language:null!=T?T:"text"}),(function(e){var t=e.className,n=e.tokens,r=e.getLineProps,o=e.getTokenProps;return a.createElement("pre",{tabIndex:0,ref:_.codeBlockRef,className:(0,u.Z)(t,Me.codeBlock,"thin-scrollbar")},a.createElement("code",{className:(0,u.Z)(Me.codeBlockLines,H&&Me.codeBlockLinesWithNumbering)},n.map((function(e,t){return a.createElement(Xe,{key:t,line:e,getLineProps:r,getTokenProps:o,classNames:B[t],showLineNumbers:H})}))))})),a.createElement("div",{className:Me.buttonGroup},(_.isEnabled||_.isCodeScrollable)&&a.createElement(ot,{className:Me.codeButton,onClick:function(){return _.toggle()},isEnabled:_.isEnabled}),a.createElement(nt,{className:Me.codeButton,code:O}))))}var it=["children"];function ct(e){var t=e.children,n=(0,H.Z)(e,it),r=(0,Ce.Z)(),o=function(e){return a.Children.toArray(e).some((function(e){return(0,a.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?lt:Pe;return a.createElement(l,(0,m.Z)({key:String(r)},n),o)}const st={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var ut=["summary","children"];function dt(e){return!!e&&("SUMMARY"===e.tagName||dt(e.parentElement))}function mt(e,t){return!!e&&(e===t||mt(e.parentElement,t))}function pt(e){var t=e.summary,n=e.children,r=(0,H.Z)(e,ut),o=(0,Ce.Z)(),l=(0,a.useRef)(null),i=(0,F.u)({initialState:!r.open}),c=i.collapsed,s=i.setCollapsed,d=(0,a.useState)(r.open),p=d[0],f=d[1],v=a.isValidElement(t)?t:a.createElement("summary",null,null!=t?t:"Details");return a.createElement("details",(0,m.Z)({},r,{ref:l,open:p,"data-collapsed":c,className:(0,u.Z)(st.details,o&&st.isBrowser,r.className),onMouseDown:function(e){dt(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var t=e.target;dt(t)&&mt(t,l.current)&&(e.preventDefault(),c?(s(!1),f(!0)):s(!0))}}),v,a.createElement(F.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){s(e),f(!e)}},a.createElement("div",{className:st.collapsibleContent},n)))}const ft={details:"details_b_Ee"};var vt="alert alert--info";function ht(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return a.createElement(pt,(0,m.Z)({},t,{className:(0,u.Z)(vt,ft.details,t.className)}))}function gt(e){return a.createElement(Ee,e)}const bt={containsTaskList:"containsTaskList_mC6p"};const Et={img:"img_ev3q"};const yt="admonition_LlT9",kt="admonitionHeading_tbUL",Nt="admonitionIcon_kALy",Ct="admonitionContent_S0QG";var Lt={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(p.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(p.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(p.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(p.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(p.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},Tt={secondary:"note",important:"info",success:"tip",warning:"danger"};function Zt(e){var t,n=function(e){var t=a.Children.toArray(e),n=t.find((function(e){var t;return a.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return{mdxAdmonitionTitle:n,rest:r}}(e.children),r=n.mdxAdmonitionTitle,o=n.rest;return Object.assign({},e,{title:null!=(t=e.title)?t:r,children:o})}const _t={head:function(e){var t=a.Children.map(e.children,(function(e){return a.isValidElement(e)?function(e){var t;if(null!=(t=e.props)&&t.mdxType&&e.props.originalType){var n=e.props,r=(n.mdxType,n.originalType,(0,H.Z)(n,Ne));return a.createElement(e.props.originalType,r)}return e}(e):e}));return a.createElement(ke.Z,e,t)},code:function(e){var t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((function(e){var n;return"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(null==(n=e.props)?void 0:n.mdxType)}))?a.createElement("code",e):a.createElement(ct,e)},a:function(e){return a.createElement(f.Z,e)},pre:function(e){var t;return a.createElement(ct,(0,a.isValidElement)(e.children)&&"code"===(null==(t=e.children.props)?void 0:t.originalType)?e.children.props:Object.assign({},e))},details:function(e){var t=a.Children.toArray(e.children),n=t.find((function(e){var t;return a.isValidElement(e)&&"summary"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return a.createElement(ht,(0,m.Z)({},e,{summary:n}),r)},ul:function(e){return a.createElement("ul",(0,m.Z)({},e,{className:(t=e.className,(0,u.Z)(t,(null==t?void 0:t.includes("contains-task-list"))&&bt.containsTaskList))}));var t},img:function(e){return a.createElement("img",(0,m.Z)({loading:"lazy"},e,{className:(t=e.className,(0,u.Z)(t,Et.img))}));var t},h1:function(e){return a.createElement(gt,(0,m.Z)({as:"h1"},e))},h2:function(e){return a.createElement(gt,(0,m.Z)({as:"h2"},e))},h3:function(e){return a.createElement(gt,(0,m.Z)({as:"h3"},e))},h4:function(e){return a.createElement(gt,(0,m.Z)({as:"h4"},e))},h5:function(e){return a.createElement(gt,(0,m.Z)({as:"h5"},e))},h6:function(e){return a.createElement(gt,(0,m.Z)({as:"h6"},e))},admonition:function(e){var t=Zt(e),n=t.children,r=t.type,o=t.title,l=t.icon,i=function(e){var t,n=null!=(t=Tt[e])?t:e,a=Lt[n];return a||(console.warn('No admonition config found for admonition type "'+n+'". Using Info as fallback.'),Lt.info)}(r),c=null!=o?o:i.label,s=i.iconComponent,d=null!=l?l:a.createElement(s,null);return a.createElement("div",{className:(0,u.Z)(y.k.common.admonition,y.k.common.admonitionType(e.type),"alert","alert--"+i.infimaClassName,yt)},a.createElement("div",{className:kt},a.createElement("span",{className:Nt},d),c),a.createElement("div",{className:Ct},n))},mermaid:function(){return null}};function wt(e){var t=e.children;return a.createElement(ye.Zo,{components:_t},t)}function xt(e){var t,n,r,o,l=e.children,i=(t=c(),n=t.metadata,r=t.frontMatter,o=t.contentTitle,r.hide_title||void 0!==o?null:n.title);return a.createElement("div",{className:(0,u.Z)(y.k.docs.docMarkdown,"markdown")},i&&a.createElement("header",null,a.createElement(Ee,{as:"h1"},i)),a.createElement(wt,null,l))}var Bt=n(3438),Ot=n(8596),Ht=n(4996);function jt(e){return a.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const At={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function It(){var e=(0,Ht.Z)("/");return a.createElement("li",{className:"breadcrumbs__item"},a.createElement(f.Z,{"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},a.createElement(jt,{className:At.breadcrumbHomeIcon})))}const St={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Mt(e){var t=e.children,n=e.href,r="breadcrumbs__link";return e.isLast?a.createElement("span",{className:r,itemProp:"name"},t):n?a.createElement(f.Z,{className:r,href:n,itemProp:"item"},a.createElement("span",{itemProp:"name"},t)):a.createElement("span",{className:r},t)}function Pt(e){var t=e.children,n=e.active,r=e.index,o=e.addMicrodata;return a.createElement("li",(0,m.Z)({},o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,u.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,a.createElement("meta",{itemProp:"position",content:String(r+1)}))}function Ut(){var e=(0,Bt.s1)(),t=(0,Ot.Ns)();return e?a.createElement("nav",{className:(0,u.Z)(y.k.docs.docBreadcrumbs,St.breadcrumbsContainer),"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},a.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&a.createElement(It,null),e.map((function(t,n){var r=n===e.length-1;return a.createElement(Pt,{key:n,active:r,index:n,addMicrodata:!!t.href},a.createElement(Mt,{href:t.href,isLast:r},t.label))})))):null}const zt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Vt(e){var t,n,r,o,l,i,s=e.children,m=(t=c(),n=t.frontMatter,r=t.toc,o=(0,d.i)(),l=n.hide_table_of_contents,i=!l&&r.length>0,{hidden:l,mobile:i?a.createElement(ue,null):void 0,desktop:!i||"desktop"!==o&&"ssr"!==o?void 0:a.createElement(he,null)});return a.createElement("div",{className:"row"},a.createElement("div",{className:(0,u.Z)("col",!m.hidden&&zt.docItemCol)},a.createElement(_,null),a.createElement("div",{className:zt.docItemContainer},a.createElement("article",null,a.createElement(Ut,null),a.createElement(w,null),m.mobile,a.createElement(xt,null,s),a.createElement(W,null)),a.createElement(g,null))),m.desktop&&a.createElement("div",{className:"col col--3"},m.desktop))}function Dt(e){var t="docs-doc-id-"+e.content.metadata.unversionedId,n=e.content;return a.createElement(i,{content:e.content},a.createElement(r.FG,{className:t},a.createElement(s,null),a.createElement(Vt,null,a.createElement(n,null))))}},4477:(e,t,n)=>{"use strict";n.d(t,{E:()=>i,q:()=>l});var a=n(7294),r=n(9688),o=a.createContext(null);function l(e){var t=e.children,n=e.version;return a.createElement(o.Provider,{value:n},t)}function i(){var e=(0,a.useContext)(o);if(null===e)throw new r.i6("DocsVersionProvider");return e}},7594:(e,t)=>{function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,o]=t;if(a&&o){a=parseInt(a),o=parseInt(o);const e=a>>1;n(e[t],o)<0?r=t+1:s=t}while(rs(e(t),n),o=(t,n)=>e(t)-n):(t=e===s||e===a?e:l,n=e,o=e),{left:r,center:function(e,t,n=0,s=e.length){const a=r(e,t,n,s-1);return a>n&&o(e[a-1],t)>-o(e[a],t)?a-1:a},right:function(e,o,r=0,s=e.length){if(r>>1;n(e[t],o)<=0?r=t+1:s=t}while(rf});const c=i(s),u=c.right,p=(c.left,i(o).center,u);function d(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function f(){var e,t=[],n=[],o=[];function a(){var e=0,s=Math.max(1,n.length);for(o=new Array(s-1);++e0?o[r-1]:t[0],rdraggable: boolean",id:"draggable",level:4},{value:"latitude: number",id:"latitude",level:4},{value:"longitude: number",id:"longitude",level:4},{value:"offset: PointLike",id:"offset",level:4},{value:"pitchAlignment: 'map' | 'viewport' | 'auto'",id:"pitchalignment",level:4},{value:"popup: Popup | null",id:"popup",level:4},{value:"rotation: number",id:"rotation",level:4},{value:"rotationAlignment: 'map' | 'viewport' | 'auto'",id:"rotationalignment",level:4},{value:"style: CSSProperties",id:"style",level:4},{value:"Callbacks",id:"callbacks",level:3},{value:"onClick: (evt: MapEvent) => void",id:"onclick",level:4},{value:"onDragStart: (evt: MarkerDragEvent) => void",id:"ondragstart",level:4},{value:"onDrag: (evt: MarkerDragEvent) => void",id:"ondrag",level:4},{value:"onDragEnd: (evt: MarkerDragEvent) => void",id:"ondragend",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"Methods",id:"methods",level:2},{value:"Source",id:"source",level:2}],k={toc:d},f="wrapper";function g(e){var t=e.components,a=(0,n.Z)(e,p);return(0,l.kt)(f,(0,r.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"marker"},"Marker"),(0,l.kt)("p",null,"React component that wraps the base library's ",(0,l.kt)("inlineCode",{parentName:"p"},"Marker")," class (",(0,l.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker"},"Mapbox")," | ",(0,l.kt)("a",{parentName:"p",href:"https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker"},"Maplibre"),")."),(0,l.kt)(o.Z,{groupId:"map-library",mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"mapbox",label:"Mapbox",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import * as React from \'react\';\nimport Map, {Marker} from \'react-map-gl\';\n\nfunction App() {\n return ;\n}\n'))),(0,l.kt)(i.Z,{value:"maplibre",label:"Maplibre",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},'import * as React from \'react\';\nimport Map, {Marker} from \'react-map-gl/maplibre\';\n\nfunction App() {\n return ;\n}\n')))),(0,l.kt)("p",null,"If ",(0,l.kt)("inlineCode",{parentName:"p"},"Marker")," is mounted with child components, then its content will be rendered to the specified location. If it is mounted with no content, then a default marker will be used."),(0,l.kt)("h2",{id:"properties"},"Properties"),(0,l.kt)("h3",{id:"reactive-properties"},"Reactive Properties"),(0,l.kt)("h4",{id:"draggable"},(0,l.kt)("inlineCode",{parentName:"h4"},"draggable"),": boolean"),(0,l.kt)("p",null,"Default: ",(0,l.kt)("inlineCode",{parentName:"p"},"false")),(0,l.kt)("p",null,"If ",(0,l.kt)("inlineCode",{parentName:"p"},"true"),", the marker is able to be dragged to a new position on the map."),(0,l.kt)("h4",{id:"latitude"},(0,l.kt)("inlineCode",{parentName:"h4"},"latitude"),": number"),(0,l.kt)("p",null,"Required. The latitude of the anchor location."),(0,l.kt)("h4",{id:"longitude"},(0,l.kt)("inlineCode",{parentName:"h4"},"longitude"),": number"),(0,l.kt)("p",null,"Required. The longitude of the anchor location."),(0,l.kt)("h4",{id:"offset"},(0,l.kt)("inlineCode",{parentName:"h4"},"offset"),": ",(0,l.kt)("a",{parentName:"h4",href:"/react-map-gl/docs/api-reference/types#pointlike"},"PointLike")),(0,l.kt)("p",null,"Default: ",(0,l.kt)("inlineCode",{parentName:"p"},"null")),(0,l.kt)("p",null,"The offset in pixels as a ",(0,l.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/api/geography/#pointlike"},"PointLike")," object to apply relative to the element's center. Negatives indicate left and up."),(0,l.kt)("h4",{id:"pitchalignment"},(0,l.kt)("inlineCode",{parentName:"h4"},"pitchAlignment"),": 'map' | 'viewport' | 'auto'"),(0,l.kt)("p",null,"Default: ",(0,l.kt)("inlineCode",{parentName:"p"},"'auto'")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," aligns the ",(0,l.kt)("inlineCode",{parentName:"li"},"Marker")," to the plane of the map."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"viewport")," aligns the ",(0,l.kt)("inlineCode",{parentName:"li"},"Marker")," to the plane of the viewport."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"auto")," automatically matches the value of ",(0,l.kt)("inlineCode",{parentName:"li"},"rotationAlignment"),".")),(0,l.kt)("h4",{id:"popup"},(0,l.kt)("inlineCode",{parentName:"h4"},"popup"),": Popup | null"),(0,l.kt)("p",null,"An instance of the ",(0,l.kt)("inlineCode",{parentName:"p"},"Popup")," class (",(0,l.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#popup"},"Mapbox")," | ",(0,l.kt)("a",{parentName:"p",href:"https://maplibre.org/maplibre-gl-js-docs/api/markers/#popup"},"Maplibre"),") to attach to this marker. If undefined or null, any popup set on this Marker instance is unset."),(0,l.kt)("h4",{id:"rotation"},(0,l.kt)("inlineCode",{parentName:"h4"},"rotation"),": number"),(0,l.kt)("p",null,"Default: ",(0,l.kt)("inlineCode",{parentName:"p"},"0")),(0,l.kt)("p",null,"The rotation angle of the marker in degrees, relative to its ",(0,l.kt)("inlineCode",{parentName:"p"},"rotationAlignment")," setting. A positive value will rotate the marker clockwise."),(0,l.kt)("h4",{id:"rotationalignment"},(0,l.kt)("inlineCode",{parentName:"h4"},"rotationAlignment"),": 'map' | 'viewport' | 'auto'"),(0,l.kt)("p",null,"Default: ",(0,l.kt)("inlineCode",{parentName:"p"},"'auto'")),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"map")," aligns the ",(0,l.kt)("inlineCode",{parentName:"li"},"Marker"),"'s rotation relative to the map, maintaining a bearing as the map rotates."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"viewport")," aligns the ",(0,l.kt)("inlineCode",{parentName:"li"},"Marker"),"'s rotation relative to the viewport, agnostic to map rotations."),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"auto")," is equivalent to ",(0,l.kt)("inlineCode",{parentName:"li"},"viewport"),".")),(0,l.kt)("h4",{id:"style"},(0,l.kt)("inlineCode",{parentName:"h4"},"style"),": CSSProperties"),(0,l.kt)("p",null,"CSS style override that applies to the marker's container."),(0,l.kt)("h3",{id:"callbacks"},"Callbacks"),(0,l.kt)("h4",{id:"onclick"},(0,l.kt)("inlineCode",{parentName:"h4"},"onClick"),": (evt: ",(0,l.kt)("a",{parentName:"h4",href:"/react-map-gl/docs/api-reference/types#mapevent"},"MapEvent"),") => void"),(0,l.kt)("p",null,"Called when the marker is clicked on."),(0,l.kt)("h4",{id:"ondragstart"},(0,l.kt)("inlineCode",{parentName:"h4"},"onDragStart"),": (evt: ",(0,l.kt)("a",{parentName:"h4",href:"/react-map-gl/docs/api-reference/types#markerdragevent"},"MarkerDragEvent"),") => void"),(0,l.kt)("p",null,"Called when dragging starts, if ",(0,l.kt)("inlineCode",{parentName:"p"},"draggable")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,l.kt)("h4",{id:"ondrag"},(0,l.kt)("inlineCode",{parentName:"h4"},"onDrag"),": (evt: ",(0,l.kt)("a",{parentName:"h4",href:"/react-map-gl/docs/api-reference/types#markerdragevent"},"MarkerDragEvent"),") => void"),(0,l.kt)("p",null,"Called while dragging, if ",(0,l.kt)("inlineCode",{parentName:"p"},"draggable")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,l.kt)("h4",{id:"ondragend"},(0,l.kt)("inlineCode",{parentName:"h4"},"onDragEnd"),": (evt: ",(0,l.kt)("a",{parentName:"h4",href:"/react-map-gl/docs/api-reference/types#markerdragevent"},"MarkerDragEvent"),") => void"),(0,l.kt)("p",null,"Called when dragging ends, if ",(0,l.kt)("inlineCode",{parentName:"p"},"draggable")," is ",(0,l.kt)("inlineCode",{parentName:"p"},"true"),"."),(0,l.kt)("h3",{id:"other-properties"},"Other Properties"),(0,l.kt)("p",null,"The properties in this section are not reactive. They are only used when the component first mounts."),(0,l.kt)("p",null,"Any options supported by the ",(0,l.kt)("inlineCode",{parentName:"p"},"Marker")," class (",(0,l.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker"},"Mapbox")," | ",(0,l.kt)("a",{parentName:"p",href:"https://maplibre.org/maplibre-gl-js-docs/api/markers/#marker"},"Maplibre"),"), such as"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"anchor")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"color")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"scale")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("inlineCode",{parentName:"li"},"clickTolerance"))),(0,l.kt)("h2",{id:"methods"},"Methods"),(0,l.kt)("p",null,"The underlying native ",(0,l.kt)("inlineCode",{parentName:"p"},"Marker")," instance is accessible via a ",(0,l.kt)("a",{parentName:"p",href:"https://reactjs.org/docs/refs-and-the-dom.html#creating-refs"},"React ref")," hook.\nYou may use it to call any imperative methods:"),(0,l.kt)(o.Z,{groupId:"map-library",mdxType:"Tabs"},(0,l.kt)(i.Z,{value:"mapbox",label:"Mapbox",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-tsx"},"import * as React from 'react';\nimport {useRef, useMemo, useCallback} from 'react';\nimport Map, {Marker} from 'react-map-gl';\nimport mapboxgl from 'mapbox-gl';\n\nfunction App() {\n const markerRef = useRefstyle: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"containerId: string",id:"containerid",level:4},{value:"position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'",id:"position",level:4},{value:"Source",id:"source",level:2}];function p(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",p:"p",pre:"pre",...(0,l.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"fullscreencontrol",children:"FullscreenControl"})}),"\n",(0,n.jsxs)(r.p,{children:["React component that wraps mapbox-gl's ",(0,n.jsx)(r.a,{href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#fullscreencontrol",children:"FullscreenControl"})," class."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-tsx",children:"import * as React from 'react';\r\nimport Map, {FullscreenControl} from 'react-map-gl/mapbox';\r\nimport 'mapbox-gl/dist/mapbox-gl.css';\r\n\r\nfunction App() {\r\n return ;\r\n}\n"})}),"\n",(0,n.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,n.jsx)(r.h3,{id:"reactive-properties",children:"Reactive Properties"}),"\n",(0,n.jsxs)(r.h4,{id:"style",children:[(0,n.jsx)(r.code,{children:"style"}),": CSSProperties"]}),"\n",(0,n.jsx)(r.p,{children:"CSS style override that applies to the control's container."}),"\n",(0,n.jsx)(r.h3,{id:"other-properties",children:"Other Properties"}),"\n",(0,n.jsx)(r.p,{children:"The properties in this section are not reactive. They are only used when the component first mounts."}),"\n",(0,n.jsxs)(r.h4,{id:"containerid",children:[(0,n.jsx)(r.code,{children:"containerId"}),": string"]}),"\n",(0,n.jsx)(r.p,{children:"Id of the DOM element which should be made full screen. By default, the map container element will be made full screen."}),"\n",(0,n.jsxs)(r.h4,{id:"position",children:[(0,n.jsx)(r.code,{children:"position"}),": 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'"]}),"\n",(0,n.jsxs)(r.p,{children:["Default: ",(0,n.jsx)(r.code,{children:"'top-right'"})]}),"\n",(0,n.jsx)(r.p,{children:"Placement of the control relative to the map."}),"\n",(0,n.jsx)(r.h2,{id:"source",children:"Source"}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.a,{href:"https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/fullscreen-control.tsx",children:"fullscreen-control.ts"})})]})}function d(e={}){const{wrapper:r}={...(0,l.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},8453:(e,r,t)=>{t.d(r,{R:()=>s,x:()=>c});var o=t(6540);const n={},l=o.createContext(n);function s(e){const r=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(l.Provider,{value:r},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/339cc0f4.9d51fe55.js b/assets/js/339cc0f4.9d51fe55.js
deleted file mode 100644
index e13f8798..00000000
--- a/assets/js/339cc0f4.9d51fe55.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkreact_map_gl_website=self.webpackChunkreact_map_gl_website||[]).push([[2203],{1353:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"examples"}')}}]);
\ No newline at end of file
diff --git a/assets/js/352ab42e.df7e8b86.js b/assets/js/352ab42e.df7e8b86.js
deleted file mode 100644
index 5010c5d0..00000000
--- a/assets/js/352ab42e.df7e8b86.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkreact_map_gl_website=self.webpackChunkreact_map_gl_website||[]).push([[9984],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;tid: string",id:"id",level:4},{value:"type: string",id:"type",level:4},{value:"Options",id:"options",level:3},{value:"beforeId: string",id:"beforeid",level:4},{value:"source: string",id:"source",level:4},{value:"Source",id:"source",level:2}],f={toc:m},y="wrapper";function b(e){var t=e.components,r=(0,n.Z)(e,u);return(0,o.kt)(y,(0,a.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"layer"},"Layer"),(0,o.kt)("p",null,"This component allows apps to create a ",(0,o.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers"},"map layer")," using React."),(0,o.kt)(l.Z,{groupId:"map-library",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"mapbox",label:"Mapbox",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-tsx"},"import * as React from 'react';\nimport Map, {Layer} from 'react-map-gl';\nimport type {FillLayer} from 'react-map-gl';\n\nconst parkLayer: FillLayer = {\n id: 'landuse_park',\n type: 'fill',\n source: 'mapbox',\n 'source-layer': 'landuse',\n filter: ['==', 'class', 'park'],\n paint: {\n 'fill-color': '#4E3FC8'\n }\n};\n\nfunction App() {\n return ;\n}\n"))),(0,o.kt)(i.Z,{value:"maplibre",label:"Maplibre",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-tsx"},"import * as React from 'react';\nimport Map, {Layer} from 'react-map-gl/maplibre';\nimport type {FillLayer} from 'react-map-gl/maplibre';\n\nconst parkLayer: FillLayer = {\n id: 'landuse_park',\n type: 'fill',\n source: 'mapbox',\n 'source-layer': 'landuse',\n filter: ['==', 'class', 'park'],\n paint: {\n 'fill-color': '#4E3FC8'\n }\n};\n\nfunction App() {\n return ;\n}\n")))),(0,o.kt)("h2",{id:"properties"},"Properties"),(0,o.kt)("p",null,"The props provided to this component should be conforming to the ",(0,o.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers"},"Mapbox layer specification"),"."),(0,o.kt)("p",null,"When props change ",(0,o.kt)("em",{parentName:"p"},"shallowly"),", the component will perform style diffing to update the layer. Avoid defining constant objects/arrays inline may help performance."),(0,o.kt)("h3",{id:"identity-properties"},"Identity Properties"),(0,o.kt)("p",null,"Once a ",(0,o.kt)("inlineCode",{parentName:"p"},"style: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"containerId: string",id:"containerid",level:4},{value:"position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'",id:"position",level:4},{value:"Source",id:"source",level:2}];function p(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",p:"p",pre:"pre",...(0,l.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"fullscreencontrol",children:"FullscreenControl"})}),"\n",(0,o.jsxs)(r.p,{children:["React component that wraps maplibre-gl's ",(0,o.jsx)(r.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/classes/FullscreenControl/",children:"FullscreenControl"})," class."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-tsx",children:"import * as React from 'react';\r\nimport {Map, FullscreenControl} from 'react-map-gl/maplibre';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\n\r\nfunction App() {\r\n return ;\r\n}\n"})}),"\n",(0,o.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,o.jsx)(r.h3,{id:"reactive-properties",children:"Reactive Properties"}),"\n",(0,o.jsxs)(r.h4,{id:"style",children:[(0,o.jsx)(r.code,{children:"style"}),": CSSProperties"]}),"\n",(0,o.jsx)(r.p,{children:"CSS style override that applies to the control's container."}),"\n",(0,o.jsx)(r.h3,{id:"other-properties",children:"Other Properties"}),"\n",(0,o.jsx)(r.p,{children:"The properties in this section are not reactive. They are only used when the component first mounts."}),"\n",(0,o.jsxs)(r.h4,{id:"containerid",children:[(0,o.jsx)(r.code,{children:"containerId"}),": string"]}),"\n",(0,o.jsx)(r.p,{children:"Id of the DOM element which should be made full screen. By default, the map container element will be made full screen."}),"\n",(0,o.jsxs)(r.h4,{id:"position",children:[(0,o.jsx)(r.code,{children:"position"}),": 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'"]}),"\n",(0,o.jsxs)(r.p,{children:["Default: ",(0,o.jsx)(r.code,{children:"'top-right'"})]}),"\n",(0,o.jsx)(r.p,{children:"Placement of the control relative to the map."}),"\n",(0,o.jsx)(r.h2,{id:"source",children:"Source"}),"\n",(0,o.jsx)(r.p,{children:(0,o.jsx)(r.a,{href:"https://github.com/visgl/react-map-gl/tree/master/modules/maplibre/src/components/fullscreen-control.ts",children:"fullscreen-control.ts"})})]})}function d(e={}){const{wrapper:r}={...(0,l.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,r,t)=>{t.d(r,{R:()=>i,x:()=>s});var n=t(6540);const o={},l=n.createContext(o);function i(e){const r=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function s(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(l.Provider,{value:r},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/38b80d8b.ada5e399.js b/assets/js/38b80d8b.ada5e399.js
new file mode 100644
index 00000000..5c2be3d9
--- /dev/null
+++ b/assets/js/38b80d8b.ada5e399.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[2834],{6364:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>p,contentTitle:()=>c,default:()=>l,frontMatter:()=>s,metadata:()=>t,toc:()=>i});const t=JSON.parse('{"id":"api-reference/mapbox/use-map","title":"useMap","description":"The useMap hook allows a component to reference the Map that contains it.","source":"@site/../docs/api-reference/mapbox/use-map.md","sourceDirName":"api-reference/mapbox","slug":"/api-reference/mapbox/use-map","permalink":"/react-map-gl/docs/api-reference/mapbox/use-map","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/mapbox/use-map.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"useControl","permalink":"/react-map-gl/docs/api-reference/mapbox/use-control"},"next":{"title":"Types","permalink":"/react-map-gl/docs/api-reference/mapbox/types"}}');var a=r(4848),o=r(8453);const s={},c="useMap",p={},i=[{value:"Signature",id:"signature",level:2},{value:"Source",id:"source",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"usemap",children:"useMap"})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"useMap"})," hook allows a component to reference the ",(0,a.jsx)(n.a,{href:"/react-map-gl/docs/api-reference/mapbox/map",children:"Map"})," that contains it."]}),"\n",(0,a.jsxs)(n.p,{children:["When used with ",(0,a.jsx)(n.a,{href:"/react-map-gl/docs/api-reference/mapbox/map-provider",children:"MapProvider"}),", this hook can also reference maps that are rendered outside of the current map component's direct render tree."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-tsx",children:"import {Map, useMap} from 'react-map-gl/mapbox';\n\nfunction Root() {\n return (\n \n );\n}\n\nfunction NavigateButton() {\n const {current: map} = useMap();\n\n const onClick = () => {\n map.flyTo({center: [-122.4, 37.8]});\n };\n\n return ;\n}\n"})}),"\n",(0,a.jsxs)(n.p,{children:["When used with the ",(0,a.jsx)(n.a,{href:"/react-map-gl/docs/api-reference/mapbox/map-provider",children:"MapProvider"}),", this hook can also reference maps that are rendered outside of the current component's direct render tree as long as both trees are part of the current ",(0,a.jsx)(n.code,{children:"style: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'",id:"position",level:4},{value:"Source",id:"source",level:2}];function p(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"navigationcontrol",children:"NavigationControl"})}),"\n",(0,n.jsxs)(t.p,{children:["React component that wraps mapbox-gl's ",(0,n.jsx)(t.a,{href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#navigationcontrol",children:"NavigationControl"})," class."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-tsx",children:"import * as React from 'react';\r\nimport Map, {NavigationControl} from 'react-map-gl/mapbox';\r\nimport 'mapbox-gl/dist/mapbox-gl.css';\r\n\r\nfunction App() {\r\n return ;\r\n}\n"})}),"\n",(0,n.jsx)(t.h2,{id:"properties",children:"Properties"}),"\n",(0,n.jsx)(t.h3,{id:"reactive-properties",children:"Reactive Properties"}),"\n",(0,n.jsxs)(t.h4,{id:"style",children:[(0,n.jsx)(t.code,{children:"style"}),": CSSProperties"]}),"\n",(0,n.jsx)(t.p,{children:"CSS style override that applies to the control's container."}),"\n",(0,n.jsx)(t.h3,{id:"other-properties",children:"Other Properties"}),"\n",(0,n.jsx)(t.p,{children:"The properties in this section are not reactive. They are only used when the component first mounts."}),"\n",(0,n.jsxs)(t.p,{children:["Any options supported by the ",(0,n.jsx)(t.code,{children:"NavigationControl"})," class (",(0,n.jsx)(t.a,{href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#navigationcontrol",children:"Mapbox"})," | ",(0,n.jsx)(t.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/NavigationControlOptions/",children:"Maplibre"}),"), such as"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.code,{children:"showCompass"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.code,{children:"showZoom"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.code,{children:"visualizePitch"})}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Plus the following:"}),"\n",(0,n.jsxs)(t.h4,{id:"position",children:[(0,n.jsx)(t.code,{children:"position"}),": 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'"]}),"\n",(0,n.jsxs)(t.p,{children:["Default: ",(0,n.jsx)(t.code,{children:"'top-right'"})]}),"\n",(0,n.jsx)(t.p,{children:"Placement of the control relative to the map."}),"\n",(0,n.jsx)(t.h2,{id:"source",children:"Source"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/navigation-control.ts",children:"navigation-control.ts"})})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>s});var r=o(6540);const n={},i=r.createContext(n);function a(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/3ef54029.95b2589c.js b/assets/js/3ef54029.95b2589c.js
new file mode 100644
index 00000000..cabe3b85
--- /dev/null
+++ b/assets/js/3ef54029.95b2589c.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[7095],{2077:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var o=n(6540),i=n(6065),l=n(6025);const a=i.Ay.div.withConfig({displayName:"doc-item-component__DemoContainer",componentId:"sc-187t2dd-0"})(["position:absolute;overflow:hidden !important;left:0;right:0;top:0;bottom:0;> h1,> header{display:none;}"]);function c(e){let{content:t,route:n}=e;const i=t,c=(0,l.Ay)("/examples");return n.path===c?o.createElement("div",{key:"index"},o.createElement(i,null)):o.createElement(a,{key:"demo"},o.createElement(i,null))}}}]);
\ No newline at end of file
diff --git a/assets/js/3fde0636.49ae1182.js b/assets/js/3fde0636.49ae1182.js
deleted file mode 100644
index 09714b73..00000000
--- a/assets/js/3fde0636.49ae1182.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkreact_map_gl_website=self.webpackChunkreact_map_gl_website||[]).push([[1568],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;tstyle: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'",id:"position",level:4},{value:"Source",id:"source",level:2}],f={toc:b},d="wrapper";function v(e){var t=e.components,r=(0,a.Z)(e,u);return(0,o.kt)(d,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"attributioncontrol"},"AttributionControl"),(0,o.kt)("p",null,"React component that wraps the base library's ",(0,o.kt)("inlineCode",{parentName:"p"},"AttributionControl")," class (",(0,o.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#attributioncontrol"},"Mapbox")," | ",(0,o.kt)("a",{parentName:"p",href:"https://maplibre.org/maplibre-gl-js-docs/api/markers/#attributioncontrol"},"Maplibre"),")."),(0,o.kt)(l.Z,{groupId:"map-library",mdxType:"Tabs"},(0,o.kt)(i.Z,{value:"mapbox",label:"Mapbox",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-tsx"},'import * as React from \'react\';\nimport Map, {AttributionControl} from \'react-map-gl\';\n\nfunction App() {\n return ;\n}\n'))),(0,o.kt)(i.Z,{value:"maplibre",label:"Maplibre",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-tsx"},"import * as React from 'react';\nimport Map, {AttributionControl} from 'react-map-gl/maplibre';\n\nfunction App() {\n return ;\n}\n")))),(0,o.kt)("h2",{id:"properties"},"Properties"),(0,o.kt)("h3",{id:"reactive-properties"},"Reactive Properties"),(0,o.kt)("h4",{id:"style"},(0,o.kt)("inlineCode",{parentName:"h4"},"style"),": CSSProperties"),(0,o.kt)("p",null,"CSS style override that applies to the control's container."),(0,o.kt)("h3",{id:"other-properties"},"Other Properties"),(0,o.kt)("p",null,"The properties in this section are not reactive. They are only used when the component first mounts."),(0,o.kt)("p",null,"Any options supported by the ",(0,o.kt)("inlineCode",{parentName:"p"},"AttributionControl")," class (",(0,o.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/api/markers/#attributioncontrol"},"Mapbox")," | ",(0,o.kt)("a",{parentName:"p",href:"https://maplibre.org/maplibre-gl-js-docs/api/markers/#attributioncontrol"},"Maplibre"),"), such as"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"compact")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"customAttribution"))),(0,o.kt)("p",null,"Plus the following:"),(0,o.kt)("h4",{id:"position"},(0,o.kt)("inlineCode",{parentName:"h4"},"position"),": 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'"),(0,o.kt)("p",null,"Default: ",(0,o.kt)("inlineCode",{parentName:"p"},"'bottom-right'")),(0,o.kt)("p",null,"Placement of the control relative to the map."),(0,o.kt)("h2",{id:"source"},"Source"),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/attribution-control.ts"},"attribution-control.ts")))}v.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/410ad0ce.c4cf4495.js b/assets/js/410ad0ce.c4cf4495.js
new file mode 100644
index 00000000..fa5b0732
--- /dev/null
+++ b/assets/js/410ad0ce.c4cf4495.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[3183],{9290:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>f,default:()=>v,frontMatter:()=>m,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"mapbox/terrain","title":"Terrain","description":"","source":"@site/src/examples/mapbox/terrain.mdx","sourceDirName":"mapbox","slug":"/mapbox/terrain","permalink":"/react-map-gl/examples/mapbox/terrain","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Side by Side","permalink":"/react-map-gl/examples/mapbox/side-by-side"},"next":{"title":"Camera Transition","permalink":"/react-map-gl/examples/mapbox/viewport-animation"}}');var r=n(4848),s=n(8453),a=n(6540),i=(n(5338),n(2198));function c(){return(0,r.jsxs)("div",{className:"control-panel",children:[(0,r.jsx)("h3",{children:"3D Terrain"}),(0,r.jsx)("p",{children:"Add 3D terrain and sky to a map."}),(0,r.jsx)("div",{className:"source-link",children:(0,r.jsx)("a",{href:"https://github.com/visgl/react-map-gl/tree/7.0-release/examples/terrain",target:"_new",children:"View Code \u2197"})})]})}const l=a.memo(c),u="",p={id:"sky",type:"sky",paint:{"sky-type":"atmosphere","sky-atmosphere-sun":[0,0],"sky-atmosphere-sun-intensity":15}};function d(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.Ay,{initialViewState:{latitude:32.6141,longitude:-114.34411,zoom:14,bearing:80,pitch:80},maxPitch:85,mapStyle:"mapbox://styles/mapbox/satellite-v9",mapboxAccessToken:u,terrain:{source:"mapbox-dem",exaggeration:1.5},children:[(0,r.jsx)(i.kL,{id:"mapbox-dem",type:"raster-dem",url:"mapbox://mapbox.mapbox-terrain-dem-v1",tileSize:512,maxzoom:14}),(0,r.jsx)(i.Wd,Object.assign({},p))]}),(0,r.jsx)(l,{})]})}const m={},f="Terrain",h={},g=[];function y(e){const t={h1:"h1",header:"header",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"terrain",children:"Terrain"})}),"\n","\n",(0,r.jsx)(d,{})]})}function v(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(y,{...e})}):y(e)}},2198:(e,t,n)=>{n.d(t,{T3:()=>A,tG:()=>F,Wd:()=>V,T5:()=>w,pH:()=>T,ov:()=>D,zD:()=>k,g0:()=>Z,kL:()=>H,Ay:()=>w,VI:()=>z});var o=n(6540),r=n(4848);const s=o.createContext(null);function a(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;nstyle: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'",id:"position",level:4},{value:"Source",id:"source",level:2}];function p(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"navigationcontrol",children:"NavigationControl"})}),"\n",(0,o.jsxs)(t.p,{children:["React component that wraps maplibre-gl's ",(0,o.jsx)(t.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/classes/NavigationControl/",children:"NavigationControl"})," class."]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-tsx",children:"import * as React from 'react';\r\nimport {Map, NavigationControl} from 'react-map-gl/maplibre';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\n\r\nfunction App() {\r\n return ;\r\n}\n"})}),"\n",(0,o.jsx)(t.h2,{id:"properties",children:"Properties"}),"\n",(0,o.jsx)(t.h3,{id:"reactive-properties",children:"Reactive Properties"}),"\n",(0,o.jsxs)(t.h4,{id:"style",children:[(0,o.jsx)(t.code,{children:"style"}),": CSSProperties"]}),"\n",(0,o.jsx)(t.p,{children:"CSS style override that applies to the control's container."}),"\n",(0,o.jsx)(t.h3,{id:"other-properties",children:"Other Properties"}),"\n",(0,o.jsx)(t.p,{children:"The properties in this section are not reactive. They are only used when the component first mounts."}),"\n",(0,o.jsxs)(t.p,{children:["Any ",(0,o.jsx)(t.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/NavigationControlOptions/",children:"options"})," supported by the ",(0,o.jsx)(t.code,{children:"NavigationControl"})," class, such as"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.code,{children:"showCompass"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.code,{children:"showZoom"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.code,{children:"visualizePitch"})}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"Plus the following:"}),"\n",(0,o.jsxs)(t.h4,{id:"position",children:[(0,o.jsx)(t.code,{children:"position"}),": 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'"]}),"\n",(0,o.jsxs)(t.p,{children:["Default: ",(0,o.jsx)(t.code,{children:"'top-right'"})]}),"\n",(0,o.jsx)(t.p,{children:"Placement of the control relative to the map."}),"\n",(0,o.jsx)(t.h2,{id:"source",children:"Source"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://github.com/visgl/react-map-gl/tree/master/modules/maplibre/src/components/navigation-control.ts",children:"navigation-control.ts"})})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>a});var n=r(6540);const o={},i=n.createContext(o);function s(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/4650.9aa48463.js b/assets/js/4650.9aa48463.js
new file mode 100644
index 00000000..ef9aac5f
--- /dev/null
+++ b/assets/js/4650.9aa48463.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[4650],{9568:(t,r,e)=>{e.d(r,{ss:()=>_n});var n="delete",i=32,o=31,u={};function s(t){t&&(t.value=!0)}function a(){}function c(t){return void 0===t.size&&(t.size=t.__iterate(h)),t.size}function f(t,r){if("number"!=typeof r){var e=r>>>0;if(""+e!==r||4294967295===e)return NaN;r=e}return r<0?c(t)+r:r}function h(){return!0}function p(t,r,e){return(0===t&&!y(t)||void 0!==e&&t<=-e)&&(void 0===r||void 0!==e&&r>=e)}function _(t,r){return v(t,r,0)}function l(t,r){return v(t,r,r)}function v(t,r,e){return void 0===t?e:y(t)?r===1/0?r:0|Math.max(0,r+t):void 0===r||r===t?t:0|Math.min(r,t)}function y(t){return t<0||0===t&&1/t==-1/0}var d="@@__IMMUTABLE_ITERABLE__@@";function w(t){return Boolean(t&&t[d])}var g="@@__IMMUTABLE_KEYED__@@";function m(t){return Boolean(t&&t[g])}var z="@@__IMMUTABLE_INDEXED__@@";function S(t){return Boolean(t&&t[z])}function b(t){return m(t)||S(t)}var I=function(t){return w(t)?t:Y(t)},O=function(t){function r(t){return m(t)?t:Q(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(I),E=function(t){function r(t){return S(t)?t:X(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(I),j=function(t){function r(t){return w(t)&&!b(t)?t:F(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(I);I.Keyed=O,I.Indexed=E,I.Set=j;var q="@@__IMMUTABLE_SEQ__@@";function M(t){return Boolean(t&&t[q])}var D="@@__IMMUTABLE_RECORD__@@";function A(t){return Boolean(t&&t[D])}function k(t){return w(t)||A(t)}var x="@@__IMMUTABLE_ORDERED__@@";function R(t){return Boolean(t&&t[x])}var U="function"==typeof Symbol&&Symbol.iterator,B="@@iterator",K=U||B,C=function(t){this.next=t};function T(t,r,e,n){var i=0===t?r:1===t?e:[r,e];return n?n.value=i:n={value:i,done:!1},n}function L(){return{value:void 0,done:!0}}function P(t){return!!Array.isArray(t)||!!H(t)}function W(t){return t&&"function"==typeof t.next}function N(t){var r=H(t);return r&&r.call(t)}function H(t){var r=t&&(U&&t[U]||t[B]);if("function"==typeof r)return r}C.prototype.toString=function(){return"[Iterator]"},C.KEYS=0,C.VALUES=1,C.ENTRIES=2,C.prototype.inspect=C.prototype.toSource=function(){return this.toString()},C.prototype[K]=function(){return this};var J=Object.prototype.hasOwnProperty;function V(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var Y=function(t){function r(t){return null==t?rt():k(t)?t.toSeq():function(t){var r=it(t);if(r)return(n=H(e=t))&&n===e.entries?r.fromEntrySeq():function(t){var r=H(t);return r&&r===t.keys}(t)?r.toSetSeq():r;var e,n;if("object"==typeof t)return new Z(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toSeq=function(){return this},r.prototype.toString=function(){return this.__toString("Seq {","}")},r.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},r.prototype.__iterate=function(t,r){var e=this._cache;if(e){for(var n=e.length,i=0;i!==n;){var o=e[r?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,r)},r.prototype.__iterator=function(t,r){var e=this._cache;if(e){var n=e.length,i=0;return new C((function(){if(i===n)return{value:void 0,done:!0};var o=e[r?n-++i:i++];return T(t,o[0],o[1])}))}return this.__iteratorUncached(t,r)},r}(I),Q=function(t){function r(t){return null==t?rt().toKeyedSeq():w(t)?m(t)?t.toSeq():t.fromEntrySeq():A(t)?t.toSeq():et(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toKeyedSeq=function(){return this},r}(Y),X=function(t){function r(t){return null==t?rt():w(t)?m(t)?t.entrySeq():t.toIndexedSeq():A(t)?t.toSeq().entrySeq():nt(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return r(arguments)},r.prototype.toIndexedSeq=function(){return this},r.prototype.toString=function(){return this.__toString("Seq [","]")},r}(Y),F=function(t){function r(t){return(w(t)&&!b(t)?t:X(t)).toSetSeq()}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return r(arguments)},r.prototype.toSetSeq=function(){return this},r}(Y);Y.isSeq=M,Y.Keyed=Q,Y.Set=F,Y.Indexed=X,Y.prototype[q]=!0;var G=function(t){function r(t){this._array=t,this.size=t.length}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return this.has(t)?this._array[f(this,t)]:r},r.prototype.__iterate=function(t,r){for(var e=this._array,n=e.length,i=0;i!==n;){var o=r?n-++i:i++;if(!1===t(e[o],o,this))break}return i},r.prototype.__iterator=function(t,r){var e=this._array,n=e.length,i=0;return new C((function(){if(i===n)return{value:void 0,done:!0};var o=r?n-++i:i++;return T(t,o,e[o])}))},r}(X),Z=function(t){function r(t){var r=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=r,this.size=r.length}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return void 0===r||this.has(t)?this._object[t]:r},r.prototype.has=function(t){return J.call(this._object,t)},r.prototype.__iterate=function(t,r){for(var e=this._object,n=this._keys,i=n.length,o=0;o!==i;){var u=n[r?i-++o:o++];if(!1===t(e[u],u,this))break}return o},r.prototype.__iterator=function(t,r){var e=this._object,n=this._keys,i=n.length,o=0;return new C((function(){if(o===i)return{value:void 0,done:!0};var u=n[r?i-++o:o++];return T(t,u,e[u])}))},r}(Q);Z.prototype[x]=!0;var $,tt=function(t){function r(t){this._collection=t,this.size=t.length||t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.__iterateUncached=function(t,r){if(r)return this.cacheResult().__iterate(t,r);var e=N(this._collection),n=0;if(W(e))for(var i;!(i=e.next()).done&&!1!==t(i.value,n++,this););return n},r.prototype.__iteratorUncached=function(t,r){if(r)return this.cacheResult().__iterator(t,r);var e=N(this._collection);if(!W(e))return new C(L);var n=0;return new C((function(){var r=e.next();return r.done?r:T(t,n++,r.value)}))},r}(X);function rt(){return $||($=new G([]))}function et(t){var r=it(t);if(r)return r.fromEntrySeq();if("object"==typeof t)return new Z(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function nt(t){var r=it(t);if(r)return r;throw new TypeError("Expected Array or collection object of values: "+t)}function it(t){return V(t)?new G(t):P(t)?new tt(t):void 0}var ot="@@__IMMUTABLE_MAP__@@";function ut(t){return Boolean(t&&t[ot])}function st(t){return ut(t)&&R(t)}function at(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function ct(t,r){if(t===r||t!=t&&r!=r)return!0;if(!t||!r)return!1;if("function"==typeof t.valueOf&&"function"==typeof r.valueOf){if((t=t.valueOf())===(r=r.valueOf())||t!=t&&r!=r)return!0;if(!t||!r)return!1}return!!(at(t)&&at(r)&&t.equals(r))}var ft="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,r){var e=65535&(t|=0),n=65535&(r|=0);return e*n+((t>>>16)*n+e*(r>>>16)<<16>>>0)|0};function ht(t){return t>>>1&1073741824|3221225471&t}var pt=Object.prototype.valueOf;function _t(t){if(null==t)return lt(t);if("function"==typeof t.hashCode)return ht(t.hashCode(t));var r,e=(r=t).valueOf!==pt&&"function"==typeof r.valueOf?r.valueOf(r):r;if(null==e)return lt(e);switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var r=0|t;r!==t&&(r^=4294967295*t);for(;t>4294967295;)r^=t/=4294967295;return ht(r)}(e);case"string":return e.length>It?function(t){var r=jt[t];void 0===r&&(r=vt(t),Et===Ot&&(Et=0,jt={}),Et++,jt[t]=r);return r}(e):vt(e);case"object":case"function":return function(t){var r;if(mt&&void 0!==(r=gt.get(t)))return r;if(r=t[bt],void 0!==r)return r;if(!dt){if(void 0!==(r=t.propertyIsEnumerable&&t.propertyIsEnumerable[bt]))return r;if(void 0!==(r=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return r}if(r=wt(),mt)gt.set(t,r);else{if(void 0!==yt&&!1===yt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(dt)Object.defineProperty(t,bt,{enumerable:!1,configurable:!1,writable:!1,value:r});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[bt]=r;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[bt]=r}}return r}(e);case"symbol":return function(t){var r=zt[t];if(void 0!==r)return r;return r=wt(),zt[t]=r,r}(e);default:if("function"==typeof e.toString)return vt(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function lt(t){return null===t?1108378658:1108378659}function vt(t){for(var r=0,e=0;eid: string",id:"id",level:4},{value:"type: string",id:"type",level:4},{value:"Source",id:"source-1",level:2}];function l(e){const r={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h4:"h4",header:"header",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"source",children:"Source"})}),"\n",(0,n.jsxs)(r.p,{children:["This component allows apps to create a ",(0,n.jsx)(r.a,{href:"https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources",children:"map source"})," using React. It may contain ",(0,n.jsx)(r.a,{href:"/react-map-gl/docs/api-reference/mapbox/layer",children:"Layer"})," components as children."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-tsx",children:"import * as React from 'react';\r\nimport Map, {Source, Layer} from 'react-map-gl/mapbox';\r\nimport type {CircleLayer} from 'react-map-gl/mapbox';\r\nimport type {FeatureCollection} from 'geojson';\r\nimport 'mapbox-gl/dist/mapbox-gl.css';\r\n\r\nconst geojson: FeatureCollection = {\r\n type: 'FeatureCollection',\r\n features: [\r\n {type: 'Feature', geometry: {type: 'Point', coordinates: [-122.4, 37.8]}}\r\n ]\r\n};\r\n\r\nconst layerStyle: CircleLayer = {\r\n id: 'point',\r\n type: 'circle',\r\n paint: {\r\n 'circle-radius': 10,\r\n 'circle-color': '#007cbf'\r\n }\r\n};\r\n\r\nfunction App() {\r\n return ;\r\n}\n"})}),"\n",(0,n.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,n.jsxs)(r.p,{children:["The props provided to this component should be conforming to the ",(0,n.jsx)(r.a,{href:"https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources",children:"Mapbox source specification"})," or ",(0,n.jsx)(r.a,{href:"https://docs.mapbox.com/mapbox-gl-js/api/#canvassourceoptions",children:"CanvasSourceOptions"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["When props change ",(0,n.jsx)(r.em,{children:"shallowly"}),", the component will attempt to update the source. Do not define objects/arrays inline to avoid perf hit."]}),"\n",(0,n.jsxs)(r.p,{children:["Once a ",(0,n.jsx)(r.code,{children:"style: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'",id:"position",level:4},{value:"Source",id:"source",level:2}];function p(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"terraincontrol",children:"TerrainControl"})}),"\n",(0,o.jsxs)(r.p,{children:["React component that wraps maplibre-gl's ",(0,o.jsx)(r.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/classes/TerrainControl/",children:"TerrainControl"})," class."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-tsx",children:"import * as React from 'react';\r\nimport {Map, MapStyle, TerrainControl} from 'react-map-gl/maplibre';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\n\r\n// https://maplibre.org/maplibre-gl-js/docs/examples/3d-terrain/\r\nconst MAP_STYLE: MapStyle = {\r\n version: 8,\r\n sources: {\r\n osm: {\r\n type: 'raster',\r\n tiles: ['https://a.tile.openstreetmap.org/{z}/{x}/{y}.png'],\r\n tileSize: 256,\r\n attribution: '© OpenStreetMap Contributors',\r\n maxzoom: 19\r\n },\r\n terrainSource: {\r\n type: 'raster-dem',\r\n url: 'https://demotiles.maplibre.org/terrain-tiles/tiles.json',\r\n tileSize: 256\r\n }\r\n },\r\n layers: [\r\n {\r\n id: 'osm',\r\n type: 'raster',\r\n source: 'osm'\r\n }\r\n ],\r\n terrain: {\r\n source: 'terrainSource',\r\n exaggeration: 1\r\n },\r\n sky: {}\r\n};\r\n\r\nfunction App() {\r\n return ;\r\n}\n"})}),"\n",(0,o.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,o.jsx)(r.h3,{id:"reactive-properties",children:"Reactive Properties"}),"\n",(0,o.jsxs)(r.h4,{id:"style",children:[(0,o.jsx)(r.code,{children:"style"}),": CSSProperties"]}),"\n",(0,o.jsx)(r.p,{children:"CSS style override that applies to the control's container."}),"\n",(0,o.jsx)(r.h3,{id:"other-properties",children:"Other Properties"}),"\n",(0,o.jsx)(r.p,{children:"The properties in this section are not reactive. They are only used when the component first mounts."}),"\n",(0,o.jsxs)(r.p,{children:["Any ",(0,o.jsx)(r.a,{href:"https://maplibre.org/maplibre-style-spec/terrain/",children:"options"})," supported by the ",(0,o.jsx)(r.code,{children:"TerrainControl"})," class, such as"]}),"\n",(0,o.jsxs)(r.ul,{children:["\n",(0,o.jsx)(r.li,{children:(0,o.jsx)(r.code,{children:"source"})}),"\n",(0,o.jsx)(r.li,{children:(0,o.jsx)(r.code,{children:"exageration"})}),"\n"]}),"\n",(0,o.jsx)(r.p,{children:"Plus the following:"}),"\n",(0,o.jsxs)(r.h4,{id:"position",children:[(0,o.jsx)(r.code,{children:"position"}),": 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'"]}),"\n",(0,o.jsxs)(r.p,{children:["Default: ",(0,o.jsx)(r.code,{children:"'top-right'"})]}),"\n",(0,o.jsx)(r.p,{children:"Placement of the control relative to the map."}),"\n",(0,o.jsx)(r.h2,{id:"source",children:"Source"}),"\n",(0,o.jsx)(r.p,{children:(0,o.jsx)(r.a,{href:"https://github.com/visgl/react-map-gl/tree/master/modules/maplibre/src/components/terrain-control.ts",children:"terrain-control.ts"})})]})}function d(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,r,t)=>{t.d(r,{R:()=>s,x:()=>l});var n=t(6540);const o={},i=n.createContext(o);function s(e){const r=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/4e9d5dfa.7fc1b790.js b/assets/js/4e9d5dfa.7fc1b790.js
new file mode 100644
index 00000000..a2d31378
--- /dev/null
+++ b/assets/js/4e9d5dfa.7fc1b790.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[6641],{6403:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>p,default:()=>d,frontMatter:()=>s,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"api-reference/maplibre/popup","title":"Popup","description":"React component that wraps maplibre-gl\'s Popup class.","source":"@site/../docs/api-reference/maplibre/popup.md","sourceDirName":"api-reference/maplibre","slug":"/api-reference/maplibre/popup","permalink":"/react-map-gl/docs/api-reference/maplibre/popup","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/maplibre/popup.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"NavigationControl","permalink":"/react-map-gl/docs/api-reference/maplibre/navigation-control"},"next":{"title":"ScaleControl","permalink":"/react-map-gl/docs/api-reference/maplibre/scale-control"}}');var o=n(4848),i=n(8453);const s={},p="Popup",l={},c=[{value:"Properties",id:"properties",level:2},{value:"Reactive Properties",id:"reactive-properties",level:3},{value:"anchor: 'center' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | undefined",id:"anchor",level:4},{value:"className: string",id:"classname",level:4},{value:"offset: number | PointLike | Record<string, PointLike>",id:"offset",level:4},{value:"maxWidth: string",id:"maxwidth",level:4},{value:"style: CSSProperties",id:"style",level:4},{value:"Callbacks",id:"callbacks",level:3},{value:"onOpen: (evt: PopupEvent) => void",id:"onopen",level:4},{value:"onClose: (evt: PopupEvent) => void",id:"onclose",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"Methods",id:"methods",level:2},{value:"Source",id:"source",level:2}];function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"popup",children:"Popup"})}),"\n",(0,o.jsxs)(r.p,{children:["React component that wraps maplibre-gl's ",(0,o.jsx)(r.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/classes/Popup/",children:"Popup"})," class."]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-tsx",children:"import * as React from 'react';\r\nimport {useState} from 'react';\r\nimport {Map, Popup} from 'react-map-gl/maplibre';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\n\r\nfunction App() {\r\n const [showPopup, setShowPopup] = useState\n {items.map(renderRow)}\n
\n \n {items.map(renderRow)}\n
\n id: string",id:"id",level:4},{value:"type: string",id:"type",level:4},{value:"Source",id:"source-1",level:2}],f={toc:d},y="wrapper";function b(e){var t=e.components,r=(0,a.Z)(e,i);return(0,o.kt)(y,(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"source"},"Source"),(0,o.kt)("p",null,"This component allows apps to create a ",(0,o.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources"},"map source")," using React. It may contain ",(0,o.kt)("a",{parentName:"p",href:"/react-map-gl/docs/api-reference/layer"},"Layer")," components as children."),(0,o.kt)(l.Z,{groupId:"map-library",mdxType:"Tabs"},(0,o.kt)(u.Z,{value:"mapbox",label:"Mapbox",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-tsx"},"import * as React from 'react';\nimport Map, {Source, Layer} from 'react-map-gl';\nimport type {CircleLayer} from 'react-map-gl';\nimport type {FeatureCollection} from 'geojson';\n\nconst geojson: FeatureCollection = {\n type: 'FeatureCollection',\n features: [\n {type: 'Feature', geometry: {type: 'Point', coordinates: [-122.4, 37.8]}}\n ]\n};\n\nconst layerStyle: CircleLayer = {\n id: 'point',\n type: 'circle',\n paint: {\n 'circle-radius': 10,\n 'circle-color': '#007cbf'\n }\n};\n\nfunction App() {\n return ;\n}\n"))),(0,o.kt)(u.Z,{value:"maplibre",label:"Maplibre",mdxType:"TabItem"},(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-tsx"},"import * as React from 'react';\nimport Map, {Source, Layer} from 'react-map-gl/maplibre';\nimport type {CircleLayer} from 'react-map-gl/maplibre';\nimport type {FeatureCollection} from 'geojson';\n\nconst geojson: FeatureCollection = {\n type: 'FeatureCollection',\n features: [\n {type: 'Feature', geometry: {type: 'Point', coordinates: [-122.4, 37.8]}}\n ]\n};\n\nconst layerStyle: CircleLayer = {\n id: 'point',\n type: 'circle',\n paint: {\n 'circle-radius': 10,\n 'circle-color': '#007cbf'\n }\n};\n\nfunction App() {\n return ;\n}\n")))),(0,o.kt)("h2",{id:"properties"},"Properties"),(0,o.kt)("p",null,"The props provided to this component should be conforming to the ",(0,o.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/style-spec/#sources"},"Mapbox source specification")," or ",(0,o.kt)("a",{parentName:"p",href:"https://docs.mapbox.com/mapbox-gl-js/api/#canvassourceoptions"},"CanvasSourceOptions"),"."),(0,o.kt)("p",null,"When props change ",(0,o.kt)("em",{parentName:"p"},"shallowly"),", the component will attempt to update the source. Do not define objects/arrays inline to avoid perf hit."),(0,o.kt)("p",null,"Once a ",(0,o.kt)("inlineCode",{parentName:"p"},"