GithubHelp home page GithubHelp logo

isabella232 / react-mapbox-gl-leaflet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mongodb-js/react-mapbox-gl-leaflet

0.0 0.0 0.0 1.37 MB

React wrapper of mapbox-gl-leaflet for react-leaflet. Demo: https://mongodb-js.github.io/react-mapbox-gl-leaflet

License: MIT License

JavaScript 95.22% HTML 1.43% CSS 3.35%

react-mapbox-gl-leaflet's Introduction

react-mapbox-gl-leaflet

github_forks_img github_stars_img

React wrapper of mapbox-gl-leaflet for react-leaflet.

Demos

Package version Dependency Versions Demo
1.0.0 [email protected], [email protected] Link

Installation

npm install @mongodb-js/react-mapbox-gl-leaflet --save

You will also need to manually install the following peer dependencies:

npm install leaflet react react-dom react-leaflet mapbox-gl mapbox-gl-leaflet --save

Usage

Please consult the mapbox-gl-leaflet documentation for available prop options, the Mapbox Vector Tile Specification for defining the map tile data, and the Mapbox Style Specification for defining the visual appearance of the map.

import React from 'react';
import { Map } from 'react-leaflet';
import MapboxGlLayer from '@mongodb-js/react-mapbox-gl-leaflet';

const DemoComponent = () => {
  return (
    <Map>
      <MapboxGlLayer
        accessToken="for-usage-with-mapbox-api-only"
        style="https://your-tile-server.com/path/to/your/map-style.json"
        attribution="Copyright attribution message goes here" />
    </Map>
  );
}

Contributing

Pull requests of any kind are welcome from the community. Please ensure you have read the guidelines for Contributing and this project's Code of Conduct before raising a pull request.

Maintainers

License

MIT License

react-mapbox-gl-leaflet's People

Contributors

matt-d-rat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.