Deploying to gh-pages from @ 89bfa1eee6539b7634613ba1449d9fe30e5df6fb 🚀

This commit is contained in:
Pessimistress 2025-02-03 19:23:28 +00:00
parent 6e4bad02a9
commit 69d6f5be10
276 changed files with 3232 additions and 723 deletions

View File

@ -1,16 +1,13 @@
<!doctype html>
<html lang="en" dir="ltr">
<html lang="en" dir="ltr" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.4.1">
<title data-rh="true">React Map GL</title><meta data-rh="true" property="og:title" content="React Map GL"><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://visgl.github.io/react-map-gl/404.html"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><link data-rh="true" rel="icon" href="/react-map-gl/favicon.ico"><link data-rh="true" rel="canonical" href="https://visgl.github.io/react-map-gl/404.html"><link data-rh="true" rel="alternate" href="https://visgl.github.io/react-map-gl/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://visgl.github.io/react-map-gl/404.html" hreflang="x-default"><link rel="stylesheet" href="/react-map-gl/assets/css/styles.0a7fd3ef.css">
<link rel="preload" href="/react-map-gl/assets/js/runtime~main.ffa55eeb.js" as="script">
<link rel="preload" href="/react-map-gl/assets/js/main.684e2b73.js" as="script">
<meta name="generator" content="Docusaurus v3.7.0">
<title data-rh="true">react-map-gl</title><meta data-rh="true" property="og:title" content="react-map-gl"><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://visgl.github.io/react-map-gl/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><link data-rh="true" rel="icon" href="/react-map-gl/favicon.png"><link data-rh="true" rel="canonical" href="https://visgl.github.io/react-map-gl/404.html"><link data-rh="true" rel="alternate" href="https://visgl.github.io/react-map-gl/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://visgl.github.io/react-map-gl/404.html" hreflang="x-default"><link rel="stylesheet" href="/react-map-gl/assets/css/styles.b9a26a0c.css">
<script src="/react-map-gl/assets/js/runtime~main.94054164.js" defer="defer"></script>
<script src="/react-map-gl/assets/js/main.734268e4.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
</div>
<script src="/react-map-gl/assets/js/runtime~main.ffa55eeb.js"></script>
<script src="/react-map-gl/assets/js/main.684e2b73.js"></script>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const n=new URLSearchParams(window.location.search).entries();for(var[t,e]of n)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"></div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(self.webpackChunkreact_map_gl_website=self.webpackChunkreact_map_gl_website||[]).push([[9609],{9944:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});var o=n(7294),a=n(63),i=n(4996),l=a.ZP.div.withConfig({displayName:"doc-item-component__DemoContainer",componentId:"sc-16i3x2q-0"})(["position:absolute;overflow:hidden !important;left:0;right:0;top:0;bottom:0;> h1{display:none;}"]);function r(e){var t=e.content,n=e.route,a=t,r=(0,i.Z)("/examples");return n.path===r?o.createElement("div",{key:"index"},o.createElement(a,null)):o.createElement(l,{key:"demo"},o.createElement(a,null))}}}]);

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[5188],{668:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>s,contentTitle:()=>p,default:()=>m,frontMatter:()=>c,metadata:()=>a,toc:()=>i});const a=JSON.parse('{"id":"api-reference/mapbox/map-provider","title":"MapProvider","description":"A Context.Provider that facilitates map operations outside of the component that directly renders a Map.","source":"@site/../docs/api-reference/mapbox/map-provider.md","sourceDirName":"api-reference/mapbox","slug":"/api-reference/mapbox/map-provider","permalink":"/react-map-gl/docs/api-reference/mapbox/map-provider","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/mapbox/map-provider.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Layer","permalink":"/react-map-gl/docs/api-reference/mapbox/layer"},"next":{"title":"Marker","permalink":"/react-map-gl/docs/api-reference/mapbox/marker"}}');var n=t(4848),o=t(8453);const c={},p="MapProvider",s={},i=[{value:"Source",id:"source",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"mapprovider",children:"MapProvider"})}),"\n",(0,n.jsxs)(r.p,{children:["A ",(0,n.jsx)(r.a,{href:"https://reactjs.org/docs/context.html#contextprovider",children:"Context.Provider"})," that facilitates map operations outside of the component that directly renders a ",(0,n.jsx)(r.a,{href:"/react-map-gl/docs/api-reference/mapbox/map",children:"Map"}),"."]}),"\n",(0,n.jsx)(r.p,{children:"The component should wrap all nodes in which you may want to access the maps:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-tsx",children:"import {MapProvider} from 'react-map-gl/mapbox';\n\nfunction Root() {\n return (\n <MapProvider>\n {\n // Application tree, somewhere one or more <Map /> component(s) are rendered\n }\n </MapProvider>\n );\n}\n"})}),"\n",(0,n.jsxs)(r.p,{children:["See ",(0,n.jsx)(r.a,{href:"/react-map-gl/docs/api-reference/mapbox/use-map",children:"useMap"})," for more information."]}),"\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.0-release/src/components/use-map.tsx",children:"use-map.tsx"})})]})}function m(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,r,t)=>{t.d(r,{R:()=>c,x:()=>p});var a=t(6540);const n={},o=a.createContext(n);function c(e){const r=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function p(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),a.createElement(o.Provider,{value:r},e.children)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[2237],{3363:(e,t,i)=>{i.d(t,{A:()=>a});i(6540);var n=i(4164),o=i(1312),s=i(1107),r=i(4848);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,n.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237:(e,t,i)=>{i.r(t),i.d(t,{default:()=>l});i(6540);var n=i(1312),o=i(1003),s=i(4207),r=i(3363),a=i(4848);function l(){const e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(s.A,{children:(0,a.jsx)(r.A,{})})]})}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[7616],{2969:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>c,default:()=>d,frontMatter:()=>s,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"api-reference/mapbox/fullscreen-control","title":"FullscreenControl","description":"React component that wraps mapbox-gl\'s FullscreenControl class.","source":"@site/../docs/api-reference/mapbox/fullscreen-control.md","sourceDirName":"api-reference/mapbox","slug":"/api-reference/mapbox/fullscreen-control","permalink":"/react-map-gl/docs/api-reference/mapbox/fullscreen-control","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/mapbox/fullscreen-control.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"AttributionControl","permalink":"/react-map-gl/docs/api-reference/mapbox/attribution-control"},"next":{"title":"GeolocateControl","permalink":"/react-map-gl/docs/api-reference/mapbox/geolocate-control"}}');var n=t(4848),l=t(8453);const s={},c="FullscreenControl",i={},a=[{value:"Properties",id:"properties",level:2},{value:"Reactive Properties",id:"reactive-properties",level:3},{value:"<code>style</code>: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"<code>containerId</code>: string",id:"containerid",level:4},{value:"<code>position</code>: &#39;top-right&#39; | &#39;top-left&#39; | &#39;bottom-right&#39; | &#39;bottom-left&#39;",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 <Map\r\n mapboxAccessToken=\"<Mapbox access token>\"\r\n initialViewState={{\r\n longitude: -100,\r\n latitude: 40,\r\n zoom: 3.5\r\n }}\r\n mapStyle=\"mapbox://styles/mapbox/streets-v9\"\r\n >\r\n <FullscreenControl />\r\n </Map>;\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)}}}]);

View File

@ -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"}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[3886],{9285:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"api-reference/maplibre/fullscreen-control","title":"FullscreenControl","description":"React component that wraps maplibre-gl\'s FullscreenControl class.","source":"@site/../docs/api-reference/maplibre/fullscreen-control.md","sourceDirName":"api-reference/maplibre","slug":"/api-reference/maplibre/fullscreen-control","permalink":"/react-map-gl/docs/api-reference/maplibre/fullscreen-control","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/maplibre/fullscreen-control.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"AttributionControl","permalink":"/react-map-gl/docs/api-reference/maplibre/attribution-control"},"next":{"title":"GeolocateControl","permalink":"/react-map-gl/docs/api-reference/maplibre/geolocate-control"}}');var o=t(4848),l=t(8453);const i={},s="FullscreenControl",c={},a=[{value:"Properties",id:"properties",level:2},{value:"Reactive Properties",id:"reactive-properties",level:3},{value:"<code>style</code>: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"<code>containerId</code>: string",id:"containerid",level:4},{value:"<code>position</code>: &#39;top-right&#39; | &#39;top-left&#39; | &#39;bottom-right&#39; | &#39;bottom-left&#39;",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 <Map\r\n initialViewState={{\r\n longitude: -100,\r\n latitude: 40,\r\n zoom: 3.5\r\n }}\r\n mapStyle=\"https://demotiles.maplibre.org/style.json\"\r\n >\r\n <FullscreenControl />\r\n </Map>;\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)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[369],{6933:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"api-reference/mapbox/navigation-control","title":"NavigationControl","description":"React component that wraps mapbox-gl\'s NavigationControl class.","source":"@site/../docs/api-reference/mapbox/navigation-control.md","sourceDirName":"api-reference/mapbox","slug":"/api-reference/mapbox/navigation-control","permalink":"/react-map-gl/docs/api-reference/mapbox/navigation-control","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/mapbox/navigation-control.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Marker","permalink":"/react-map-gl/docs/api-reference/mapbox/marker"},"next":{"title":"Popup","permalink":"/react-map-gl/docs/api-reference/mapbox/popup"}}');var n=o(4848),i=o(8453);const a={},s="NavigationControl",c={},l=[{value:"Properties",id:"properties",level:2},{value:"Reactive Properties",id:"reactive-properties",level:3},{value:"<code>style</code>: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"<code>position</code>: &#39;top-right&#39; | &#39;top-left&#39; | &#39;bottom-right&#39; | &#39;bottom-left&#39;",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 <Map\r\n mapboxAccessToken=\"<Mapbox access token>\"\r\n initialViewState={{\r\n longitude: -100,\r\n latitude: 40,\r\n zoom: 3.5\r\n }}\r\n mapStyle=\"mapbox://styles/mapbox/streets-v9\"\r\n >\r\n <NavigationControl />\r\n </Map>;\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)}}}]);

View File

@ -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))}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[7597],{7472:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>o,default:()=>d,frontMatter:()=>c,metadata:()=>t,toc:()=>p});const t=JSON.parse('{"id":"api-reference/maplibre/use-map","title":"useMap","description":"The useMap hook allows a custom component to reference the Map that contains it.","source":"@site/../docs/api-reference/maplibre/use-map.md","sourceDirName":"api-reference/maplibre","slug":"/api-reference/maplibre/use-map","permalink":"/react-map-gl/docs/api-reference/maplibre/use-map","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/maplibre/use-map.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"useControl","permalink":"/react-map-gl/docs/api-reference/maplibre/use-control"},"next":{"title":"Types","permalink":"/react-map-gl/docs/api-reference/maplibre/types"}}');var a=r(4848),s=r(8453);const c={},o="useMap",i={},p=[{value:"Signature",id:"signature",level:2},{value:"Source",id:"source",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,s.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 custom component to reference the ",(0,a.jsx)(n.a,{href:"/react-map-gl/docs/api-reference/maplibre/map",children:"Map"})," that contains it."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-tsx",children:"import {Map, useMap} from 'react-map-gl/maplibre';\n\nfunction Root() {\n return (\n <Map ... >\n <NavigationButton />\n </Map>\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 <button onClick={onClick}>Go</button>;\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/maplibre/map-provider",children:"MapProvider"}),", this hook can also reference maps that are rendered outside of the current component's direct render tree."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-tsx",children:'import {MapProvider, Map, useMap} from \'react-map-gl/maplibre\';\n\nfunction Root() {\n return (\n <MapProvider>\n <Map id="myMapA" ... />\n <Map id="myMapB" ... />\n <NavigateButton />\n </MapProvider>\n );\n}\n\nfunction NavigateButton() {\n const {myMapA, myMapB} = useMap();\n\n const onClick = () => {\n myMapA.flyTo({center: [-122.4, 37.8]});\n myMapB.flyTo({center: [-74, 40.7]});\n };\n\n return <button onClick={onClick}>Go</button>;\n}\n'})}),"\n",(0,a.jsxs)(n.p,{children:["See a full example ",(0,a.jsx)(n.a,{href:"https://github.com/visgl/react-map-gl/tree/master/examples/get-started/hook",children:"here"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"signature",children:"Signature"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.code,{children:"useMap(): {current?: MapRef, [id: string]: MapRef}"})}),"\n",(0,a.jsxs)(n.p,{children:["The hook returns an object that contains all mounted maps under the closest ",(0,a.jsx)(n.code,{children:"MapProvider"}),". The keys are each map's ",(0,a.jsx)(n.a,{href:"/react-map-gl/docs/api-reference/maplibre/map#id",children:"id"})," and the values are the ",(0,a.jsx)(n.a,{href:"/react-map-gl/docs/api-reference/maplibre/types#mapref",children:"MapRef"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["If the hook is used inside a decendent of a ",(0,a.jsx)(n.code,{children:"Map"})," component, the returned object also contains a ",(0,a.jsx)(n.code,{children:"current"})," field that references the containing map."]}),"\n",(0,a.jsx)(n.h2,{id:"source",children:"Source"}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.a,{href:"https://github.com/visgl/react-map-gl/tree/master/modules/maplibre/src/components/use-map.tsx",children:"use-map.tsx"})})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>o});var t=r(6540);const a={},s=t.createContext(a);function c(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[3640],{2801:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>s,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"api-reference/maplibre/navigation-control","title":"NavigationControl","description":"React component that wraps maplibre-gl\'s NavigationControl class.","source":"@site/../docs/api-reference/maplibre/navigation-control.md","sourceDirName":"api-reference/maplibre","slug":"/api-reference/maplibre/navigation-control","permalink":"/react-map-gl/docs/api-reference/maplibre/navigation-control","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/maplibre/navigation-control.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Marker","permalink":"/react-map-gl/docs/api-reference/maplibre/marker"},"next":{"title":"Popup","permalink":"/react-map-gl/docs/api-reference/maplibre/popup"}}');var o=r(4848),i=r(8453);const s={},a="NavigationControl",l={},c=[{value:"Properties",id:"properties",level:2},{value:"Reactive Properties",id:"reactive-properties",level:3},{value:"<code>style</code>: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"<code>position</code>: &#39;top-right&#39; | &#39;top-left&#39; | &#39;bottom-right&#39; | &#39;bottom-left&#39;",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 <Map\r\n initialViewState={{\r\n longitude: -100,\r\n latitude: 40,\r\n zoom: 3.5\r\n }}\r\n mapStyle=\"https://demotiles.maplibre.org/style.json\"\r\n >\r\n <NavigationControl />\r\n </Map>;\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)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(self.webpackChunkreact_map_gl_website=self.webpackChunkreact_map_gl_website||[]).push([[4972],{4972:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var n=a(7294),l=a(5999),o=a(1944),r=a(179);function i(){return n.createElement(n.Fragment,null,n.createElement(o.d,{title:(0,l.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),n.createElement(r.Z,null,n.createElement("main",{className:"container margin-vert--xl"},n.createElement("div",{className:"row"},n.createElement("div",{className:"col col--6 col--offset-3"},n.createElement("h1",{className:"hero__title"},n.createElement(l.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),n.createElement("p",null,n.createElement(l.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),n.createElement("p",null,n.createElement(l.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]);

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[2368],{9949:(e,r,o)=>{o.r(r),o.d(r,{assets:()=>i,contentTitle:()=>a,default:()=>d,frontMatter:()=>c,metadata:()=>t,toc:()=>p});const t=JSON.parse('{"id":"api-reference/mapbox/source","title":"Source","description":"This component allows apps to create a map source using React. It may contain Layer components as children.","source":"@site/../docs/api-reference/mapbox/source.md","sourceDirName":"api-reference/mapbox","slug":"/api-reference/mapbox/source","permalink":"/react-map-gl/docs/api-reference/mapbox/source","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/mapbox/source.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"ScaleControl","permalink":"/react-map-gl/docs/api-reference/mapbox/scale-control"},"next":{"title":"useControl","permalink":"/react-map-gl/docs/api-reference/mapbox/use-control"}}');var n=o(4848),s=o(8453);const c={},a="Source",i={},p=[{value:"Properties",id:"properties",level:2},{value:"<code>id</code>: string",id:"id",level:4},{value:"<code>type</code>: 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 <Map\r\n mapLib={import('mapbox-gl')}\r\n initialViewState={{\r\n longitude: -122.4,\r\n latitude: 37.8,\r\n zoom: 14\r\n }}\r\n mapStyle=\"mapbox://styles/mapbox/streets-v9\"\r\n >\r\n <Source id=\"my-data\" type=\"geojson\" data={geojson}>\r\n <Layer {...layerStyle} />\r\n </Source>\r\n </Map>;\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:"<Source>"})," is mounted, the following props should not change. If add/remove multiple JSX sources dynamically, make sure you use React's ",(0,n.jsx)(r.a,{href:"https://reactjs.org/docs/lists-and-keys.html#keys",children:"key prop"})," to give each element a stable identity."]}),"\n",(0,n.jsxs)(r.h4,{id:"id",children:[(0,n.jsx)(r.code,{children:"id"}),": string"]}),"\n",(0,n.jsx)(r.p,{children:"Unique identifier of the source. If not provided, a default id will be assigned."}),"\n",(0,n.jsxs)(r.h4,{id:"type",children:[(0,n.jsx)(r.code,{children:"type"}),": string"]}),"\n",(0,n.jsx)(r.p,{children:"Required. Type of the source."}),"\n",(0,n.jsx)(r.h2,{id:"source-1",children:"Source"}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.a,{href:"https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/source.ts",children:"source.ts"})})]})}function d(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,r,o)=>{o.d(r,{R:()=>c,x:()=>a});var t=o(6540);const n={},s=t.createContext(n);function c(e){const r=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),t.createElement(s.Provider,{value:r},e.children)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(self.webpackChunkreact_map_gl_website=self.webpackChunkreact_map_gl_website||[]).push([[5525],{5525:()=>{}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[5776],{8453:(e,t,r)=>{r.d(t,{R:()=>l,x:()=>u});var o=r(6540);const n={},i=o.createContext(n);function l(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function u(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),o.createElement(i.Provider,{value:t},e.children)}},2820:(e,t,r)=>{r.d(t,{Fh:()=>o,jE:()=>i});function o(e,t,r){if(null!==e)for(var n,i,l,u,s,a,c,f,g=0,y=0,m=e.type,p="FeatureCollection"===m,h="Feature"===m,b=p?e.features.length:1,P=0;P<b;P++){s=(f=!!(c=p?e.features[P].geometry:h?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var k=0;k<s;k++){var d=0,v=0;if(null!==(u=f?c.geometries[k]:c)){a=u.coordinates;var w=u.type;switch(g=!r||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(a,y,P,d,v))return!1;y++,d++;break;case"LineString":case"MultiPoint":for(n=0;n<a.length;n++){if(!1===t(a[n],y,P,d,v))return!1;y++,"MultiPoint"===w&&d++}"LineString"===w&&d++;break;case"Polygon":case"MultiLineString":for(n=0;n<a.length;n++){for(i=0;i<a[n].length-g;i++){if(!1===t(a[n][i],y,P,d,v))return!1;y++}"MultiLineString"===w&&d++,"Polygon"===w&&v++}"Polygon"===w&&d++;break;case"MultiPolygon":for(n=0;n<a.length;n++){for(v=0,i=0;i<a[n].length;i++){for(l=0;l<a[n][i].length-g;l++){if(!1===t(a[n][i][l],y,P,d,v))return!1;y++}v++}d++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(!1===o(u.geometries[n],t,r))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function n(e,t){var r,o,n,i,l,u,s,a,c,f,g=0,y="FeatureCollection"===e.type,m="Feature"===e.type,p=y?e.features.length:1;for(r=0;r<p;r++){for(u=y?e.features[r].geometry:m?e.geometry:e,a=y?e.features[r].properties:m?e.properties:{},c=y?e.features[r].bbox:m?e.bbox:void 0,f=y?e.features[r].id:m?e.id:void 0,l=(s=!!u&&"GeometryCollection"===u.type)?u.geometries.length:1,n=0;n<l;n++)if(null!==(i=s?u.geometries[n]:u))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(i,g,a,c,f))return!1;break;case"GeometryCollection":for(o=0;o<i.geometries.length;o++)if(!1===t(i.geometries[o],g,a,c,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,g,a,c,f))return!1;g++}}function i(e,t,r){var o=r;return n(e,(function(e,n,i,l,u){o=0===n&&void 0===r?e:t(o,e,n,i,l,u)})),o}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[9647],{7121:(e,s,r)=>{r.r(s),r.d(s,{default:()=>i});r(6540);var t=r(4164),c=r(1003),u=r(7559),a=r(2831),n=r(4207),p=r(4848);function i(e){return(0,p.jsx)(c.e3,{className:(0,t.A)(u.G.wrapper.docsPages),children:(0,p.jsx)(n.A,{children:(0,a.v)(e.route.routes)})})}}}]);

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[6092],{8384:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>p,contentTitle:()=>c,default:()=>l,frontMatter:()=>i,metadata:()=>n,toc:()=>s});const n=JSON.parse('{"id":"api-reference/maplibre/map-provider","title":"MapProvider","description":"A Context.Provider that facilitates map operations outside of the component that directly renders a Map.","source":"@site/../docs/api-reference/maplibre/map-provider.md","sourceDirName":"api-reference/maplibre","slug":"/api-reference/maplibre/map-provider","permalink":"/react-map-gl/docs/api-reference/maplibre/map-provider","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/maplibre/map-provider.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"LogoControl","permalink":"/react-map-gl/docs/api-reference/maplibre/logo-control"},"next":{"title":"Marker","permalink":"/react-map-gl/docs/api-reference/maplibre/marker"}}');var a=t(4848),o=t(8453);const i={},c="MapProvider",p={},s=[{value:"Source",id:"source",level:2}];function d(e){const r={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)(r.header,{children:(0,a.jsx)(r.h1,{id:"mapprovider",children:"MapProvider"})}),"\n",(0,a.jsxs)(r.p,{children:["A ",(0,a.jsx)(r.a,{href:"https://reactjs.org/docs/context.html#contextprovider",children:"Context.Provider"})," that facilitates map operations outside of the component that directly renders a ",(0,a.jsx)(r.a,{href:"/react-map-gl/docs/api-reference/maplibre/map",children:"Map"}),"."]}),"\n",(0,a.jsx)(r.p,{children:"The component should wrap all nodes in which you may want to access the maps:"}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-tsx",children:"import {MapProvider} from 'react-map-gl/maplibre';\n\nfunction Root() {\n return (\n <MapProvider>\n {\n // Application tree, somewhere one or more <Map /> component(s) are rendered\n }\n </MapProvider>\n );\n}\n"})}),"\n",(0,a.jsxs)(r.p,{children:["See ",(0,a.jsx)(r.a,{href:"/react-map-gl/docs/api-reference/maplibre/use-map",children:"useMap"})," for more information."]}),"\n",(0,a.jsx)(r.h2,{id:"source",children:"Source"}),"\n",(0,a.jsx)(r.p,{children:(0,a.jsx)(r.a,{href:"https://github.com/visgl/react-map-gl/tree/master/modules/maplibre/src/components/use-map.tsx",children:"use-map.tsx"})})]})}function l(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,a.jsx)(r,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},8453:(e,r,t)=>{t.d(r,{R:()=>i,x:()=>c});var n=t(6540);const a={},o=n.createContext(a);function i(e){const r=n.useContext(o);return n.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(a):e.components||a:i(e.components),n.createElement(o.Provider,{value:r},e.children)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
/**
* MapLibre GL JS
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.0.1/LICENSE.txt
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[7126],{376:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>o,toc:()=>a});const o=JSON.parse('{"id":"api-reference/mapbox/scale-control","title":"ScaleControl","description":"React component that wraps mapbox-gl\'s ScaleControl class.","source":"@site/../docs/api-reference/mapbox/scale-control.md","sourceDirName":"api-reference/mapbox","slug":"/api-reference/mapbox/scale-control","permalink":"/react-map-gl/docs/api-reference/mapbox/scale-control","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/mapbox/scale-control.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Popup","permalink":"/react-map-gl/docs/api-reference/mapbox/popup"},"next":{"title":"Source","permalink":"/react-map-gl/docs/api-reference/mapbox/source"}}');var n=r(4848),c=r(8453);const s={},i="ScaleControl",l={},a=[{value:"Properties",id:"properties",level:2},{value:"Reactive Properties",id:"reactive-properties",level:3},{value:"<code>maxWidth</code>: string",id:"maxwidth",level:4},{value:"<code>style</code>: CSSProperties",id:"style",level:4},{value:"<code>unit</code>: &#39;imperial&#39; | &#39;metric&#39; | &#39;nautical&#39;",id:"unit",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"<code>position</code>: &#39;top-right&#39; | &#39;top-left&#39; | &#39;bottom-right&#39; | &#39;bottom-left&#39;",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",p:"p",pre:"pre",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"scalecontrol",children:"ScaleControl"})}),"\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/#scalecontrol",children:"ScaleControl"})," 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, {ScaleControl} from 'react-map-gl/mapbox';\r\nimport 'mapbox-gl/dist/mapbox-gl.css';\r\n\r\nfunction App() {\r\n return <Map\r\n mapboxAccessToken=\"<Mapbox access token>\"\r\n initialViewState={{\r\n longitude: -100,\r\n latitude: 40,\r\n zoom: 3.5\r\n }}\r\n mapStyle=\"mapbox://styles/mapbox/streets-v9\"\r\n >\r\n <ScaleControl />\r\n </Map>;\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:"maxwidth",children:[(0,n.jsx)(t.code,{children:"maxWidth"}),": string"]}),"\n",(0,n.jsxs)(t.p,{children:["Default: ",(0,n.jsx)(t.code,{children:"100"})]}),"\n",(0,n.jsx)(t.p,{children:"The maximum length of the scale control in pixels."}),"\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.jsxs)(t.h4,{id:"unit",children:[(0,n.jsx)(t.code,{children:"unit"}),": 'imperial' | 'metric' | 'nautical'"]}),"\n",(0,n.jsxs)(t.p,{children:["Default: ",(0,n.jsx)(t.code,{children:"'metric'"})]}),"\n",(0,n.jsx)(t.p,{children:"Unit of the distance."}),"\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.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/scale-control.ts",children:"scale-control.ts"})})]})}function d(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>i});var o=r(6540);const n={},c=o.createContext(n);function s(e){const t=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(c.Provider,{value:t},e.children)}}}]);

View File

@ -0,0 +1 @@
"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([[8105],{5089:(e,r,o)=>{o.r(r),o.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"api-reference/maplibre/logo-control","title":"LogoControl","description":"React component that wraps maplibre-gl\'s LogoControl class.","source":"@site/../docs/api-reference/maplibre/logo-control.md","sourceDirName":"api-reference/maplibre","slug":"/api-reference/maplibre/logo-control","permalink":"/react-map-gl/docs/api-reference/maplibre/logo-control","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/react-map-gl/tree/master/docs/../docs/api-reference/maplibre/logo-control.md","tags":[],"version":"current","frontMatter":{},"sidebar":"defaultSidebar","previous":{"title":"Layer","permalink":"/react-map-gl/docs/api-reference/maplibre/layer"},"next":{"title":"MapProvider","permalink":"/react-map-gl/docs/api-reference/maplibre/map-provider"}}');var n=o(4848),l=o(8453);const i={},s="LogoControl",c={},a=[{value:"Properties",id:"properties",level:2},{value:"Reactive Properties",id:"reactive-properties",level:3},{value:"<code>style</code>: CSSProperties",id:"style",level:4},{value:"Other Properties",id:"other-properties",level:3},{value:"<code>position</code>: &#39;top-right&#39; | &#39;top-left&#39; | &#39;bottom-right&#39; | &#39;bottom-left&#39;",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,l.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"logocontrol",children:"LogoControl"})}),"\n",(0,n.jsxs)(r.p,{children:["React component that wraps maplibre-gl's ",(0,n.jsx)(r.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/classes/LogoControl/",children:"LogoControl"})," 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, LogoControl} from 'react-map-gl/maplibre';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\n\r\nfunction App() {\r\n return <Map\r\n initialViewState={{\r\n longitude: -100,\r\n latitude: 40,\r\n zoom: 3.5\r\n }}\r\n mapStyle=\"https://demotiles.maplibre.org/style.json\"\r\n >\r\n <LogoControl />\r\n </Map>;\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.p,{children:["Any ",(0,n.jsx)(r.a,{href:"https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/LogoControlOptions/",children:"options"})," supported by the ",(0,n.jsx)(r.code,{children:"LogoControl"})," class, such as"]}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.code,{children:"compact"})}),"\n"]}),"\n",(0,n.jsx)(r.p,{children:"Plus the following:"}),"\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/master/modules/maplibre/src/components/logo-control.ts",children:"logo-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,o)=>{o.d(r,{R:()=>i,x:()=>s});var t=o(6540);const n={},l=t.createContext(n);function i(e){const r=t.useContext(l);return t.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(n):e.components||n:i(e.components),t.createElement(l.Provider,{value:r},e.children)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
"use strict";(self.webpackChunkreact_map_gl_website=self.webpackChunkreact_map_gl_website||[]).push([[8695],{5745:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
/*! https://mths.be/cssesc v3.0.0 by @mathias */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More