leaflet-gpx-coords

1.0.4 • Public • Published

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 :)

/leaflet-gpx-coords/

    Package Sidebar

    Install

    npm i leaflet-gpx-coords

    Weekly Downloads

    1

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    27.2 kB

    Total Files

    4

    Last publish

    Collaborators

    • quilkin