new File()
- Source:
- bu/format/localfile.js
Extends
- ol.Object
Methods
-
createVectorSources(name, data)
-
Returns a Promise that creates an array of
source.Parameters:
Name Type Description namestring Name for the source.
dataObject | string Input content.
- Source:
- bu/format/localfile.js
Returns:
A Promise that returns an array of
sourcecreated using the input for the resolve function and an Error for the reject function.- Type
- Promise
-
getFeatures(content)
-
Returns an array of
ol.Featureprocessing the input content. Depending on the current internal format reader, content can be different inputs. For example, for GeoJSON content can be a string with the json or the json object.Parameters:
Name Type Description contentObject | string Input content.
- Source:
- bu/format/localfile.js
Returns:
- Type
- Array.<ol.Feature>
-
<abstract> getProjectionInfo(content)
-
Returns a
bu.ProjectionInfofrom the content. Depending on the current internal format reader, content can be different inputs. For example, for GeoJSON content can be a string with the json or the json object. For other formats overwrite this function.Parameters:
Name Type Description contentObject | string Input content.
- Source:
- bu/format/localfile.js
Returns:
Projection info with nullable code.
- Type
- bu.ProjectionInfo
-
read(input)
-
Returns a Promise that creates an array of
source.Parameters:
Name Type Description inputFile | string | Object | Buffer | ArrayBuffer Input content. It can be a File, a string, an object, a Buffer or an ArrayBuffer.
- Source:
- bu/format/localfile.js
Returns:
A Promise that returns an array of
sourcefor the resolve function and an Error for the reject function.- Type
- Promise
-
readFile(file, asText)
-
Returns a Promise that reads a file and returns its content.
Parameters:
Name Type Description fileFile File to read.
asTextboolean If read file as text or as an array buffer.
- Source:
- bu/format/localfile.js
Returns:
A Promise that returns a string with the content of the file for the resolve function and an Error for the reject function.
- Type
- Promise
Javascript API 7.x