1.14.0 • Published 3 years ago
@meysam213/react-leaflet v1.14.0
React-leaflet for Next.js
this package fixed problems react-leaflet & leaflet for next.js
Next.js 11 is Passed ✔
install with npm
$ npm install @meysam213/react-leaflet
install with yarn
$ yarn add @meysam213/react-leaflet
Usage
first create component
//mapbox.jsx
import { NextMap } from '@meysam213/react-leaflet';
const MapBox = () => {
return (
<>
<NextMap lat={50} lng={50} />
</>
);
};
and for use with next.js import dynamic
//pages/mapPage.jsx
import dynamic from 'next/dynamic';
const MapBox = dynamic(() => import('components/mapBox'), {
ssr: false,
});
notice: Due to being SSR, it is necessary to use import dynamics
Props
prop | Default | Type | Necessary |
---|---|---|---|
lat | - | Number | Necessary |
lng | - | Number | Necessary |
scrollWheelZoom | true | Boolean | Optional |
zoomControl | false | Boolean | Optional |
attributionControl | false | Boolean | Optional |
zoom | 17 | Number | Optional |
Height | 300px | String | Optional |
Width | 300px | String | Optional |
popUp | Hello! | String | Optional |
borderRadius | 0px | String | Optional |
Author
Github: @premier213
Twitter : @premier213
1.14.0
3 years ago
1.13.0
3 years ago
1.12.0
3 years ago
1.11.0
3 years ago
1.10.2
3 years ago
1.9.1
3 years ago
1.9.0
3 years ago
1.10.1
3 years ago
1.10.0
3 years ago
1.8.20
3 years ago
1.8.21
3 years ago
1.8.22
3 years ago
1.8.23
3 years ago
1.8.24
3 years ago
1.8.25
3 years ago
1.8.26
3 years ago
1.8.27
3 years ago
1.8.14
3 years ago
1.8.15
3 years ago
1.8.16
3 years ago
1.8.17
3 years ago
1.8.18
3 years ago
1.8.19
3 years ago
1.8.13
3 years ago
1.8.11
3 years ago
1.8.10
3 years ago
1.8.4
3 years ago
1.8.3
3 years ago
1.8.2
3 years ago
1.7.0
3 years ago
1.6.0
3 years ago
1.5.0
3 years ago
1.4.0
3 years ago
1.3.0
3 years ago
1.0.0
3 years ago
0.1.0
3 years ago