├── .eslintignore
├── .eslintrc.cjs
├── .github
├── ISSUE_TEMPLATE
│ ├── bug-report.yml
│ ├── config.yml
│ └── feature-request.yml
├── SECURITY.md
└── workflows
│ ├── release.yml
│ ├── test.yml
│ └── website.yml
├── .gitignore
├── .ocularrc.js
├── .prettierrc
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── TESTING.md
├── docs
├── .gitignore
├── README.md
├── api-reference
│ ├── mapbox
│ │ ├── attribution-control.md
│ │ ├── fullscreen-control.md
│ │ ├── geolocate-control.md
│ │ ├── layer.md
│ │ ├── map-provider.md
│ │ ├── map.md
│ │ ├── marker.md
│ │ ├── navigation-control.md
│ │ ├── popup.md
│ │ ├── scale-control.md
│ │ ├── source.md
│ │ ├── types.md
│ │ ├── use-control.md
│ │ └── use-map.md
│ └── maplibre
│ │ ├── attribution-control.md
│ │ ├── fullscreen-control.md
│ │ ├── geolocate-control.md
│ │ ├── layer.md
│ │ ├── logo-control.md
│ │ ├── map-provider.md
│ │ ├── map.md
│ │ ├── marker.md
│ │ ├── navigation-control.md
│ │ ├── popup.md
│ │ ├── scale-control.md
│ │ ├── source.md
│ │ ├── terrain-control.md
│ │ ├── types.md
│ │ ├── use-control.md
│ │ └── use-map.md
├── contributing.md
├── get-started
│ ├── adding-custom-data.md
│ ├── get-started.md
│ ├── mapbox-tokens.md
│ ├── state-management.md
│ └── tips-and-tricks.md
├── table-of-contents.json
├── upgrade-guide.md
└── whats-new.md
├── examples
├── .data
│ ├── bart-station.json
│ ├── cities.json
│ ├── feature-example-sf.json
│ ├── us-election-2016.json
│ └── us-income.geojson
├── .eslintrc
├── get-started
│ ├── basic
│ │ ├── README.md
│ │ ├── app.jsx
│ │ ├── index.html
│ │ ├── package.json
│ │ └── vite.config.js
│ ├── controlled
│ │ ├── README.md
│ │ ├── app.jsx
│ │ ├── index.html
│ │ ├── package.json
│ │ └── vite.config.js
│ ├── hook
│ │ ├── README.md
│ │ ├── app.jsx
│ │ ├── controls.jsx
│ │ ├── controls2.jsx
│ │ ├── index.html
│ │ ├── map.jsx
│ │ ├── package.json
│ │ └── vite.config.js
│ ├── maplibre
│ │ ├── README.md
│ │ ├── app.jsx
│ │ ├── index.html
│ │ └── package.json
│ ├── nextjs
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── next.config.js
│ │ ├── package.json
│ │ └── pages
│ │ │ ├── _app.js
│ │ │ └── index.js
│ └── redux
│ │ ├── README.md
│ │ ├── app.jsx
│ │ ├── controls.jsx
│ │ ├── index.html
│ │ ├── map.jsx
│ │ ├── package.json
│ │ ├── store.js
│ │ └── vite.config.js
├── mapbox
│ ├── clusters
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── layers.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── controls
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── pin.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── custom-cursor
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── custom-overlay
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── custom-overlay.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── deckgl-overlay
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ └── app.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── draggable-markers
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── pin.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── draw-polygon
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── draw-control.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── filter
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── map-style.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── geocoder
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── geocoder-control.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── geojson-animation
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── geojson
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ ├── map-style.ts
│ │ │ └── utils.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── heatmap
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── map-style.ts
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── interaction
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── layers
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── map-style-basic-v8.json
│ ├── side-by-side
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── terrain
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ ├── viewport-animation
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ └── zoom-to-bounds
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ ├── app.tsx
│ │ ├── control-panel.tsx
│ │ └── map-style.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
├── maplibre
│ ├── clusters
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── layers.ts
│ │ └── tsconfig.json
│ ├── controls
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── pin.tsx
│ │ └── tsconfig.json
│ ├── custom-cursor
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ ├── custom-overlay
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── custom-overlay.tsx
│ │ └── tsconfig.json
│ ├── deckgl-overlay
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ └── app.tsx
│ │ └── tsconfig.json
│ ├── draggable-markers
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── pin.tsx
│ │ └── tsconfig.json
│ ├── draw-polygon
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── draw-control.ts
│ │ └── tsconfig.json
│ ├── filter
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── map-style.ts
│ │ └── tsconfig.json
│ ├── geocoder
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── geocoder-control.tsx
│ │ └── tsconfig.json
│ ├── geojson-animation
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ ├── geojson
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ ├── map-style.ts
│ │ │ └── utils.ts
│ │ └── tsconfig.json
│ ├── globe
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ ├── heatmap
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ ├── control-panel.tsx
│ │ │ └── map-style.ts
│ │ └── tsconfig.json
│ ├── interaction
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ ├── layers
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ ├── map-style-basic-v8.json
│ ├── side-by-side
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ ├── terrain
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ ├── viewport-animation
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── app.tsx
│ │ │ └── control-panel.tsx
│ │ └── tsconfig.json
│ └── zoom-to-bounds
│ │ ├── README.md
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ ├── app.tsx
│ │ ├── control-panel.tsx
│ │ └── map-style.tsx
│ │ └── tsconfig.json
└── vite.config.local.js
├── index.html
├── lerna.json
├── modules
├── main
│ ├── README.md
│ ├── package.json
│ ├── src
│ │ ├── mapbox-legacy
│ │ │ ├── components
│ │ │ │ ├── attribution-control.ts
│ │ │ │ ├── fullscreen-control.ts
│ │ │ │ ├── geolocate-control.ts
│ │ │ │ ├── layer.ts
│ │ │ │ ├── map.tsx
│ │ │ │ ├── marker.ts
│ │ │ │ ├── navigation-control.ts
│ │ │ │ ├── popup.ts
│ │ │ │ ├── scale-control.ts
│ │ │ │ ├── source.ts
│ │ │ │ ├── use-control.ts
│ │ │ │ └── use-map.tsx
│ │ │ ├── index.ts
│ │ │ ├── mapbox
│ │ │ │ ├── create-ref.ts
│ │ │ │ └── mapbox.ts
│ │ │ ├── types
│ │ │ │ ├── common.ts
│ │ │ │ ├── events.ts
│ │ │ │ ├── internal.ts
│ │ │ │ ├── lib.ts
│ │ │ │ └── style-spec.ts
│ │ │ └── utils
│ │ │ │ ├── apply-react-style.ts
│ │ │ │ ├── assert.ts
│ │ │ │ ├── deep-equal.ts
│ │ │ │ ├── set-globals.ts
│ │ │ │ ├── style-utils.ts
│ │ │ │ ├── transform.ts
│ │ │ │ └── use-isomorphic-layout-effect.ts
│ │ ├── mapbox.ts
│ │ └── maplibre.ts
│ ├── test
│ │ ├── components
│ │ │ ├── controls.spec.jsx
│ │ │ ├── index.js
│ │ │ ├── layer.spec.jsx
│ │ │ ├── map.spec.jsx
│ │ │ ├── marker.spec.jsx
│ │ │ ├── popup.spec.jsx
│ │ │ ├── source.spec.jsx
│ │ │ └── use-map.spec.jsx
│ │ └── utils
│ │ │ ├── apply-react-style.spec.js
│ │ │ ├── deep-equal.spec.js
│ │ │ ├── index.js
│ │ │ ├── mapbox-gl-mock
│ │ │ ├── edge_insets.js
│ │ │ ├── lng_lat.js
│ │ │ ├── lng_lat_bounds.js
│ │ │ ├── transform.js
│ │ │ └── util.js
│ │ │ ├── style-utils.spec.js
│ │ │ ├── test-utils.jsx
│ │ │ └── transform.spec.js
│ └── tsconfig.json
├── react-mapbox
│ ├── package.json
│ ├── src
│ │ ├── components
│ │ │ ├── attribution-control.ts
│ │ │ ├── fullscreen-control.ts
│ │ │ ├── geolocate-control.ts
│ │ │ ├── layer.ts
│ │ │ ├── map.tsx
│ │ │ ├── marker.ts
│ │ │ ├── navigation-control.ts
│ │ │ ├── popup.ts
│ │ │ ├── scale-control.ts
│ │ │ ├── source.ts
│ │ │ ├── use-control.ts
│ │ │ └── use-map.tsx
│ │ ├── index.ts
│ │ ├── mapbox
│ │ │ ├── create-ref.ts
│ │ │ ├── mapbox.ts
│ │ │ └── proxy-transform.ts
│ │ ├── types
│ │ │ ├── common.ts
│ │ │ ├── events.ts
│ │ │ ├── internal.ts
│ │ │ ├── lib.ts
│ │ │ └── style-spec.ts
│ │ └── utils
│ │ │ ├── apply-react-style.ts
│ │ │ ├── assert.ts
│ │ │ ├── compare-class-names.ts
│ │ │ ├── deep-equal.ts
│ │ │ ├── set-globals.ts
│ │ │ ├── style-utils.ts
│ │ │ ├── transform.ts
│ │ │ └── use-isomorphic-layout-effect.ts
│ ├── test
│ │ ├── components
│ │ │ ├── controls.spec.jsx
│ │ │ ├── index.js
│ │ │ ├── layer.spec.jsx
│ │ │ ├── map.spec.jsx
│ │ │ ├── marker.spec.jsx
│ │ │ ├── popup.spec.jsx
│ │ │ ├── source.spec.jsx
│ │ │ └── use-map.spec.jsx
│ │ └── utils
│ │ │ ├── apply-react-style.spec.js
│ │ │ ├── compare-class-names.spec.js
│ │ │ ├── deep-equal.spec.js
│ │ │ ├── index.js
│ │ │ ├── mapbox-gl-mock
│ │ │ ├── edge_insets.js
│ │ │ ├── lng_lat.js
│ │ │ ├── lng_lat_bounds.js
│ │ │ ├── transform.js
│ │ │ └── util.js
│ │ │ ├── style-utils.spec.js
│ │ │ ├── test-utils.jsx
│ │ │ ├── token.js
│ │ │ └── transform.spec.js
│ └── tsconfig.json
└── react-maplibre
│ ├── package.json
│ ├── src
│ ├── components
│ │ ├── attribution-control.ts
│ │ ├── fullscreen-control.ts
│ │ ├── geolocate-control.ts
│ │ ├── layer.ts
│ │ ├── logo-control.ts
│ │ ├── map.tsx
│ │ ├── marker.ts
│ │ ├── navigation-control.ts
│ │ ├── popup.ts
│ │ ├── scale-control.ts
│ │ ├── source.ts
│ │ ├── terrain-control.ts
│ │ ├── use-control.ts
│ │ └── use-map.tsx
│ ├── index.ts
│ ├── maplibre
│ │ ├── create-ref.ts
│ │ └── maplibre.ts
│ ├── types
│ │ ├── common.ts
│ │ ├── events.ts
│ │ ├── internal.ts
│ │ ├── lib.ts
│ │ └── style-spec.ts
│ └── utils
│ │ ├── apply-react-style.ts
│ │ ├── assert.ts
│ │ ├── compare-class-names.ts
│ │ ├── deep-equal.ts
│ │ ├── set-globals.ts
│ │ ├── style-utils.ts
│ │ ├── transform.ts
│ │ └── use-isomorphic-layout-effect.ts
│ ├── test
│ ├── .eslintrc
│ ├── components
│ │ ├── controls.spec.jsx
│ │ ├── index.js
│ │ ├── layer.spec.jsx
│ │ ├── map.spec.jsx
│ │ ├── marker.spec.jsx
│ │ ├── popup.spec.jsx
│ │ ├── source.spec.jsx
│ │ └── use-map.spec.jsx
│ └── utils
│ │ ├── apply-react-style.spec.js
│ │ ├── compare-class-names.spec.js
│ │ ├── deep-equal.spec.js
│ │ ├── index.js
│ │ ├── style-utils.spec.js
│ │ ├── test-utils.jsx
│ │ └── transform.spec.js
│ └── tsconfig.json
├── package.json
├── scripts
└── update-release-branch.sh
├── test
├── .eslintrc
├── apps
│ └── reuse-maps
│ │ ├── index.html
│ │ ├── package.json
│ │ ├── src
│ │ └── app.tsx
│ │ ├── tsconfig.json
│ │ └── vite.config.js
├── browser.js
├── data
│ ├── glyph
│ │ └── UberMove
│ │ │ └── 0-255
│ ├── sprite
│ │ └── tools
│ │ │ └── 14
│ │ │ ├── sprites.json
│ │ │ └── sprites.png
│ ├── style.json
│ └── tile
│ │ └── v1
│ │ └── 12
│ │ └── 655
│ │ ├── 1582
│ │ ├── COMPOSITE
│ │ └── POI
│ │ └── 1583
│ │ ├── COMPOSITE
│ │ └── POI
├── node.js
├── render
│ ├── golden-images
│ │ ├── alt-empty-map.png
│ │ ├── basic-map.png
│ │ ├── geolocate-control.png
│ │ ├── marker.png
│ │ ├── navigation-control.png
│ │ ├── popup.png
│ │ ├── source-01.png
│ │ ├── source-02.png
│ │ └── uber-map.png
│ ├── index.jsx
│ └── test-cases.jsx
├── size
│ ├── mapbox-legacy.js
│ ├── mapbox.js
│ └── maplibre.js
├── src
│ └── exports.ts
└── test-utils.js
├── tsconfig.json
├── website
├── .eslintignore
├── .gitignore
├── babel.config.js
├── docusaurus.config.js
├── package.json
├── src
│ ├── examples
│ │ ├── index.mdx
│ │ ├── mapbox
│ │ │ ├── clusters.mdx
│ │ │ ├── controls.mdx
│ │ │ ├── custom-cursor.mdx
│ │ │ ├── draggable-markers.mdx
│ │ │ ├── draw-polygon.mdx
│ │ │ ├── filter.mdx
│ │ │ ├── geocoder.mdx
│ │ │ ├── geojson-animation.mdx
│ │ │ ├── geojson.mdx
│ │ │ ├── heatmap.mdx
│ │ │ ├── interaction.mdx
│ │ │ ├── layers.mdx
│ │ │ ├── side-by-side.mdx
│ │ │ ├── terrain.mdx
│ │ │ ├── viewport-animation.mdx
│ │ │ └── zoom-to-bounds.mdx
│ │ ├── maplibre
│ │ │ ├── clusters.mdx
│ │ │ ├── controls.mdx
│ │ │ ├── custom-cursor.mdx
│ │ │ ├── draggable-markers.mdx
│ │ │ ├── draw-polygon.mdx
│ │ │ ├── filter.mdx
│ │ │ ├── geocoder.mdx
│ │ │ ├── geojson-animation.mdx
│ │ │ ├── geojson.mdx
│ │ │ ├── heatmap.mdx
│ │ │ ├── interaction.mdx
│ │ │ ├── layers.mdx
│ │ │ ├── side-by-side.mdx
│ │ │ ├── terrain.mdx
│ │ │ ├── viewport-animation.mdx
│ │ │ └── zoom-to-bounds.mdx
│ │ └── table-of-contents.json
│ ├── mapbox-gl.css
│ ├── maplibre-gl.css
│ ├── pages
│ │ └── index.jsx
│ └── styles.css
├── static
│ ├── favicon.ico
│ └── images
│ │ ├── examples
│ │ ├── clusters.jpg
│ │ ├── controls.jpg
│ │ ├── custom-cursor.jpg
│ │ ├── draggable-markers.jpg
│ │ ├── draw-polygon.jpg
│ │ ├── filter.jpg
│ │ ├── geocoder.jpg
│ │ ├── geojson-animation.jpg
│ │ ├── geojson.jpg
│ │ ├── heatmap.jpg
│ │ ├── interaction.jpg
│ │ ├── layers.jpg
│ │ ├── side-by-side.jpg
│ │ ├── terrain.jpg
│ │ ├── viewport-animation.jpg
│ │ └── zoom-to-bounds.jpg
│ │ ├── hero-sm.jpg
│ │ ├── hero.jpg
│ │ ├── icon-high-precision.svg
│ │ ├── icon-layers.svg
│ │ ├── icon-react.svg
│ │ ├── visgl-logo-dark.png
│ │ ├── visgl-logo-light.png
│ │ └── visgl-logo.png
└── yarn.lock
└── yarn.lock
/.eslintignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 | test/
4 | modules/**/test/
5 | **/vite.config.js
6 | examples/vite.config.local.js
7 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: I have a question / I need help
4 | url: https://github.com/visgl/react-map-gl/discussions
5 | about: Ask generic questions or request help here
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request.yml:
--------------------------------------------------------------------------------
1 | name: Feature Request
2 | description: Request for a new feature or enhancement
3 | title: "[Feat]"
4 | labels: feature
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | Tell us what you are using react-map-gl for and how we can make it better.
10 | This project is maintained by volunteers and sponsoring companies. While we cannot promise a timeline for any specific feature, we try to prioritize those that will benefit the most users.
11 | - type: textarea
12 | attributes:
13 | label: Target Use Case
14 | description: How would this benefit you and other developers?
15 | validations:
16 | required: true
17 | - type: textarea
18 | attributes:
19 | label: Proposal
20 | description: How would this feature work? If it's a new API, use code samples to show how it will be used. If it's visual, link to an image that illustrate the desired effect.
21 | validations:
22 | required: true
23 |
--------------------------------------------------------------------------------
/.github/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | Security updates are applied only to the latest release.
6 |
7 | ## Reporting a Vulnerability
8 |
9 | If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released.
10 |
11 | Please disclose it at [security advisory](https://github.com/visgl/react-map-gl/security/advisories/new).
12 |
13 | This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure.
14 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | # On every pull request, but only on push to master
4 | on:
5 | push:
6 | branches:
7 | - master
8 | pull_request:
9 |
10 | jobs:
11 | test-node:
12 | runs-on: ubuntu-22.04
13 |
14 | steps:
15 | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16 | - uses: volta-cli/action@2d68418f32546fd191eb666e232b321d5726484d # v4.1.1
17 | with:
18 | cache: "yarn"
19 |
20 | - name: Install dependencies
21 | run: |
22 | yarn bootstrap
23 |
24 | - name: Run tests
25 | env:
26 | VITE_MAPBOX_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN_CI }}
27 | run: |
28 | yarn lint
29 | yarn test ci
30 |
31 | - name: Coveralls
32 | uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # v1.2.5
33 | with:
34 | github-token: ${{ secrets.GITHUB_TOKEN }}
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
2 | dist-es6/
3 |
4 | node_modules
5 | .nyc_output/
6 | coverage
7 | npm-debug.log
8 |
9 | package-lock.json
10 | examples/**/yarn.lock
11 | test/**/yarn.lock
12 | **/package-lock.json
13 | **/tsconfig.tsbuildinfo
14 | yarn-error.log
15 | .DS_Store
16 | .reify-cache
17 | tsconfig.tsbuildinfo
18 |
19 | .idea
20 |
--------------------------------------------------------------------------------
/.ocularrc.js:
--------------------------------------------------------------------------------
1 | /** @typedef {import('@vis.gl/dev-tools').OcularConfig} OcularConfig */
2 | import {resolve} from 'path';
3 |
4 | /** @type {OcularConfig} */
5 | export default {
6 | lint: {
7 | paths: ['modules', 'test', 'examples']
8 | },
9 |
10 | coverage: {
11 | test: 'browser'
12 | },
13 |
14 | aliases: {
15 | },
16 |
17 | browserTest: {
18 | server: {wait: 5000}
19 | },
20 |
21 | entry: {
22 | test: 'test/node.js',
23 | 'test-browser': 'test/browser.js',
24 | size: [
25 | 'test/size/mapbox-legacy.js',
26 | 'test/size/maplibre.js',
27 | 'test/size/mapbox.js'
28 | ]
29 | }
30 | };
31 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | printWidth: 100
2 | semi: true
3 | singleQuote: true
4 | trailingComma: none
5 | bracketSpacing: false
6 | arrowParens: avoid
7 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | react-map-gl is an [OpenJS Foundation](https://openjsf.org/) project. Please be mindful of and adhere to the OpenJS Foundation's [Code of Conduct](https://github.com/openjs-foundation/cross-project-council/blob/main/CODE_OF_CONDUCT.md) when contributing to react-map-gl.
--------------------------------------------------------------------------------
/TESTING.md:
--------------------------------------------------------------------------------
1 | # Testing
2 |
3 | ## Unit, Lint
4 |
5 | ```
6 | npm run test
7 | ```
8 |
9 | ## Browser
10 |
11 | ```
12 | npm run test-browser
13 | ```
14 |
15 | **You'll need to specify a valid Mapbox Access Token in the URL** for the tests to pass.
16 |
17 | ```
18 | http://localhost:8080/?access_token=MAPBOX_ACCESS_TOKEN
19 | ```
20 |
21 | # Bumping Mapbox Version
22 |
23 | Always pin Mapbox to a specific release.
24 |
25 | The React controls (`NavigationControl`, `Popup` and `Marker`) are dependent on
26 | the Mapbox stylesheet, and may be broken by Mapbox updates.
27 | Always run `examples/controls` after bumping Mapbox version to make sure they
28 | still work.
29 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | api-reference/web-mercator-viewport.md
2 |
--------------------------------------------------------------------------------
/docs/api-reference/mapbox/map-provider.md:
--------------------------------------------------------------------------------
1 | # MapProvider
2 |
3 | A [Context.Provider](https://reactjs.org/docs/context.html#contextprovider) that facilitates map operations outside of the component that directly renders a [Map](./map.md).
4 |
5 | The component should wrap all nodes in which you may want to access the maps:
6 |
7 | ```tsx
8 | import {MapProvider} from 'react-map-gl/mapbox';
9 |
10 | function Root() {
11 | return (
12 |
13 | {
14 | // Application tree, somewhere one or more component(s) are rendered
15 | }
16 |
17 | );
18 | }
19 | ```
20 |
21 | See [useMap](./use-map.md) for more information.
22 |
23 |
24 | ## Source
25 |
26 | [use-map.tsx](https://github.com/visgl/react-map-gl/tree/8.0-release/modules/react-mapbox/src/components/use-map.tsx)
27 |
--------------------------------------------------------------------------------
/docs/api-reference/maplibre/map-provider.md:
--------------------------------------------------------------------------------
1 | # MapProvider
2 |
3 | A [Context.Provider](https://reactjs.org/docs/context.html#contextprovider) that facilitates map operations outside of the component that directly renders a [Map](./map.md).
4 |
5 | The component should wrap all nodes in which you may want to access the maps:
6 |
7 | ```tsx
8 | import {MapProvider} from 'react-map-gl/maplibre';
9 |
10 | function Root() {
11 | return (
12 |
13 | {
14 | // Application tree, somewhere one or more component(s) are rendered
15 | }
16 |
17 | );
18 | }
19 | ```
20 |
21 | See [useMap](./use-map.md) for more information.
22 |
23 |
24 | ## Source
25 |
26 | [use-map.tsx](https://github.com/visgl/react-map-gl/tree/8.0-release/modules/react-maplibre/src/components/use-map.tsx)
27 |
--------------------------------------------------------------------------------
/docs/contributing.md:
--------------------------------------------------------------------------------
1 | ../CONTRIBUTING.md
--------------------------------------------------------------------------------
/examples/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "import/no-unresolved": 0,
4 | "import/no-extraneous-dependencies": 0
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/examples/get-started/basic/README.md:
--------------------------------------------------------------------------------
1 | # react-map-gl Example: Using Map as a stateful component
2 |
3 | This example shows a minimal app configuration to use react-map-gl's Map component with automatic view state updates.
4 |
5 | ## Usage
6 |
7 | To run this example, you need a [Mapbox token](http://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens). You can either set it as `MAPBOX_TOKEN` in `app.js`, or set a `MapboxAccessToken` environment variable in the command line.
8 |
9 | Alternative to acquiring a Mapbox token, visit the [maplibre-gl example](../maplibre).
10 |
11 | ```bash
12 | npm i
13 | npm run start
14 | ```
15 |
16 | To build a production version:
17 |
18 | ```bash
19 | npm run build
20 | ```
21 |
--------------------------------------------------------------------------------
/examples/get-started/basic/app.jsx:
--------------------------------------------------------------------------------
1 | /* global document */
2 | import * as React from 'react';
3 | import {createRoot} from 'react-dom/client';
4 | import Map, {Marker} from 'react-map-gl/mapbox';
5 |
6 | import 'mapbox-gl/dist/mapbox-gl.css';
7 |
8 | const MAPBOX_TOKEN = ''; // Set your mapbox token here
9 |
10 | function Root() {
11 | return (
12 |
24 | );
25 | }
26 |
27 | const root = createRoot(document.body.appendChild(document.createElement('div')));
28 | root.render();
29 |
--------------------------------------------------------------------------------
/examples/get-started/basic/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | react-map-gl Example
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/get-started/basic/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "start": "vite --open",
4 | "build": "vite build"
5 | },
6 | "dependencies": {
7 | "react": "^18.0.0",
8 | "react-dom": "^18.0.0",
9 | "react-map-gl": "^8.0.0",
10 | "mapbox-gl": "^3.5.0"
11 | },
12 | "devDependencies": {
13 | "typescript": "^5.0.0",
14 | "vite": "^4.0.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/get-started/basic/vite.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | define: {
3 | 'process.env.MapboxAccessToken': JSON.stringify(process.env.MapboxAccessToken)
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/examples/get-started/controlled/README.md:
--------------------------------------------------------------------------------
1 | # react-map-gl Example: Using Map as a controlled component
2 |
3 | This example shows a minimal app configuration to use react-map-gl's Map component with external view state management.
4 |
5 | ## Usage
6 |
7 | To run this example, you need a [Mapbox token](http://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens). You can either set it as `MAPBOX_TOKEN` in `app.js`, or set a `MapboxAccessToken` environment variable in the command line.
8 |
9 | Alternative to acquiring a Mapbox token, you can install `maplibre-gl` and change all `import from 'react-map-gl/mapbox'` to `import from 'react-map-gl/maplibre'`. You also need to supply a third-party or self-hosted `mapStyle` URL.
10 |
11 | ```bash
12 | npm i
13 | npm run start
14 | ```
15 |
16 | To build a production version:
17 |
18 | ```bash
19 | npm run build
20 | ```
21 |
--------------------------------------------------------------------------------
/examples/get-started/controlled/app.jsx:
--------------------------------------------------------------------------------
1 | /* global document */
2 | import * as React from 'react';
3 | import {createRoot} from 'react-dom/client';
4 | import Map, {Marker} from 'react-map-gl/mapbox';
5 |
6 | import 'mapbox-gl/dist/mapbox-gl.css';
7 |
8 | const MAPBOX_TOKEN = ''; // Set your mapbox token here
9 |
10 | function Root() {
11 | const [viewState, setViewState] = React.useState({
12 | latitude: 37.8,
13 | longitude: -122.4,
14 | zoom: 14
15 | });
16 |
17 | return (
18 |
27 | );
28 | }
29 |
30 | const root = createRoot(document.body.appendChild(document.createElement('div')));
31 | root.render();
32 |
--------------------------------------------------------------------------------
/examples/get-started/controlled/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | react-map-gl Example
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/get-started/controlled/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "start": "vite --open",
4 | "build": "vite build"
5 | },
6 | "dependencies": {
7 | "react": "^18.0.0",
8 | "react-dom": "^18.0.0",
9 | "react-map-gl": "^8.0.0",
10 | "mapbox-gl": "^3.5.0"
11 | },
12 | "devDependencies": {
13 | "typescript": "^5.0.0",
14 | "vite": "^4.0.0"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/get-started/controlled/vite.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | define: {
3 | 'process.env.MapboxAccessToken': JSON.stringify(process.env.MapboxAccessToken)
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/examples/get-started/hook/README.md:
--------------------------------------------------------------------------------
1 | # react-map-gl Example: Using Map with a State Management System
2 |
3 | This example shows how to use react-map-gl's Map component with the `useMap` hook.
4 |
5 | ## Usage
6 |
7 | To run this example, you need a [Mapbox token](http://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens). You can either set it as `MAPBOX_TOKEN` in `map.js`, or set a `MapboxAccessToken` environment variable in the command line.
8 |
9 | Alternative to acquiring a Mapbox token, you can install `maplibre-gl` and change all `import from 'react-map-gl/mapbox'` to `import from 'react-map-gl/maplibre'`. You also need to supply a third-party or self-hosted `mapStyle` URL.
10 |
11 | ```bash
12 | npm i
13 | npm run start
14 | ```
15 |
16 | To build a production version:
17 |
18 | ```bash
19 | npm run build
20 | ```
21 |
--------------------------------------------------------------------------------
/examples/get-started/hook/app.jsx:
--------------------------------------------------------------------------------
1 | /* global document */
2 | import * as React from 'react';
3 | import {createRoot} from 'react-dom/client';
4 | import {MapProvider} from 'react-map-gl/mapbox';
5 |
6 | import Map from './map';
7 | import Controls from './controls';
8 |
9 | function Root() {
10 | // Note: `useMap` will not work here, only child components of `MapProvider` or `Map` can use `useMap`
11 |
12 | return (
13 |
14 |
15 |
16 |
17 | );
18 | }
19 |
20 | const root = createRoot(document.body.appendChild(document.createElement('div')));
21 | root.render();
22 |
--------------------------------------------------------------------------------
/examples/get-started/hook/controls2.jsx:
--------------------------------------------------------------------------------
1 | // import {useMap} from 'react-map-gl/mapbox';
2 |
3 | export default function Controls2() {
4 | /**
5 | * ## This is how `useMap` works:
6 | * This component does nothing. It's purpose is to demo `useMap`.
7 | * When a component is a child of `