Skip to content

React-leaflet-heat-layer is a plugin for react-leaflet. A wrapper component of Leaflet.heat.

License

Notifications You must be signed in to change notification settings

LockBlock-dev/react-leaflet-heat-layer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-leaflet-heat-layer npm version

  • React-leaflet v4 support
  • Typescript support

React-leaflet-heat-layer is a plugin for react-leaflet. A wrapper component of Leaflet.heat.

Installation

  • Install NodeJS
  • Run react-leaflet-heat-layer

Prerequisites

Make sure that you haveve installed react, react-leaflet and leaflet.

Example usage

import { MapContainer } from "react-leaflet";
import HeatmapLayer from "react-leaflet-heat-layer";
import { addressPoints } from "./realworld";
import "leaflet/dist/leaflet.css";

const Demo = () => {
    return (
        <MapContainer center={[51.505, -0.09]} zoom={13}>
            <HeatmapLayer latlngs={addressPoints.map((p) => [p[0], p[1]])} />
        </MapContainer>
    );
};

Reference

See: https://leaflet.github.io/Leaflet.heat/#reference

Copyright

See the license

About

React-leaflet-heat-layer is a plugin for react-leaflet. A wrapper component of Leaflet.heat.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project