Skip to main content
100%

Leaflet.FileLayer Plugin

✓ Published0🌍 Public
Dd3noob
Last edited Apr 20, 2014
Created on Dec 2, 2013

This example shows an interactive map centered on Wellington, New Zealand, with a Leaflet.js tile layer from OpenStreetMap. The Leaflet.FileLayer plugin adds a folder-open control button, enabling users to load local GPS trace files in GPX, KML, or GeoJSON formats. The map renders loaded point data as red circle markers, with lines and polygons styled in red using the plugin’s `layerOptions` and `pointToLayer` callbacks. It also calls `fitBounds` to automatically zoom to the loaded data’s extent. The code uses Leaflet’s `L.map`, `L.tileLayer`, and the `L.Control.fileLayerLoad` API from the plugin.

AI-generated description

An example of a map presented with leaflet.js and the Leaflet.FileLoader plugin which will allow you to load a GPS trace in a GPX, KML or GeoJSON format.

Similar vizzes