Options
All
  • Public
  • Public/Protected
  • All
Menu

@yaga/leaflet-ng2

Index

Type aliases

IGeoJSONFilterFn

IGeoJSONFilterFn: function

Interface for the filter function of the GeoJSON directive.

You can return a boolean value on each feature according if you want to add the feature or not.

link

http://leafletjs.com/reference-1.2.0.html#geojson-filter Original Leaflet documentation

Type declaration

    • (feature: GeoJSONFeature<GeometryObject, T>): boolean
    • Parameters

      • feature: GeoJSONFeature<GeometryObject, T>

      Returns boolean

IGeoJSONPointToLayerFn

IGeoJSONPointToLayerFn: function

Interface for the point to layer function of the GeoJSON directive.

You can return any type of Layer that should represent the feature of type point.

link

http://leafletjs.com/reference-1.2.0.html#geojson-pointtolayer Original Leaflet documentation

Type declaration

    • (geoJSON: GeoJSONFeature<Point, T>, latLng: LatLng): Layer
    • Parameters

      • geoJSON: GeoJSONFeature<Point, T>
      • latLng: LatLng

      Returns Layer

IGeoJSONStylerFn

IGeoJSONStylerFn: function

Interface for the styler function of the GeoJSON directive.

You can return an individual style (PathOption) for each feature. As basis you get the feature itself and the default style.

Note: This functions is enhanced against the original style function with a default style

link

http://leafletjs.com/reference-1.2.0.html#geojson-style Original Leaflet documentation

Type declaration

    • (geoJSON: GeoJSONFeature<GeometryObject, T>, defaultStyle: PathOptions): PathOptions
    • Parameters

      • geoJSON: GeoJSONFeature<GeometryObject, T>
      • defaultStyle: PathOptions

      Returns PathOptions

Variables

Const ANIMATION_DELAY

ANIMATION_DELAY: number = 50

Default value for delays caused by animations (in milliseconds)

Const ATTRIBUTION_PREFIX

ATTRIBUTION_PREFIX: string = `<a href="https://yagajs.org" title="YAGA">YAGA</a> | <a href="https://leaflet-ng2.yagajs.org" title="Leaflet in Angular2">leaflet-ng2</a>`

Default attribution prefix

Const DEFAULT_STYLE

DEFAULT_STYLE: PathOptions

Empty default style

Const EXAMPLE_CONTENT

EXAMPLE_CONTENT: string = "Vel ipsum odit quia velit omnis illo voluptatem ut. Aperiam porro voluptates maiores."

Some lorem ipsum test content

Const EXAMPLE_WMS_LAYER_NAMES

EXAMPLE_WMS_LAYER_NAMES: string[] = ["nw_dtk_col"]

Layers of the example WMS service

Const EXAMPLE_WMS_LAYER_URL

EXAMPLE_WMS_LAYER_URL: string = "http://www.wms.nrw.de/geobasis/wms_nw_dtk?"

Base URL for a sample WMS service

Const IMAGE_OVERLAY_URL

IMAGE_OVERLAY_URL: string = "http://download.osgeo.org/livedvd/10.0/desktop10_osmF32.png"

URL for an example image for image-overlays

Const OSM_TILE_LAYER_URL

OSM_TILE_LAYER_URL: string = "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"

URL-schema of the official osm tile-server

Const TRANSPARENT_PIXEL

TRANSPARENT_PIXEL: string = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="

Base64 data-url for a transparent 1px png image

Functions

Private createPathTests

  • createPathTests(Constr: any): void

Private enhanceMouseEvent

  • enhanceMouseEvent(originalEvent: MouseEvent, map: Map): LeafletMouseEvent
  • Helper function to enhance browser mouse events to Leaflet mouse events

    Parameters

    • originalEvent: MouseEvent
    • map: Map

    Returns LeafletMouseEvent

Private hasAsChild

  • hasAsChild(root: HTMLElement, child: HTMLElement): boolean
  • Helper function to detect if an element is a child of another

    Parameters

    • root: HTMLElement
    • child: HTMLElement

    Returns boolean

lng2lat

  • lng2lat(position: Position | Position[] | Position[][] | Position[][][]): Position | Position[] | Position[][] | Position[][][]
  • Function to convert from Lng-Lat format from geoJSON to LatLng on Leaflet

    Parameters

    • position: Position | Position[] | Position[][] | Position[][][]

    Returns Position | Position[] | Position[][] | Position[][][]

Private randomLat

  • randomLat(): number
  • Helper function to create random latitude values

    Returns number

Private randomLatLng

  • randomLatLng(): LatLng
  • Helper function to create random latitude-longitude values pairs

    Returns LatLng

Private randomLatLngBounds

  • randomLatLngBounds(): LatLngBounds
  • Helper function to create random spatial bounds

    Returns LatLngBounds

Private randomLng

  • randomLng(): number
  • Helper function to create random longitude values

    Returns number

Private randomNumber

  • randomNumber(max?: number, min?: number, after?: number): number
  • Helper function to create random numbers within a range

    Parameters

    • Default value max: number = 1
    • Default value min: number = 0
    • Default value after: number = 3

    Returns number

Generated using TypeDoc