JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 168330
  • Score
    100M100P100Q174928F
  • License MIT

React components for Maplibre GL JS

Package Exports

  • @vis.gl/react-maplibre

Readme

version build downloads

react-maplibre | Docs

@vis.gl/react-maplibre is a suite of React components designed to provide a React API for maplibre-gl. More information in the online documentation.

See our Design Philosophy.

Installation

Using this package requires react >= 16.3 and maplibre-gl >= 4.0.0.

npm install @vis.gl/react-maplibre maplibre-gl

Example

import * as React from 'react';
import Map from '@vis.gl/react-maplibre';

function App() {
  return <Map
    initialViewState={{
      longitude: -100,
      latitude: 40,
      zoom: 3.5
    }}
    style={{width: 600, height: 400}}
    mapStyle="https://demotiles.maplibre.org/style.json"
  />;
}

Contribute

See contribution guide.

Attributions

react-maplibre is part of vis.gl, an OpenJS Foundation project.