1.0.4 • Published 2 years ago

leaflet-gpx-coords v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

GPX plugin for Leaflet with extra method for exporting lat/lng coordinates

See readme.md (for leaflet-gpx) for general info. This fork adds a method 'get_coords()' that returns an array of all the lat/long points in the gpx file. So (for example) :

const coords = gpx.get_coords();

// add direction arrows to GPX polyline
L.polylineDecorator(coords, {
    patterns: [{
        offset: 50,
        repeat: 50,
        symbol: L.Symbol.arrowHead({
            pixelSize: 10,
            polygon: false,
            pathOptions: { stroke: true, color: 'blue', }
        })
    }]
}).addTo(map);

Sorry , no type definition info (yet) for the added method. This is my first npm package attempt :)

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago