3.0.10 • Published 3 years ago

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

Weekly downloads
7
License
ISC
Repository
github
Last release
3 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

3 years ago

3.0.3

3 years ago

3.0.10

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.8

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.0

3 years ago

3.0.9

3 years ago

2.0.3

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago