diff --git a/functions/loader.api.html b/functions/loader.api.html index a963cff..fbb3fe9 100644 --- a/functions/loader.api.html +++ b/functions/loader.api.html @@ -1,60 +1,3 @@ -api | OverpassQL Loader
-
- -
-
-
-
- -

Function api

-
-
    - -
  • -

    API function for Overpass JSON responses. +api | OverpassQL Loader

    • API function for Overpass JSON responses. Useful if you want to implement your own way of doing it. :-)

      -
      -
      -

      Parameters

      -
        -
      • -
        query: string
      • -
      • -
        Optional opts: Partial<OverpassOptions>
      -

      Returns Promise<OverpassJson>

      -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Parameters

    • query: string
    • Optional opts: Partial<OverpassOptions>

    Returns Promise<OverpassJson>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/loader.loader.html b/functions/loader.loader.html index 0437a80..7f32d58 100644 --- a/functions/loader.loader.html +++ b/functions/loader.loader.html @@ -1,71 +1,8 @@ -loader | OverpassQL Loader
-
- -
-
-
-
- -

Function loader

-
-
    - -
  • -

    Main OverpassQL webpack loader function.

    -
    -
    -

    Parameters

    -
      -
    • -
      this: LoaderContext<Options>
      -

      the webpack loader context

      -
      -
    • -
    • -
      content: string
      -

      OverpassQL content

      -
      -
    -

    Returns void

    -
    -

    Description

    Consumes OverpassQL source content and transforms it into a +loader | OverpassQL Loader

    • Main OverpassQL webpack loader function.

      +

      Parameters

      • this: LoaderContext<Options>

        the webpack loader context

        +
      • content: string

        OverpassQL content

        +

      Returns void

      Description

      Consumes OverpassQL source content and transforms it into a loadable JavaScript module, optionally with minification and precached GeoJSON results.

      -

      Throws

      when this (loader context) is not provided

      -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/properties.defaultPropertiesFilter.html b/functions/properties.defaultPropertiesFilter.html index 85b4fa4..ddb16ba 100644 --- a/functions/properties.defaultPropertiesFilter.html +++ b/functions/properties.defaultPropertiesFilter.html @@ -1,62 +1,5 @@ -defaultPropertiesFilter | OverpassQL Loader
-
- -
-
-
-
- -

Function defaultPropertiesFilter

-
-
    - -
  • -

    The default OpenStreetMaps properties and tags filter. +defaultPropertiesFilter | OverpassQL Loader

    • The default OpenStreetMaps properties and tags filter. This removes everything but names and addresses.

      -
      -
      -

      Parameters

      -
        -
      • -
        properties: GeoJsonProperties
        -

        Key-value object containing OpenStreetMap tags

        -
        -
      -

      Returns GeoJsonProperties

      Properties with tags other than name and address removed

      - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Parameters

    • properties: GeoJsonProperties

      Key-value object containing OpenStreetMap tags

      +

    Returns GeoJsonProperties

    Properties with tags other than name and address removed

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/properties.hasProperties.html b/functions/properties.hasProperties.html index 11baf1d..98d8b1c 100644 --- a/functions/properties.hasProperties.html +++ b/functions/properties.hasProperties.html @@ -1,62 +1,5 @@ -hasProperties | OverpassQL Loader
-
- -
-
-
-
- -

Function hasProperties

-
-
    - -
  • -

    Helper function to determine whether an object contains OpenStreetMaps +hasProperties | OverpassQL Loader

    • Helper function to determine whether an object contains OpenStreetMaps GeoJSON properties.

      -
      -
      -

      Parameters

      -
        -
      • -
        Optional obj: null | object
        -

        The object to check

        -
        -
      -

      Returns boolean

      True when the object contains properties

      - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Parameters

    • Optional obj: null | object

      The object to check

      +

    Returns boolean

    True when the object contains properties

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/properties.isTraversible.html b/functions/properties.isTraversible.html index 3f808fe..a2284c0 100644 --- a/functions/properties.isTraversible.html +++ b/functions/properties.isTraversible.html @@ -1,62 +1,5 @@ -isTraversible | OverpassQL Loader
-
- -
-
-
-
- -

Function isTraversible

-
-
    - -
  • -

    Helper function to determine whether an object is a real traversible +isTraversible | OverpassQL Loader

    • Helper function to determine whether an object is a real traversible key-value object, e.g., GeoJSON.

      -
      -
      -

      Parameters

      -
        -
      • -
        Optional obj: null | object
        -

        The object to check

        -
        -
      -

      Returns boolean

      True when the object is traversible

      - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Parameters

    • Optional obj: null | object

      The object to check

      +

    Returns boolean

    True when the object is traversible

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/properties.processProperties.html b/functions/properties.processProperties.html index 8f9f721..60f1735 100644 --- a/functions/properties.processProperties.html +++ b/functions/properties.processProperties.html @@ -1,67 +1,6 @@ -processProperties | OverpassQL Loader
-
- -
-
-
-
- -

Function processProperties

-
-
    - -
  • -

    Helper function to process OpenStreetMaps GeoJSON with the supplied filter +processProperties | OverpassQL Loader

    • Helper function to process OpenStreetMaps GeoJSON with the supplied filter function. Scans the entire object at multiple levels for filtering.

      -
      -
      -

      Parameters

      -
        -
      • -
        geojson: GeoJsonProperties | FeatureCollection<Geometry, GeoJsonProperties>
        -

        OpenStreetMaps GeoJSON object

        -
        -
      • -
      • -
        Optional filter: PropertiesFilter
        -

        filtering function

        -
        -
      -

      Returns GeoJsonProperties

      OpenStreetMaps GeoJSON object after filtering with the function

      - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Parameters

    • geojson: GeoJsonProperties | FeatureCollection<Geometry, GeoJsonProperties>

      OpenStreetMaps GeoJSON object

      +
    • Optional filter: PropertiesFilter

      filtering function

      +

    Returns GeoJsonProperties

    OpenStreetMaps GeoJSON object after filtering with the function

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/syntax.stripComments.html b/functions/syntax.stripComments.html index 422f4fe..5e296ca 100644 --- a/functions/syntax.stripComments.html +++ b/functions/syntax.stripComments.html @@ -1,61 +1,4 @@ -stripComments | OverpassQL Loader
-
- -
-
-
-
- -

Function stripComments

-
-
    - -
  • -

    Remove comments from an OverpassQL string.

    -
    -
    -

    Parameters

    -
      -
    • -
      content: string
      -

      OverpassQL content string

      -
      -
    -

    Returns string

    OverpassQL content string with comments removed

    - -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +stripComments | OverpassQL Loader
  • Remove comments from an OverpassQL string.

    +

    Parameters

    • content: string

      OverpassQL content string

      +

    Returns string

    OverpassQL content string with comments removed

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/syntax.stripWhitespace.html b/functions/syntax.stripWhitespace.html index efda189..adbd6d6 100644 --- a/functions/syntax.stripWhitespace.html +++ b/functions/syntax.stripWhitespace.html @@ -1,61 +1,4 @@ -stripWhitespace | OverpassQL Loader
-
- -
-
-
-
- -

Function stripWhitespace

-
-
    - -
  • -

    Remove whitespace from an OverpassQL string while preserving comments.

    -
    -
    -

    Parameters

    -
      -
    • -
      content: string
      -

      OverpassQL content string

      -
      -
    -

    Returns string

    OverpassQL content string with extra whitespace removed

    - -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +stripWhitespace | OverpassQL Loader
  • Remove whitespace from an OverpassQL string while preserving comments.

    +

    Parameters

    • content: string

      OverpassQL content string

      +

    Returns string

    OverpassQL content string with extra whitespace removed

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/index.html b/index.html index 33b928e..4fc23fc 100644 --- a/index.html +++ b/index.html @@ -1,18 +1,4 @@ -OverpassQL Loader
-
- -
-
-
-
-

OverpassQL Loader

-
+OverpassQL Loader

OverpassQL Loader

@@ -91,51 +77,4 @@

OverpassQL Loader

License

This project is licensed under the MIT License. See LICENSE for more information.

-
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/loader.html b/modules/loader.html index 5d83b25..116af2d 100644 --- a/modules/loader.html +++ b/modules/loader.html @@ -1,56 +1,5 @@ -loader | OverpassQL Loader
-
- -
-
-
-
- -

Module loader

-
-
-

Index

-
-

Type Aliases

-
Options +loader | OverpassQL Loader

Index

Type Aliases

-
-

Functions

-
api +

Functions

-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/properties.html b/modules/properties.html index 05231c7..e1b28d6 100644 --- a/modules/properties.html +++ b/modules/properties.html @@ -1,53 +1,5 @@ -properties | OverpassQL Loader
-
- -
-
-
-
- -

Module properties

-
-
-

Index

-
-

Functions

-
defaultPropertiesFilter +properties | OverpassQL Loader
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/modules/syntax.html b/modules/syntax.html index 107e14f..c3488f0 100644 --- a/modules/syntax.html +++ b/modules/syntax.html @@ -1,55 +1,4 @@ -syntax | OverpassQL Loader
-
- -
-
-
-
- -

Module syntax

-
-
-

Index

-
-

Variables

-
-
-

Functions

-
stripComments +syntax | OverpassQL Loader
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/loader.Options.html b/types/loader.Options.html index 76bdfae..7590b17 100644 --- a/types/loader.Options.html +++ b/types/loader.Options.html @@ -1,115 +1,28 @@ -Options | OverpassQL Loader
-
- -
-
-
-
- -

Type alias Options

-
Options: {
    cacheGeoJSON?: boolean;
    esModule?: boolean;
    keepProperties?: boolean;
    osmtogeojsonOptions?: OsmToGeoJSONOptions;
    overpassOptions?: Partial<OverpassOptions>;
    propertiesFilter?: PropertiesFilter;
    simplificationTolerance?: number;
    stripComments?: boolean;
    stripWhitespace?: boolean;
}
-

OverpassQL Loader options.

-
-
-

Type declaration

-
    -
  • -
    Optional cacheGeoJSON?: boolean
    -

    Preload and cache the Overpass API response from the query. +Options | OverpassQL Loader

    Options: {
        cacheGeoJSON?: boolean;
        esModule?: boolean;
        keepProperties?: boolean;
        osmtogeojsonOptions?: OsmToGeoJSONOptions;
        overpassOptions?: Partial<OverpassOptions>;
        propertiesFilter?: PropertiesFilter;
        simplificationTolerance?: number;
        stripComments?: boolean;
        stripWhitespace?: boolean;
    }

    OverpassQL Loader options.

    +

    Type declaration

    • Optional cacheGeoJSON?: boolean

      Preload and cache the Overpass API response from the query. Connects to the Overpass API specified in endpoint to execute the query and cache the GeoJSON response in the rendered module.

      -
      -
    • -
    • -
      Optional esModule?: boolean
      -

      Emit an ES-style module. +

    • Optional esModule?: boolean

      Emit an ES-style module. (e.g. 'export default' instead of 'module.exports =')

      -
      -
    • -
    • -
      Optional keepProperties?: boolean
      -

      Avoid clobbering properties when caching the GeoJSON response from the +

    • Optional keepProperties?: boolean

      Avoid clobbering properties when caching the GeoJSON response from the Overpass API.

      The value has no effect when cacheGeoJSON is not set or set to false.

      -
      -
    • -
    • -
      Optional osmtogeojsonOptions?: OsmToGeoJSONOptions
      -

      Options to pass through to the "osmtogeojson" package.

      -
      -
      -

      See

      "osmtogeojson" package: +

    • Optional osmtogeojsonOptions?: OsmToGeoJSONOptions

      Options to pass through to the "osmtogeojson" package.

      +

      See

      "osmtogeojson" package: https://github.com/tyrasd/osmtogeojson https://www.npmjs.com/package/osmtogeojson

      The value has no effect when cacheGeoJSON is not set or set to false.

      -
    • -
    • -
      Optional overpassOptions?: Partial<OverpassOptions>
      -

      Options to pass through to the Overpass API handler (e.g. "overpass-ts").

      -
      -
      -

      See

      "overpass-ts" package: +

    • Optional overpassOptions?: Partial<OverpassOptions>

      Options to pass through to the Overpass API handler (e.g. "overpass-ts").

      +

      See

      "overpass-ts" package: https://www.npmjs.com/package/overpass-ts

      -
    • -
    • -
      Optional propertiesFilter?: PropertiesFilter
      -

      Function to clobber properties (e.g. to remove or keep them).

      +
    • Optional propertiesFilter?: PropertiesFilter

      Function to clobber properties (e.g. to remove or keep them).

      The value has no effect when cacheGeoJSON is not set or set to false. The value has no effect when keepProperties is set to true.

      -
      -
    • -
    • -
      Optional simplificationTolerance?: number
      -

      Tolerance value for shape simplification. +

    • Optional simplificationTolerance?: number

      Tolerance value for shape simplification. Function uses the "simplify-geojson" package: https://www.npmjs.com/package/simplify-geojson https://github.com/maxogden/simplify-geojson

      -
      -
    • -
    • -
      Optional stripComments?: boolean
      -

      Remove comments to save space. +

    • Optional stripComments?: boolean

      Remove comments to save space. The function to strip comments will respect "@preserve" directives.

      -
      -
    • -
    • -
      Optional stripWhitespace?: boolean
      -

      Remove redundant whitespace to save space.

      -
      -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +
  • Optional stripWhitespace?: boolean

    Remove redundant whitespace to save space.

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/types/loader.PropertiesFilter.html b/types/loader.PropertiesFilter.html index 4ff60d1..83e1ef4 100644 --- a/types/loader.PropertiesFilter.html +++ b/types/loader.PropertiesFilter.html @@ -1,58 +1 @@ -PropertiesFilter | OverpassQL Loader
-
- -
-
-
-
- -

Type alias PropertiesFilter

-
PropertiesFilter: ((properties) => GeoJsonProperties)
-
-

Type declaration

-
    -
  • -
      -
    • (properties): GeoJsonProperties
    • -
    • -
      -

      Parameters

      -
        -
      • -
        properties: GeoJsonProperties
      -

      Returns GeoJsonProperties

-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +PropertiesFilter | OverpassQL Loader

Type alias PropertiesFilter

PropertiesFilter: ((properties) => GeoJsonProperties)

Type declaration

    • (properties): GeoJsonProperties
    • Parameters

      • properties: GeoJsonProperties

      Returns GeoJsonProperties

Generated using TypeDoc

\ No newline at end of file diff --git a/variables/syntax.maxContentSize.html b/variables/syntax.maxContentSize.html index af359bf..23d91b8 100644 --- a/variables/syntax.maxContentSize.html +++ b/variables/syntax.maxContentSize.html @@ -1,49 +1,3 @@ -maxContentSize | OverpassQL Loader
-
- -
-
-
-
- -

Variable maxContentSizeConst

-
maxContentSize: number = 100000000
-

Maximum permissible content size, measured in number of characters, to +maxContentSize | OverpassQL Loader

Variable maxContentSizeConst

maxContentSize: number = 100000000

Maximum permissible content size, measured in number of characters, to prevent occurrences of ReDoS (Regular expression Denial of Service).

-
-
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file