Xiaoji Chen b454603bb2 Updates
2020-02-10 16:00:48 -08:00

370 lines
96 KiB
HTML

<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><meta name="generator" content="Gatsby 2.18.25"/><title data-react-helmet="true">react-map-gl</title><link data-react-helmet="true" rel="stylesheet" href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.6.0/mapbox-gl.css" type="text/css"/><link data-react-helmet="true" rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.9/mapbox-gl-draw.css" type="text/css"/><link data-react-helmet="true" rel="stylesheet" href="/react-map-gl/style.css" type="text/css"/><link data-react-helmet="true" rel="icon" type="img/ico" href="favicon.ico"/><meta data-react-helmet="true" name="description"/><meta data-react-helmet="true" name="image" content="NaN"/><meta data-react-helmet="true" property="og:url" content="NaN"/><meta data-react-helmet="true" property="og:title"/><meta data-react-helmet="true" property="og:description"/><meta data-react-helmet="true" property="og:image" content="NaN"/><meta data-react-helmet="true" property="fb:app_id" content=""/><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"/><meta data-react-helmet="true" name="twitter:creator" content=""/><meta data-react-helmet="true" name="twitter:title"/><meta data-react-helmet="true" name="twitter:description"/><meta data-react-helmet="true" name="twitter:image" content="NaN"/><script data-react-helmet="true" type="application/ld+json">[{"@context":"http://schema.org","@type":"WebSite","url":null,"alternateName":""}]</script><style data-styled="gXXAFg bDuPoM eyqZow cWxAeV fybxvQ fCCoSo gGlvpi eFnCLU dMoLKk FcGip FrNRT hGwSqT jkbfmX dKqGOe dydGug dKKgxr ewhNJT cncNYa cVbpdr dcdkiM kUifx duevmh dFJdWN hsOfQe kVRSNy kPzBbv" data-styled-version="4.4.1">
/* sc-component-id: toc__TocChevron-c2gnov-0 */
.gGlvpi{height:16px;width:16px;position:absolute;left:36px;top:20px;-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transition:-webkit-transform 0.3s;-webkit-transition:transform 0.3s;transition:transform 0.3s;}.eFnCLU{height:16px;width:16px;position:absolute;left:36px;top:20px;-webkit-transform:none;-ms-transform:none;transform:none;-webkit-transition:-webkit-transform 0.3s;-webkit-transition:transform 0.3s;transition:transform 0.3s;}
/* sc-component-id: toc__TocEntry-c2gnov-1 */
.fybxvQ{font:bold 14px/20px "Uber Move",Helvetica,Arial,sans-serif;border-top:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;color:#000000;cursor:pointer;margin:-0.5px 0;position:relative;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.fCCoSo{font:bold 14px/20px "Uber Move",Helvetica,Arial,sans-serif;border-top:1px solid tranparent;border-bottom:1px solid tranparent;color:#666666;cursor:pointer;margin:-0.5px 0;position:relative;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
/* sc-component-id: toc__TocHeader-c2gnov-2 */
.dMoLKk{display:block;padding:16px 16px 16px 60px;} .dMoLKk:hover{background:#F7F7F7;}
/* sc-component-id: toc__TocLink-c2gnov-3 */
.hGwSqT a{display:block;padding:16px 16px 16px 84px;color:#666666 !important;-webkit-text-decoration:none;text-decoration:none;} .hGwSqT:hover{background:#F7F7F7;}.jkbfmX a{display:block;padding:16px 16px 16px 84px;color:#276EF1 !important;-webkit-text-decoration:none;text-decoration:none;} .jkbfmX:hover{background:#F7F7F7;}
/* sc-component-id: toc__TocSubpages-c2gnov-4 */
.FcGip{list-style:none;margin:0;max-height:0px;overflow:hidden;padding:0;-webkit-transition:max-height 0.3s;transition:max-height 0.3s;}.FrNRT{list-style:none;margin:0;max-height:1008px;overflow:hidden;padding:0;-webkit-transition:max-height 0.3s;transition:max-height 0.3s;}
/* sc-component-id: toc__TocContainer-c2gnov-5 */
@media screen and (min-width:600px){.cWxAeV{position:fixed;top:0;padding:64px 0;max-width:300px;height:100%;z-index:2;border-right:1px solid #CCCCCC;overflow-y:scroll;overflow-x:hidden;width:100%;}} @media screen and (max-width:600px){.cWxAeV{border-right:none;position:-webkit-sticky;position:sticky;padding:0 0;-webkit-transition:opacity 0.3s,-webkit-transform 0.3s;-webkit-transition:opacity 0.3s,transform 0.3s;transition:opacity 0.3s,transform 0.3s;opacity:0;max-height:0;overflow:hidden;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px);}}
/* sc-component-id: toc__StyledTocToggle-c2gnov-6 */
.eyqZow{font:normal 14px/20px "Uber Move",Helvetica,Arial,sans-serif;color:#FFFFFF;cursor:pointer;position:fixed;top:0;right:24px;line-height:64px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10;display:none;} @media screen and (max-width:600px){.eyqZow{display:block;}}
/* sc-component-id: header__HeaderContainer-sc-1hd3yin-1 */
.bDuPoM{grid-column:1/3;grid-row:1/2;} @media screen and (max-width:600px){.bDuPoM{-webkit-order:1;-ms-flex-order:1;order:1;}}
/* sc-component-id: body__BodyContainerToC-lvm4v2-1 */
.dKqGOe{height:100%;width:100%;padding:64px 0 0 300px;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1);opacity:1;} @media screen and (max-width:600px){.dKqGOe{padding-left:0;-webkit-order:2;-ms-flex-order:2;order:2;-webkit-transition:opacity 0.3s;transition:opacity 0.3s;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1);opacity:1;}}
/* sc-component-id: body__Body-lvm4v2-3 */
.gXXAFg{height:100vh;}
/* sc-component-id: sc-global-495056895 */
body{margin:0;overflow-x:hidden;} *{box-sizing:border-box;}
/* sc-component-id: typography__A-sc-1pmaksm-0 */
.ewhNJT{-webkit-text-decoration:none;text-decoration:none;color:#276EF1;} .ewhNJT:visited{color:#174EB6;} .ewhNJT:active{color:#123D90;} .ewhNJT:hover{color:#123D90;}
/* sc-component-id: typography__GatsbyA-sc-1pmaksm-1 */
.dFJdWN{-webkit-text-decoration:none;text-decoration:none;color:#276EF1;} .dFJdWN:visited{color:#174EB6;} .dFJdWN:active{color:#123D90;} .dFJdWN:hover{color:#123D90;}
/* sc-component-id: typography__H1-sc-1pmaksm-2 */
.dKKgxr{font:bold 40px/56px "Uber Move",Helvetica,Arial,sans-serif;-webkit-letter-spacing:0.02em;-moz-letter-spacing:0.02em;-ms-letter-spacing:0.02em;letter-spacing:0.02em;margin:4px 0 24px;}
/* sc-component-id: typography__H2-sc-1pmaksm-3 */
.kUifx{font:bold 32px/48px "Uber Move",Helvetica,Arial,sans-serif;margin:24px 0 16px;}
/* sc-component-id: typography__H3-sc-1pmaksm-4 */
.duevmh{font:bold 24px/36px "Uber Move",Helvetica,Arial,sans-serif;}
/* sc-component-id: typography__H5-sc-1pmaksm-6 */
.kPzBbv{font:bold 16px/24px "Uber Move",Helvetica,Arial,sans-serif;}
/* sc-component-id: typography__P-sc-1pmaksm-8 */
.cncNYa{margin:'0 0 16px';}
/* sc-component-id: typography__List-sc-1pmaksm-9 */
.hsOfQe{margin:0 0 12px;}
/* sc-component-id: typography__ListItem-sc-1pmaksm-10 */
.kVRSNy{margin-bottom:4px;}
/* sc-component-id: typography__MarkdownBody-sc-1pmaksm-11 */
.dydGug{font:normal 14px/20px "Uber Move",Helvetica,Arial,sans-serif;padding:36px;max-width:692px;}
/* sc-component-id: typography__InlineCode-sc-1pmaksm-12 */
.cVbpdr{background-color:#F7F7F7;border-radius:4px;padding:0 5px;font-family:Consolas,Menlo,Monaco,'Andale Mono WT','Andale Mono','Lucida Console','Lucida Sans Typewriter','DejaVu Sans Mono','Bitstream Vera Sans Mono','Liberation Mono','Nimbus Mono L','Courier New',Courier,monospace;font-size:0.9em;margin:1px 0;line-height:calc(1.5em / 0.9 - 2px);display:inline-block;vertical-align:top;}
/* sc-component-id: typography__Pre-sc-1pmaksm-14 */
.dcdkiM{background-color:#F7F7F7;padding:6px;overflow-x:auto;} .dcdkiM .keyword{color:#339;font-weight:bold;} .dcdkiM .operator{color:#d14;} .dcdkiM .punctuation{color:#458;} .dcdkiM .string,.dcdkiM .number{color:#008080;}</style><style type="text/css">
.anchor.before {
position: absolute;
top: 0;
left: 0;
transform: translateX(-100%);
padding-right: 4px;
}
.anchor.after {
display: inline-block;
padding-left: 4px;
}
h1 .anchor svg,
h2 .anchor svg,
h3 .anchor svg,
h4 .anchor svg,
h5 .anchor svg,
h6 .anchor svg {
visibility: hidden;
}
h1:hover .anchor svg,
h2:hover .anchor svg,
h3:hover .anchor svg,
h4:hover .anchor svg,
h5:hover .anchor svg,
h6:hover .anchor svg,
h1 .anchor:focus svg,
h2 .anchor:focus svg,
h3 .anchor:focus svg,
h4 .anchor:focus svg,
h5 .anchor:focus svg,
h6 .anchor:focus svg {
visibility: visible;
}
</style><script>
document.addEventListener("DOMContentLoaded", function(event) {
var hash = window.decodeURI(location.hash.replace('#', ''))
if (hash !== '') {
var element = document.getElementById(hash)
if (element) {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
var clientTop = document.documentElement.clientTop || document.body.clientTop || 0
var offset = element.getBoundingClientRect().top + scrollTop - clientTop
// Wait for the browser to finish rendering before scrolling.
setTimeout((function() {
window.scrollTo(0, offset - 64)
}), 0)
}
}
})
</script><link as="script" rel="preload" href="/react-map-gl/webpack-runtime-68f906e2b4e22da0fc24.js"/><link as="script" rel="preload" href="/react-map-gl/app-509e2070aec193b8a67f.js"/><link as="script" rel="preload" href="/react-map-gl/commons-7eb79b70fb79e9d91272.js"/><link as="script" rel="preload" href="/react-map-gl/component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx-bc2b92ef9855af2673f6.js"/><link as="fetch" rel="preload" href="/react-map-gl/page-data/docs/api-reference/interactive-map/page-data.json" crossorigin="anonymous"/></head><body><div id="___gatsby"><div style="outline:none" tabindex="-1" id="gatsby-focus-wrapper"><div><div><div class="body__Body-lvm4v2-3 gXXAFg"><div class="header__HeaderContainer-sc-1hd3yin-1 bDuPoM"><div></div></div><div class="toc__StyledTocToggle-c2gnov-6 eyqZow">Table of Contents</div><div class="toc__TocContainer-c2gnov-5 cWxAeV"><div><div title="Introduction" class="toc__TocEntry-c2gnov-1 fybxvQ"><svg viewBox="0 0 24 24" class="toc__TocChevron-c2gnov-0 gGlvpi" width="24" height="24"><title>Chevron Down</title><path transform="rotate(270, 12, 12)" fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"></path></svg><span class="toc__TocHeader-c2gnov-2 dMoLKk">Introduction</span></div><ul class="toc__TocSubpages-c2gnov-4 FcGip"><div><li><div title="Introduction" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Introduction" href="/react-map-gl/docs">Introduction</a></div></div></li></div><div><li><div title="What&#x27;s new" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="What&#x27;s new" href="/react-map-gl/docs/whats-new">What&#x27;s new</a></div></div></li></div><div><li><div title="Upgrade Guide" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Upgrade Guide" href="/react-map-gl/docs/upgrade-guide">Upgrade Guide</a></div></div></li></div><div><li><div title="Developer Guide" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Developer Guide" href="/react-map-gl/docs/developer-guide">Developer Guide</a></div></div></li></div></ul></div><div><div title="Getting Started" class="toc__TocEntry-c2gnov-1 fybxvQ"><svg viewBox="0 0 24 24" class="toc__TocChevron-c2gnov-0 gGlvpi" width="24" height="24"><title>Chevron Down</title><path transform="rotate(270, 12, 12)" fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"></path></svg><span class="toc__TocHeader-c2gnov-2 dMoLKk">Getting Started</span></div><ul class="toc__TocSubpages-c2gnov-4 FcGip"><div><li><div title="Get Started" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Get Started" href="/react-map-gl/docs/get-started/get-started">Get Started</a></div></div></li></div><div><li><div title="About Mapbox Tokens" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="About Mapbox Tokens" href="/react-map-gl/docs/get-started/mapbox-tokens">About Mapbox Tokens</a></div></div></li></div><div><li><div title="State Management" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="State Management" href="/react-map-gl/docs/get-started/state-management">State Management</a></div></div></li></div><div><li><div title="Adding Custom Data" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Adding Custom Data" href="/react-map-gl/docs/get-started/adding-custom-data">Adding Custom Data</a></div></div></li></div></ul></div><div><div title="Advanced" class="toc__TocEntry-c2gnov-1 fybxvQ"><svg viewBox="0 0 24 24" class="toc__TocChevron-c2gnov-0 gGlvpi" width="24" height="24"><title>Chevron Down</title><path transform="rotate(270, 12, 12)" fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"></path></svg><span class="toc__TocHeader-c2gnov-2 dMoLKk">Advanced</span></div><ul class="toc__TocSubpages-c2gnov-4 FcGip"><div><li><div title="Custom Components" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Custom Components" href="/react-map-gl/docs/advanced/custom-components">Custom Components</a></div></div></li></div><div><li><div title="Custom Map Controller" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Custom Map Controller" href="/react-map-gl/docs/advanced/custom-map-controller">Custom Map Controller</a></div></div></li></div><div><li><div title="Custom Overlays" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Custom Overlays" href="/react-map-gl/docs/advanced/custom-overlays">Custom Overlays</a></div></div></li></div><div><li><div title="Viewport Transition" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Viewport Transition" href="/react-map-gl/docs/advanced/viewport-transition">Viewport Transition</a></div></div></li></div></ul></div><div><div title="API Reference" class="toc__TocEntry-c2gnov-1 fybxvQ"><svg viewBox="0 0 24 24" class="toc__TocChevron-c2gnov-0 eFnCLU" width="24" height="24"><title>Chevron Down</title><path transform="rotate(270, 12, 12)" fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 12.2652 9.10536 12.5196 9.29289 12.7071L13.2929 16.7071C13.6834 17.0976 14.3166 17.0976 14.7071 16.7071C15.0976 16.3166 15.0976 15.6834 14.7071 15.2929L11.4142 12L14.7071 8.70711C15.0976 8.31658 15.0976 7.68342 14.7071 7.29289C14.3166 6.90237 13.6834 6.90237 13.2929 7.29289L9.29289 11.2929C9.10536 11.4804 9 11.7348 9 12Z"></path></svg><span class="toc__TocHeader-c2gnov-2 dMoLKk">API Reference</span></div><ul class="toc__TocSubpages-c2gnov-4 FrNRT"><div><li><div title="Canvas Overlay" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Canvas Overlay" href="/react-map-gl/docs/api-reference/canvas-overlay">Canvas Overlay</a></div></div></li></div><div><li><div title="FlyToInterpolator" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="FlyToInterpolator" href="/react-map-gl/docs/api-reference/fly-to-interpolator">FlyToInterpolator</a></div></div></li></div><div><li><div title="HTML Overlay" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="HTML Overlay" href="/react-map-gl/docs/api-reference/html-overlay">HTML Overlay</a></div></div></li></div><div><li><div title="InteractiveMap" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 jkbfmX"><a aria-current="page" title="InteractiveMap" class="" href="/react-map-gl/docs/api-reference/interactive-map">InteractiveMap</a></div></div></li></div><div><li><div title="Layer" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Layer" href="/react-map-gl/docs/api-reference/layer">Layer</a></div></div></li></div><div><li><div title="LinearInterpolator" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="LinearInterpolator" href="/react-map-gl/docs/api-reference/linear-interpolator">LinearInterpolator</a></div></div></li></div><div><li><div title="Marker Control" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Marker Control" href="/react-map-gl/docs/api-reference/marker">Marker Control</a></div></div></li></div><div><li><div title="MapController" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="MapController" href="/react-map-gl/docs/api-reference/map-controller">MapController</a></div></div></li></div><div><li><div title="Navigation Control" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Navigation Control" href="/react-map-gl/docs/api-reference/navigation-control">Navigation Control</a></div></div></li></div><div><li><div title="Fullscreen Control" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Fullscreen Control" href="/react-map-gl/docs/api-reference/fullscreen-control">Fullscreen Control</a></div></div></li></div><div><li><div title="Geolocate Control" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Geolocate Control" href="/react-map-gl/docs/api-reference/geolocate-control">Geolocate Control</a></div></div></li></div><div><li><div title="PointerEvent" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="PointerEvent" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a></div></div></li></div><div><li><div title="Popup Control" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Popup Control" href="/react-map-gl/docs/api-reference/popup">Popup Control</a></div></div></li></div><div><li><div title="Scale Control" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Scale Control" href="/react-map-gl/docs/api-reference/scale-control">Scale Control</a></div></div></li></div><div><li><div title="Source" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="Source" href="/react-map-gl/docs/api-reference/source">Source</a></div></div></li></div><div><li><div title="StaticMap" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="StaticMap" href="/react-map-gl/docs/api-reference/static-map">StaticMap</a></div></div></li></div><div><li><div title="SVG Overlay" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="SVG Overlay" href="/react-map-gl/docs/api-reference/svg-overlay">SVG Overlay</a></div></div></li></div><div><li><div title="WebMercatorViewport" class="toc__TocEntry-c2gnov-1 fCCoSo"><div class="toc__TocLink-c2gnov-3 hGwSqT"><a title="WebMercatorViewport" href="/react-map-gl/docs/api-reference/web-mercator-viewport">WebMercatorViewport</a></div></div></li></div></ul></div></div><div class="body__BodyContainerToC-lvm4v2-1 dKqGOe"><div class="typography__MarkdownBody-sc-1pmaksm-11 dydGug"><div><h1 id="interactivemap" style="position:relative" class="typography__H1-sc-1pmaksm-2 dKKgxr"><a href="#interactivemap" aria-label="interactivemap permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>InteractiveMap</h1>
<p class="typography__P-sc-1pmaksm-8 cncNYa"><img src="https://img.shields.io/badge/since-v3.0-green" alt="Since v3.0"/></p>
<p class="typography__P-sc-1pmaksm-8 cncNYa">This component renders <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">MapboxGL</code> and provides full interactivity support.
It uses <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">StaticMap</code> underneath to render the final map component.
This is the <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">default</code> exported component from <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">ReactMapGL</code>.</p>
<div class="gatsby-highlight" data-language="js"><pre class="typography__Pre-sc-1pmaksm-14 dcdkiM language-js"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-js"><span class="token keyword">import</span> <span class="token punctuation">{</span>Component<span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&#x27;react&#x27;</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> ReactMapGL <span class="token keyword">from</span> <span class="token string">&#x27;react-map-gl&#x27;</span><span class="token punctuation">;</span>
<span class="token keyword">class</span> <span class="token class-name">Map</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>
<span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">return</span> <span class="token punctuation">(</span>
<span class="token operator">&lt;</span>ReactMapGL
width<span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">400</span><span class="token punctuation">}</span>
height<span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">400</span><span class="token punctuation">}</span>
latitude<span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">37.7577</span><span class="token punctuation">}</span>
longitude<span class="token operator">=</span><span class="token punctuation">{</span><span class="token operator">-</span><span class="token number">122.4376</span><span class="token punctuation">}</span>
zoom<span class="token operator">=</span><span class="token punctuation">{</span><span class="token number">8</span><span class="token punctuation">}</span>
onViewportChange<span class="token operator">=</span><span class="token punctuation">{</span><span class="token punctuation">(</span><span class="token parameter">viewport</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
<span class="token keyword">const</span> <span class="token punctuation">{</span>width<span class="token punctuation">,</span> height<span class="token punctuation">,</span> latitude<span class="token punctuation">,</span> longitude<span class="token punctuation">,</span> zoom<span class="token punctuation">}</span> <span class="token operator">=</span> viewport<span class="token punctuation">;</span>
<span class="token comment">// call `setState` and use the state to update the map.</span>
<span class="token punctuation">}</span><span class="token punctuation">}</span>
<span class="token operator">/</span><span class="token operator">&gt;</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre></div>
<h2 style="position:relative" id="properties" class="typography__H2-sc-1pmaksm-3 kUifx"><a href="#properties" aria-label="properties permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Properties</h2>
<h3 style="position:relative" id="initialization" class="typography__H3-sc-1pmaksm-4 duevmh"><a href="#initialization" aria-label="initialization permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Initialization</h3>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Inherit the following props from <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/static-map">StaticMap</a>:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">attributionControl</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">disableTokenWarning</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">gl</code> (WebGLContext)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">mapboxApiAccessToken</code> (String)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">mapboxApiUrl</code> (String)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">mapOptions</code> (Object)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">preserveDrawingBuffer</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">preventStyleDiffing</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">reuseMaps</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transformRequest</code> (Function)</li>
</ul>
<h3 style="position:relative" id="map-state" class="typography__H3-sc-1pmaksm-4 duevmh"><a href="#map-state" aria-label="map state permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Map State</h3>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Inherit the following props from <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/static-map">StaticMap</a>:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">mapStyle</code> (String | Object | Immutable.Map)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">width</code> (Number | String)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">height</code> (Number | String)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">latitude</code> (Number)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">longitude</code> (Number)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">zoom</code> (Number)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">bearing</code> (Number)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">pitch</code> (Number)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">altitude</code> (Number)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">viewState</code> (Object)</li>
</ul>
<h3 style="position:relative" id="render-options" class="typography__H3-sc-1pmaksm-4 duevmh"><a href="#render-options" aria-label="render options permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Render Options</h3>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Inherit the following props from <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/static-map">StaticMap</a>:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">style</code> (Object)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">visible</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">visibilityConstraints</code> (Object)</li>
</ul>
<h5 style="position:relative" id="getcursor" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#getcursor" aria-label="code classlanguage textgetcursorcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">getCursor</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Accessor that returns a cursor style to show interactive state. Called when the component is being rendered.</p>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Parameters</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">
<p class="typography__P-sc-1pmaksm-8 cncNYa"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">state</code> - The current state of the component.</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">state.isDragging</code> - If the map is being dragged.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">state.isHovering</code> - If the pointer is over an interactive feature. See <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactiveLayerIds</code> prop.</li>
</ul>
</li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">The default implementation of <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">getCursor</code> returns <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">&#x27;pointer&#x27;</code> if <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">isHovering</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">&#x27;grabbing&#x27;</code> if <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">isDragging</code> and <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">&#x27;grab&#x27;</code> otherwise.</p>
<h3 style="position:relative" id="interaction-options" class="typography__H3-sc-1pmaksm-4 duevmh"><a href="#interaction-options" aria-label="interaction options permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Interaction Options</h3>
<h5 style="position:relative" id="maxzoom" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#maxzoom" aria-label="code classlanguage textmaxzoomcode number permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">maxZoom</code> (Number)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">20</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Max zoom level.</p>
<h5 style="position:relative" id="minzoom" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#minzoom" aria-label="code classlanguage textminzoomcode number permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">minZoom</code> (Number)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">0</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Min zoom level.</p>
<h5 style="position:relative" id="maxpitch" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#maxpitch" aria-label="code classlanguage textmaxpitchcode number permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">maxPitch</code> (Number)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">60</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Max pitch in degrees.</p>
<h5 style="position:relative" id="minpitch" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#minpitch" aria-label="code classlanguage textminpitchcode number permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">minPitch</code> (Number)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">0</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Min pitch in degrees.</p>
<h5 style="position:relative" id="scrollzoom" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#scrollzoom" aria-label="code classlanguage textscrollzoomcode boolean permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">scrollZoom</code> (Boolean)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">true</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Enable scroll to zoom.</p>
<h5 style="position:relative" id="dragpan" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#dragpan" aria-label="code classlanguage textdragpancode boolean permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">dragPan</code> (Boolean)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">true</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Enable drag to pan.</p>
<h5 style="position:relative" id="dragrotate" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#dragrotate" aria-label="code classlanguage textdragrotatecode boolean permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">dragRotate</code> (Boolean)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">true</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Enable drag to rotate.</p>
<h5 style="position:relative" id="doubleclickzoom" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#doubleclickzoom" aria-label="code classlanguage textdoubleclickzoomcode boolean permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">doubleClickZoom</code> (Boolean)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">true</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Enable double click to zoom.</p>
<h5 style="position:relative" id="touchzoom" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#touchzoom" aria-label="code classlanguage texttouchzoomcode boolean permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">touchZoom</code> (Boolean)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">true</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Enable multitouch zoom.</p>
<h5 style="position:relative" id="touchrotate" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#touchrotate" aria-label="code classlanguage texttouchrotatecode boolean permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">touchRotate</code> (Boolean)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">false</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Enable multitouch rotate.</p>
<h5 style="position:relative" id="touchaction" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#touchaction" aria-label="code classlanguage texttouchactioncode string permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">touchAction</code> (String)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">&#x27;none&#x27;</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Allow browser default touch actions. Default <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">none</code>. See <a href="http://hammerjs.github.io/touch-action/" class="typography__A-sc-1pmaksm-0 ewhNJT">hammer.js doc</a>.</p>
<p class="typography__P-sc-1pmaksm-8 cncNYa">By default, the map captures all touch interactions. This prop is useful for mobile applications to unblock default scrolling behavior. For example, use the combination <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">dragPan: false</code> and <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">touchAction: &#x27;pan-y&#x27;</code> to allow vertical page scroll when dragging over the map.</p>
<h5 style="position:relative" id="clickradius" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#clickradius" aria-label="code classlanguage textclickradiuscode number permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">clickRadius</code> (Number)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">0</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Radius to detect features around a clicked point.</p>
<h5 style="position:relative" id="controller" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#controller" aria-label="code classlanguage textcontrollercode object permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">controller</code> (Object)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">A map controller instance to replace the default map controller.</p>
<p class="typography__P-sc-1pmaksm-8 cncNYa">This object must implement the following interface:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">events</code> - An array of subscribed events</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">handleEvent(event, context)</code> - A method that handles interactive events</li>
</ul>
<h5 style="position:relative" id="interactivelayerids" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#interactivelayerids" aria-label="code classlanguage textinteractivelayeridscode array permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactiveLayerIds</code> (Array)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">null</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">A list of layer ids that are interactive. If specified:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">Pointer event callbacks will only query the features under the pointer of these layers.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">The <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">getCursor</code> callback will receive <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">isHovering: true</code> when hover over features of these layers.</li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">If not specified:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">Pointer event callbacks will query the features under the pointer of all layers.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">The <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">getCursor</code> callback will always receive <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">isHovering: false</code>.</li>
</ul>
<h3 style="position:relative" id="transitions" class="typography__H3-sc-1pmaksm-4 duevmh"><a href="#transitions" aria-label="transitions permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Transitions</h3>
<h5 style="position:relative" id="transitionduration" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#transitionduration" aria-label="code classlanguage texttransitiondurationcode number permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionDuration</code> (Number)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">0</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Duration of transition in milliseconds. If specified, the map&#x27;s viewport will smoothly move from the previous props to the current one.</p>
<h5 style="position:relative" id="transitioninterpolator" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#transitioninterpolator" aria-label="code classlanguage texttransitioninterpolatorcode object permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionInterpolator</code> (Object)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">new LinearInterpolator()</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">An interpolator object that defines the transition behavior between two map states. <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">react-map-gl</code> offers two interpolators:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">LinearInterpolator</code> - similar to Mapbox&#x27;s <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">easeTo</code> behavior.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">FlyToInterpolator</code> - similar to Mapbox&#x27;s <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">flyTo</code> behavior.</li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">You may import them as follows:</p>
<div class="gatsby-highlight" data-language="jsx"><pre class="typography__Pre-sc-1pmaksm-14 dcdkiM language-jsx"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-jsx"><span class="token keyword">import</span> ReactMapGL<span class="token punctuation">,</span> <span class="token punctuation">{</span>LinearInterpolator<span class="token punctuation">,</span> FlyToInterpolator<span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&#x27;react-map-gl&#x27;</span><span class="token punctuation">;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span><span class="token class-name">ReactMapGL</span></span> <span class="token attr-name">transitionDuration</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token number">1000</span><span class="token punctuation">}</span></span> <span class="token attr-name">transitionInterpolator</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">new</span> <span class="token class-name">FlyToInterpolator</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">}</span></span><span class="token punctuation">&gt;</span></span></code></pre></div>
<p class="typography__P-sc-1pmaksm-8 cncNYa">For details about using transition interpolators, see <a href="/react-map-gl/docs/advanced/viewport-transitions.md" class="typography__A-sc-1pmaksm-0 ewhNJT">transitions</a>.</p>
<h5 style="position:relative" id="transitioneasing" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#transitioneasing" aria-label="code classlanguage texttransitioneasingcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionEasing</code> (Function)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">t =&gt; t</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Easing function that maps a value from <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">[0, 1]</code> to <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">[0, 1]</code>. Check out <a href="http://easings.net/" class="typography__A-sc-1pmaksm-0 ewhNJT">http://easings.net/</a> for common easing curves.</p>
<h5 style="position:relative" id="transitioninterruption" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#transitioninterruption" aria-label="code classlanguage texttransitioninterruptioncode number permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionInterruption</code> (Number)</h5>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy">default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">TRANSITION_EVENTS.BREAK</code></li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">What to do if an ongoing transition is interrupted by another transition. There are 4 options:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">TRANSITION_EVENTS.BREAK</code> - Start new transition from the current view.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">TRANSITION_EVENTS.SNAP_TO_END</code> - Jump to the end of the previous transition before starting the new transition.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">TRANSITION_EVENTS.IGNORE</code> - Complete the previous transition and ignore the new viewport change.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">TRANSITION_EVENTS.UPDATE</code> - Continue the ongoing transition but change its destination to the new viewport.</li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">You may import the constants as follows:</p>
<div class="gatsby-highlight" data-language="js"><pre class="typography__Pre-sc-1pmaksm-14 dcdkiM language-js"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-js"><span class="token keyword">import</span> <span class="token punctuation">{</span><span class="token constant">TRANSITION_EVENTS</span><span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&#x27;react-map-gl&#x27;</span><span class="token punctuation">;</span></code></pre></div>
<h3 style="position:relative" id="callbacks" class="typography__H3-sc-1pmaksm-4 duevmh"><a href="#callbacks" aria-label="callbacks permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Callbacks</h3>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Inherit the following props from <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/static-map">StaticMap</a>:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onLoad</code> (Function)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onResize</code> (Function)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onError</code> (Function)</li>
</ul>
<h5 style="position:relative" id="onviewportchange" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onviewportchange" aria-label="code classlanguage textonviewportchangecode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onViewportChange</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Callback that is fired when the map&#x27;s viewport properties should be updated. If not supplied, the map is not interactive.</p>
<div class="gatsby-highlight" data-language="js"><pre class="typography__Pre-sc-1pmaksm-14 dcdkiM language-js"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-js"><span class="token function">onViewportChange</span><span class="token punctuation">(</span>viewState<span class="token punctuation">,</span> interactionState<span class="token punctuation">,</span> oldViewState<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre></div>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Arguments:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">viewState</code> (Object) The next viewport properties, including: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">width</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">height</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">latitude</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">longitude</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">zoom</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">bearing</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">pitch</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">altitude</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">maxZoom</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">minZoom</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">maxPitch</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">minPitch</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionDuration</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionEasing</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionInterpolator</code>, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">transitionInterruption</code>.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactionState</code> (Object) The current interaction that caused this viewport change. See <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onInteractionStateChange</code> for possible fields.</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">oldViewState</code> (Object) The current viewport properties.</li>
</ul>
<h5 style="position:relative" id="onviewstatechange" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onviewstatechange" aria-label="code classlanguage textonviewstatechangecode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onViewStateChange</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">A newer version of the <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onViewportChange</code> callback. Both are supported and provide equivalent functionality.</p>
<div class="gatsby-highlight" data-language="js"><pre class="typography__Pre-sc-1pmaksm-14 dcdkiM language-js"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-js"><span class="token function">onViewStateChange</span><span class="token punctuation">(</span><span class="token punctuation">{</span>viewState<span class="token punctuation">,</span> interactionState<span class="token punctuation">,</span> oldViewState<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre></div>
<h5 style="position:relative" id="oninteractionstatechange" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#oninteractionstatechange" aria-label="code classlanguage textoninteractionstatechangecode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onInteractionStateChange</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Callback that is fired when the user interacted with the map.</p>
<div class="gatsby-highlight" data-language="js"><pre class="typography__Pre-sc-1pmaksm-14 dcdkiM language-js"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-js"><span class="token function">onInteractionStateChange</span><span class="token punctuation">(</span>interactionState<span class="token punctuation">)</span></code></pre></div>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Possible fields include:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactionState.inTransition</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactionState.isDragging</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactionState.isPanning</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactionState.isRotating</code> (Boolean)</li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactionState.isZooming</code> (Boolean)</li>
</ul>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Note:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onInteractionStateChange</code> may be fired without <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onViewportChange</code>. For example, when the pointer is released at the end of a drag-pan, <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">isDragging</code> are reset to <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">false</code>, without the viewport&#x27;s <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">longitude</code> and <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">latitude</code> changing.</li>
</ul>
<h5 style="position:relative" id="onhover" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onhover" aria-label="code classlanguage textonhovercode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onHover</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when the mouse moves over the map (without button pressed). Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onclick" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onclick" aria-label="code classlanguage textonclickcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onClick</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when the map is single clicked. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object. This event is not fired on double click therefore there may be a delay between pointer up and the event.</p>
<h5 style="position:relative" id="onnativeclick" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onnativeclick" aria-label="code classlanguage textonnativeclickcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onNativeClick</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when the map is clicked. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object. This event is fired twice on double click.</p>
<h5 style="position:relative" id="ondblclick" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#ondblclick" aria-label="code classlanguage textondblclickcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onDblClick</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when the map is double clicked. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onmousedown" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onmousedown" aria-label="code classlanguage textonmousedowncode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onMouseDown</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a pointing device (usually a mouse) is pressed within the map. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onmousemove" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onmousemove" aria-label="code classlanguage textonmousemovecode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onMouseMove</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a pointing device (usually a mouse) is moved within the map. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onmouseup" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onmouseup" aria-label="code classlanguage textonmouseupcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onMouseUp</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a pointing device (usually a mouse) is released within the map. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="ontouchstart" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#ontouchstart" aria-label="code classlanguage textontouchstartcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onTouchStart</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">touchstart</code> event occurs within the map. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="ontouchmove" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#ontouchmove" aria-label="code classlanguage textontouchmovecode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onTouchMove</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">touchmove</code> event occurs within the map. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="ontouchend" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#ontouchend" aria-label="code classlanguage textontouchendcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onTouchEnd</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">touchend</code> event occurs within the map. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onmouseenter" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onmouseenter" aria-label="code classlanguage textonmouseentercode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onMouseEnter</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a pointing device (usually a mouse) enters a visible portion of one of the interactive layers, defined by the <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactiveLayerIds</code> prop. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onmouseleave" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onmouseleave" aria-label="code classlanguage textonmouseleavecode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onMouseLeave</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a pointing device (usually a mouse) leaves a visible portion of one of the interactive layers, defined by the <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">interactiveLayerIds</code> prop. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onwheel" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onwheel" aria-label="code classlanguage textonwheelcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onWheel</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">wheel</code> event occurs within the map. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="onmouseout" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#onmouseout" aria-label="code classlanguage textonmouseoutcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onMouseOut</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when a point device (usually a mouse) leaves the map&#x27;s canvas. Receives a <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/pointer-event">PointerEvent</a> object.</p>
<h5 style="position:relative" id="oncontextmenu" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#oncontextmenu" aria-label="code classlanguage textoncontextmenucode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onContextMenu</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Called when the context menu is activated. Prevent default here to enable right button interaction.</p>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Default: <code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">event =&gt; event.preventDefault()</code></p>
<h5 style="position:relative" id="ontransitionstart" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#ontransitionstart" aria-label="code classlanguage textontransitionstartcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onTransitionStart</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Callback that is fired when a transition is triggered.</p>
<h5 style="position:relative" id="ontransitioninterrupt" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#ontransitioninterrupt" aria-label="code classlanguage textontransitioninterruptcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onTransitionInterrupt</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Callback that is fired when an ongoing transition is interrupted by another transition.</p>
<h5 style="position:relative" id="ontransitionend" class="typography__H5-sc-1pmaksm-6 kPzBbv"><a href="#ontransitionend" aria-label="code classlanguage textontransitionendcode function permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">onTransitionEnd</code> (Function)</h5>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Callback that is fired when a transition is complete.</p>
<h2 style="position:relative" id="methods" class="typography__H2-sc-1pmaksm-3 kUifx"><a href="#methods" aria-label="methods permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Methods</h2>
<p class="typography__P-sc-1pmaksm-8 cncNYa">Inherit the following methods from <a class="typography__GatsbyA-sc-1pmaksm-1 dFJdWN" href="/react-map-gl/docs/api-reference/static-map">StaticMap</a>:</p>
<ul class="typography__List-sc-1pmaksm-9 hsOfQe">
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">getMap()</code></li>
<li class="typography__ListItem-sc-1pmaksm-10 kVRSNy"><code class="typography__InlineCode-sc-1pmaksm-12 cVbpdr language-text">queryRenderedFeatures(geometry, parameters)</code></li>
</ul>
<h2 style="position:relative" id="source" class="typography__H2-sc-1pmaksm-3 kUifx"><a href="#source" aria-label="source permalink" class="typography__A-sc-1pmaksm-0 ewhNJT anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Source</h2>
<p class="typography__P-sc-1pmaksm-8 cncNYa"><a href="https://github.com/uber/react-map-gl/tree/5.2-release/src/components/interactive-map.js" class="typography__A-sc-1pmaksm-0 ewhNJT">interactive-map.js</a></p></div></div></div></div></div></div></div></div><script id="gatsby-script-loader">/*<![CDATA[*/window.pagePath="/docs/api-reference/interactive-map";/*]]>*/</script><script id="gatsby-chunk-mapping">/*<![CDATA[*/window.___chunkMapping={"app":["/app-509e2070aec193b8a67f.js"],"component---src-home-js":["/component---src-home-js-5567f17f64fafd54b99f.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx-bc2b92ef9855af2673f6.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-examples-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-examples-jsx-ebadec786762b14117ce.js"],"component---examples-layers-src-app-js":["/component---examples-layers-src-app-js-0ca00b6efcf12c356533.js"],"component---examples-controls-src-app-js":["/component---examples-controls-src-app-js-9385631f409fcb6f6d30.js"],"component---examples-custom-cursor-src-app-js":["/component---examples-custom-cursor-src-app-js-e53df838b76b9e8a878d.js"],"component---examples-draggable-markers-src-app-js":["/component---examples-draggable-markers-src-app-js-ef2b15826e6c37659257.js"],"component---examples-geojson-src-app-js":["/component---examples-geojson-src-app-js-7640ef4343482e4941f4.js"],"component---examples-geojson-animation-src-app-js":["/component---examples-geojson-animation-src-app-js-4124fa82dc370367b642.js"],"component---examples-clusters-src-app-js":["/component---examples-clusters-src-app-js-d01467258de71693e0fa.js"],"component---examples-locate-user-src-app-js":["/component---examples-locate-user-src-app-js-7d9fccdd44147c143435.js"],"component---examples-interaction-src-app-js":["/component---examples-interaction-src-app-js-cc82d672cc2091e15622.js"],"component---examples-viewport-animation-src-app-js":["/component---examples-viewport-animation-src-app-js-1c97791be7a1455e6a31.js"],"component---examples-filter-src-app-js":["/component---examples-filter-src-app-js-6c8edb41435526128e70.js"],"component---examples-zoom-to-bounds-src-app-js":["/component---examples-zoom-to-bounds-src-app-js-3195e542ef4c2dd8d826.js"],"component---examples-heatmap-src-app-js":["/component---examples-heatmap-src-app-js-0525c25f5c4d5bd72dfe.js"],"component---examples-draw-polygon-src-app-js":["/component---examples-draw-polygon-src-app-js-0f17310fe89f108bbbae.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-search-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-search-jsx-b85c4e0d9b18863e5a9a.js"]};/*]]>*/</script><script src="/react-map-gl/component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx-bc2b92ef9855af2673f6.js" async=""></script><script src="/react-map-gl/commons-7eb79b70fb79e9d91272.js" async=""></script><script src="/react-map-gl/app-509e2070aec193b8a67f.js" async=""></script><script src="/react-map-gl/webpack-runtime-68f906e2b4e22da0fc24.js" async=""></script></body></html>