@asymmetrik/ngx-leaflet

  • Version 8.1.0
  • Published
  • 318 kB
  • No dependencies
  • MIT license

Install

npm i @asymmetrik/ngx-leaflet
yarn add @asymmetrik/ngx-leaflet
pnpm add @asymmetrik/ngx-leaflet

Overview

Angular.io components for Leaflet

Index

Classes

class LeafletBaseLayersDirective

class LeafletBaseLayersDirective implements DoCheck, OnDestroy, OnInit {}
  • Baselayers directive

    This directive is provided as a convenient way to add baselayers to the map. The input accepts a key-value map of layer name -> layer. Mutable changed are detected. On changes, a differ is used to determine what changed so that layers are appropriately added or removed. This directive will also add the layers control so users can switch between available base layers.

    To specify which layer to show as the 'active' baselayer, you will want to add it to the map using the layers directive. Otherwise, the plugin will use the last one it sees.

constructor

constructor(leafletDirective: LeafletDirective, differs: any, zone: any);

    property baseLayers

    baseLayers: { [name: string]: any };

      property baseLayersDiffer

      baseLayersDiffer: any;

        property baseLayersValue

        baseLayersValue: { [name: string]: any };

          property layersControlOptions

          layersControlOptions: any;

            property layersControlReady

            layersControlReady: any;

              method ngDoCheck

              ngDoCheck: () => void;

                method ngOnDestroy

                ngOnDestroy: () => void;

                  method ngOnInit

                  ngOnInit: () => void;

                    method syncBaseLayer

                    protected syncBaseLayer: () => void;
                    • Check the current base layer and change it to the new one if necessary

                    method updateBaseLayers

                    protected updateBaseLayers: () => void;

                      class LeafletControlLayersChanges

                      class LeafletControlLayersChanges {}

                        property layersAdded

                        layersAdded: number;

                          property layersChanged

                          layersChanged: number;

                            property layersRemoved

                            layersRemoved: number;

                              method changed

                              changed: () => boolean;

                                class LeafletControlLayersConfig

                                class LeafletControlLayersConfig {}

                                  property baseLayers

                                  baseLayers: { [name: string]: any };

                                    property overlays

                                    overlays: { [name: string]: any };

                                      class LeafletControlLayersWrapper

                                      class LeafletControlLayersWrapper {}

                                        constructor

                                        constructor(zone: any, layersControlReady: any);

                                          property layersControl

                                          protected layersControl: any;

                                            property layersControlReady

                                            protected layersControlReady: any;

                                              method applyBaseLayerChanges

                                              applyBaseLayerChanges: (changes: any) => LeafletControlLayersChanges;

                                                method applyOverlayChanges

                                                applyOverlayChanges: (changes: any) => LeafletControlLayersChanges;

                                                  method getLayersControl

                                                  getLayersControl: () => any;

                                                    method init

                                                    init: (controlConfig: any, controlOptions: any) => any;

                                                      class LeafletDirective

                                                      class LeafletDirective implements OnChanges, OnDestroy, OnInit {}

                                                        constructor

                                                        constructor(element: any, zone: any);

                                                          property center

                                                          center: any;

                                                            property centerChange

                                                            centerChange: any;

                                                              property DEFAULT_CENTER

                                                              readonly DEFAULT_CENTER: any;

                                                                property DEFAULT_FPZ_OPTIONS

                                                                readonly DEFAULT_FPZ_OPTIONS: {};

                                                                  property DEFAULT_ZOOM

                                                                  readonly DEFAULT_ZOOM: number;

                                                                    property fitBounds

                                                                    fitBounds: any;

                                                                      property fitBoundsOptions

                                                                      fitBoundsOptions: {};

                                                                        property map

                                                                        map: any;

                                                                          property mapReady

                                                                          mapReady: any;

                                                                            property maxBounds

                                                                            maxBounds: any;

                                                                              property maxZoom

                                                                              maxZoom: number;

                                                                                property minZoom

                                                                                minZoom: number;

                                                                                  property onClick

                                                                                  onClick: any;

                                                                                    property onDoubleClick

                                                                                    onDoubleClick: any;

                                                                                      property onMapMove

                                                                                      onMapMove: any;

                                                                                        property onMapMoveEnd

                                                                                        onMapMoveEnd: any;

                                                                                          property onMapMoveStart

                                                                                          onMapMoveStart: any;

                                                                                            property onMapZoom

                                                                                            onMapZoom: any;

                                                                                              property onMapZoomEnd

                                                                                              onMapZoomEnd: any;

                                                                                                property onMapZoomStart

                                                                                                onMapZoomStart: any;

                                                                                                  property onMouseDown

                                                                                                  onMouseDown: any;

                                                                                                    property onMouseMove

                                                                                                    onMouseMove: any;

                                                                                                      property onMouseOut

                                                                                                      onMouseOut: any;

                                                                                                        property onMouseOver

                                                                                                        onMouseOver: any;

                                                                                                          property onMouseUp

                                                                                                          onMouseUp: any;

                                                                                                            property options

                                                                                                            options: any;

                                                                                                              property panOptions

                                                                                                              panOptions: {};

                                                                                                                property resizeTimer

                                                                                                                resizeTimer: any;

                                                                                                                  property zoom

                                                                                                                  zoom: number;

                                                                                                                    property zoomChange

                                                                                                                    zoomChange: any;

                                                                                                                      property zoomOptions

                                                                                                                      zoomOptions: {};

                                                                                                                        property zoomPanOptions

                                                                                                                        zoomPanOptions: {};

                                                                                                                          method getMap

                                                                                                                          getMap: () => any;

                                                                                                                            method ngOnChanges

                                                                                                                            ngOnChanges: (changes: { [key: string]: any }) => void;

                                                                                                                              method ngOnDestroy

                                                                                                                              ngOnDestroy: () => void;

                                                                                                                                method ngOnInit

                                                                                                                                ngOnInit: () => void;

                                                                                                                                  method onResize

                                                                                                                                  onResize: () => void;

                                                                                                                                    class LeafletDirectiveWrapper

                                                                                                                                    class LeafletDirectiveWrapper {}

                                                                                                                                      constructor

                                                                                                                                      constructor(leafletDirective: LeafletDirective);

                                                                                                                                        property leafletDirective

                                                                                                                                        protected leafletDirective: LeafletDirective;

                                                                                                                                          method getMap

                                                                                                                                          getMap: () => any;

                                                                                                                                            method init

                                                                                                                                            init: () => void;

                                                                                                                                              class LeafletLayerDirective

                                                                                                                                              class LeafletLayerDirective implements OnChanges, OnDestroy, OnInit {}
                                                                                                                                              • Layer directive

                                                                                                                                                This directive is used to directly control a single map layer. The purpose of this directive is to be used as part of a child structural directive of the map element.

                                                                                                                                              constructor

                                                                                                                                              constructor(leafletDirective: LeafletDirective, zone: any);

                                                                                                                                                property layer

                                                                                                                                                layer: any;

                                                                                                                                                  property onAdd

                                                                                                                                                  onAdd: any;

                                                                                                                                                    property onRemove

                                                                                                                                                    onRemove: any;

                                                                                                                                                      method ngOnChanges

                                                                                                                                                      ngOnChanges: (changes: { [key: string]: any }) => void;

                                                                                                                                                        method ngOnDestroy

                                                                                                                                                        ngOnDestroy: () => void;

                                                                                                                                                          method ngOnInit

                                                                                                                                                          ngOnInit: () => void;

                                                                                                                                                            class LeafletLayersControlDirective

                                                                                                                                                            class LeafletLayersControlDirective implements DoCheck, OnDestroy, OnInit {}
                                                                                                                                                            • Layers Control

                                                                                                                                                              This directive is used to configure the layers control. The input accepts an object with two key-value maps of layer name -> layer. Mutable changes are detected. On changes, a differ is used to determine what changed so that layers are appropriately added or removed.

                                                                                                                                                              To specify which layer to show as the 'active' baselayer, you will want to add it to the map using the layers directive. Otherwise, the last one it sees will be used.

                                                                                                                                                            constructor

                                                                                                                                                            constructor(leafletDirective: LeafletDirective, differs: any, zone: any);

                                                                                                                                                              property baseLayersDiffer

                                                                                                                                                              baseLayersDiffer: any;

                                                                                                                                                                property layersControlConfig

                                                                                                                                                                layersControlConfig: LeafletControlLayersConfig;

                                                                                                                                                                  property layersControlConfigValue

                                                                                                                                                                  layersControlConfigValue: LeafletControlLayersConfig;

                                                                                                                                                                    property layersControlOptions

                                                                                                                                                                    layersControlOptions: any;

                                                                                                                                                                      property layersControlReady

                                                                                                                                                                      layersControlReady: any;

                                                                                                                                                                        property overlaysDiffer

                                                                                                                                                                        overlaysDiffer: any;

                                                                                                                                                                          method ngDoCheck

                                                                                                                                                                          ngDoCheck: () => void;

                                                                                                                                                                            method ngOnDestroy

                                                                                                                                                                            ngOnDestroy: () => void;

                                                                                                                                                                              method ngOnInit

                                                                                                                                                                              ngOnInit: () => void;

                                                                                                                                                                                method updateLayers

                                                                                                                                                                                protected updateLayers: () => void;

                                                                                                                                                                                  class LeafletLayersDirective

                                                                                                                                                                                  class LeafletLayersDirective implements DoCheck, OnDestroy, OnInit {}
                                                                                                                                                                                  • Layers directive

                                                                                                                                                                                    This directive is used to directly control map layers. As changes are made to the input array of layers, the map is synched to the array. As layers are added or removed from the input array, they are also added or removed from the map. The input array is treated as immutable. To detect changes, you must change the array instance.

                                                                                                                                                                                    Important Note: The input layers array is assumed to be immutable. This means you need to use an immutable array implementation or create a new copy of your array when you make changes, otherwise this directive won't detect the change. This is by design. It's for performance reasons. Change detection of mutable arrays requires diffing the state of the array on every DoCheck cycle, which is extremely expensive from a time complexity perspective.

                                                                                                                                                                                  constructor

                                                                                                                                                                                  constructor(leafletDirective: LeafletDirective, differs: any, zone: any);

                                                                                                                                                                                    property layers

                                                                                                                                                                                    layers: any[];

                                                                                                                                                                                      property layersDiffer

                                                                                                                                                                                      layersDiffer: any;

                                                                                                                                                                                        property layersValue

                                                                                                                                                                                        layersValue: any[];

                                                                                                                                                                                          method ngDoCheck

                                                                                                                                                                                          ngDoCheck: () => void;

                                                                                                                                                                                            method ngOnDestroy

                                                                                                                                                                                            ngOnDestroy: () => void;

                                                                                                                                                                                              method ngOnInit

                                                                                                                                                                                              ngOnInit: () => void;

                                                                                                                                                                                                class LeafletModule

                                                                                                                                                                                                class LeafletModule {}

                                                                                                                                                                                                  class LeafletTileLayerDefinition

                                                                                                                                                                                                  class LeafletTileLayerDefinition {}

                                                                                                                                                                                                    constructor

                                                                                                                                                                                                    constructor(type: string, url: string, options: any);

                                                                                                                                                                                                      property options

                                                                                                                                                                                                      options: any;

                                                                                                                                                                                                        property type

                                                                                                                                                                                                        type: string;

                                                                                                                                                                                                          property url

                                                                                                                                                                                                          url: string;

                                                                                                                                                                                                            method createTileLayer

                                                                                                                                                                                                            static createTileLayer: (layerDef: LeafletTileLayerDefinition) => any;
                                                                                                                                                                                                            • Creates a TileLayer from the provided definition. This is a convenience function to help with generating layers from objects.

                                                                                                                                                                                                              Parameter layerDef

                                                                                                                                                                                                              The layer to create

                                                                                                                                                                                                              Returns

                                                                                                                                                                                                              {TileLayer} The TileLayer that has been created

                                                                                                                                                                                                            • Create a Tile Layer from the current state of this object

                                                                                                                                                                                                              Returns

                                                                                                                                                                                                              {TileLayer} A new TileLayer

                                                                                                                                                                                                            method createTileLayers

                                                                                                                                                                                                            static createTileLayers: (layerDefs: {
                                                                                                                                                                                                            [key: string]: LeafletTileLayerDefinition;
                                                                                                                                                                                                            }) => { [key: string]: any };
                                                                                                                                                                                                            • Creates a TileLayer for each key in the incoming map. This is a convenience function for generating an associative array of layers from an associative array of objects

                                                                                                                                                                                                              Parameter layerDefs

                                                                                                                                                                                                              A map of key to tile layer definition

                                                                                                                                                                                                              Returns

                                                                                                                                                                                                              {{[p: string]: TileLayer}} A new map of key to TileLayer

                                                                                                                                                                                                            class LeafletUtil

                                                                                                                                                                                                            class LeafletUtil {}

                                                                                                                                                                                                              method handleEvent

                                                                                                                                                                                                              static handleEvent: <T>(zone: any, eventEmitter: any, event: T) => void;

                                                                                                                                                                                                                method mapToArray

                                                                                                                                                                                                                static mapToArray: <T>(map: { [key: string]: T }) => T[];

                                                                                                                                                                                                                  Package Files (13)

                                                                                                                                                                                                                  Dependencies (0)

                                                                                                                                                                                                                  No dependencies.

                                                                                                                                                                                                                  Dev Dependencies (39)

                                                                                                                                                                                                                  Peer Dependencies (4)

                                                                                                                                                                                                                  Badge

                                                                                                                                                                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@asymmetrik/ngx-leaflet.

                                                                                                                                                                                                                  • Markdown
                                                                                                                                                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@asymmetrik/ngx-leaflet)
                                                                                                                                                                                                                  • HTML
                                                                                                                                                                                                                    <a href="https://www.jsdocs.io/package/@asymmetrik/ngx-leaflet"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>