L()

new L()

Root class for all Leaflet-related functionalities, extended with custom methods and properties.

Classes

FileListLoader

FileReader

LayerChooser

Methods

static fileListLoader(fileListopt, optionsopt) → {L.FileListLoader}

A factory function that instantiates a FileListLoader object given the FileList and options.

Parameters:
Name Type Attributes Description
fileList FileList <optional>

The list of files to load. See FileList. If fileList argument is specified, then load method is called immediately.

options Object <optional>

Options for file reading.

Returns:
L.FileListLoader -

A new FileListLoader instance.

static fileReader(fileopt, optionsopt) → {L.FileReader}

Factory function to instantiate a L.FileReader object. Instantiates a L.FileReader object given the File/Blob and optionally an object literal with options. Note: it's possible to specify readAs directly instead of full options object.

Parameters:
Name Type Attributes Description
file Blob <optional>

The file or blob to be read. Optional.

options Object | string <optional>

Options for file reading or a string representing the read method.

Returns:
L.FileReader -

A new instance of L.FileReader.

Example
var reader = L.fileReader(file, { readAs: 'readAsText' });