Hierarchy

  • GeoJSON
    • GeoJSON

Constructors

  • Parameters

    • options: { defaultStyle?: any; extensions?: any }

      Options

      • OptionaldefaultStyle?: any

        Styles by default

      • Optionalextensions?: any

        Add properties to file root

    Returns GeoJSON

Properties

dataProjection: undefined | Projection
defaultFeatureProjection: undefined | Projection
featureClass: typeof Feature
options: { defaultStyle?: any; extensions?: any }
source: any
supportedMediaTypes: string[]

A list media types supported by the format in descending order of preference.

Methods

  • Protected

    Sets the dataProjection on the options, if no dataProjection is set.

    Parameters

    • options: undefined | WriteOptions | ReadOptions

      Options.

    Returns undefined | WriteOptions | ReadOptions

    Updated options.

  • Protected

    Adds the data projection to the read options.

    Parameters

    • source: any

      Source.

    • Optionaloptions: ReadOptions

      Options.

    Returns undefined | ReadOptions

    Options.

  • Returns Type

    The format type.

  • Read a single feature from a source.

    Parameters

    • source: any

      Source.

    • Optionaloptions: ReadOptions

      Read options.

    Returns Feature<Geometry> | Feature<Geometry>[]

    Feature.

  • Protected

    Parameters

    • object: any

      Object.

    • Optionaloptions: ReadOptions

      Read options.

    Returns Feature<Geometry> | Feature<Geometry>[]

    Feature.

  • Read Extend Styles for Features. This function overloads ol.format.GeoJSON.readFeatures ...

    Parameters

    • source: any

      Source.

    • Optionaloptions: any

      Options. see olx.format.ReadOptions

    Returns Feature<Geometry>[]

    Features.

    olGeoJSON#readFeatures

  • Protected

    Parameters

    • object: any

      Object.

    • Optionaloptions: ReadOptions

      Read options.

    Returns Feature<Geometry>[]

    Features.

  • Read a single geometry from a source.

    Parameters

    • source: any

      Source.

    • Optionaloptions: ReadOptions

      Read options.

    Returns Geometry

    Geometry.

  • Protected

    Parameters

    • object: any

      Object.

    • Optionaloptions: ReadOptions

      Read options.

    Returns Geometry

    Geometry.

  • Read the projection.

    Parameters

    • source: any

      Source.

    Returns Projection

    Projection.

  • Protected

    Parameters

    • object: any

      Object.

    Returns Projection

    Projection.

  • Encode a feature as string.

    Parameters

    • feature: Feature<Geometry>

      Feature.

    • Optionaloptions: WriteOptions

      Write options.

    Returns string

    Encoded feature.

  • Encode a feature as a GeoJSON Feature object.

    Parameters

    • feature: Feature<Geometry>

      Feature.

    • Optionaloptions: WriteOptions

      Write options.

    Returns any

    Object.

  • Write Extend Styles for Features. This function overloads ol.format.GeoJSON.writeFeatures ...

    Parameters

    • features: Feature<Geometry>[]

      Features.

    • Optionaloptions: any

      Options.

    Returns string

    Result.

    olGeoJSON#writeFeatures

  • Encode an array of features as a GeoJSON object.

    Parameters

    • features: Feature<Geometry>[]

      Features.

    • Optionaloptions: WriteOptions

      Write options.

    Returns any

    GeoJSON Object.

  • Encode a geometry as string.

    Parameters

    • geometry: Geometry

      Geometry.

    • Optionaloptions: WriteOptions

      Write options.

    Returns string

    Encoded geometry.

  • Encode a geometry as a GeoJSON object.

    Parameters

    • geometry: Geometry

      Geometry.

    • Optionaloptions: WriteOptions

      Write options.

    Returns any

    Object.