3.0.10 • Published 2 years ago

react-leaflet-multi-options-polyline v3.0.10

Weekly downloads
7
License
ISC
Repository
github
Last release
2 years ago

react-leaflet-multi-options-polyline

Provides a React component to enable multiple styles for a polyline in a react-leaflet map. Based on Leaflet.MultiOptionsPolyline by hgoebl.

Demos

To see demos page run on terminal:

yarn install and then yarn start

Usage

import React from 'react';
import { MapContainer, TileLayer } from 'react-leaflet';
import ReactLeafletMultiOptionsPolyline from '../../';

export default function DataMap ({positions, optionIdxFn, options}) {
    return (
        <MapContainer
            style={{height: '40%'}}>
                <TileLayer
                    attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
                    url="https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"
                />
                <ReactLeafletMultiOptionsPolyline
                    positions={positions}
                    optionIdxFn={optionIdxFn}
                    options={options}
                    weight={5}
                    lineCap='butt'
                    opacity={0.75}
                    smoothFactor={1}
                    zoomAnimation={false}
                />
        </MapContainer>
    )
}
3.0.4

2 years ago

3.0.3

2 years ago

3.0.10

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.8

2 years ago

3.0.7

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.0

2 years ago

3.0.9

2 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago