New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@asymmetrik/angular2-leaflet

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asymmetrik/angular2-leaflet - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

98

dist/bundles/angular2-leaflet.js

@@ -1,2 +0,2 @@

/*! @asymmetrik/angular2-leaflet-1.2.0 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/
/*! @asymmetrik/angular2-leaflet-1.2.1 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/
(function (global, factory) {

@@ -8,2 +8,11 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('leaflet')) :

var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
exports.LeafletDirective = (function () {

@@ -124,39 +133,39 @@ function LeafletDirective(el) {

}());
__decorate([
__decorate$1([
_angular_core.Input('leafletFitBoundsOptions'),
__metadata("design:type", Object)
], exports.LeafletDirective.prototype, "fitBoundsOptions", void 0);
__decorate([
__decorate$1([
_angular_core.Input('leafletPanOptions'),
__metadata("design:type", Object)
], exports.LeafletDirective.prototype, "panOptions", void 0);
__decorate([
__decorate$1([
_angular_core.Input('leafletZoomOptions'),
__metadata("design:type", Object)
], exports.LeafletDirective.prototype, "zoomOptions", void 0);
__decorate([
__decorate$1([
_angular_core.Input('leafletZoomPanOptions'),
__metadata("design:type", Object)
], exports.LeafletDirective.prototype, "zoomPanOptions", void 0);
__decorate([
__decorate$1([
_angular_core.Input('leafletOptions'),
__metadata("design:type", Object)
], exports.LeafletDirective.prototype, "options", void 0);
__decorate([
__decorate$1([
_angular_core.Output('leafletMapReady'),
__metadata("design:type", Object)
], exports.LeafletDirective.prototype, "mapReady", void 0);
__decorate([
__decorate$1([
_angular_core.Input('leafletZoom'),
__metadata("design:type", Number)
], exports.LeafletDirective.prototype, "zoom", void 0);
__decorate([
__decorate$1([
_angular_core.Input('leafletCenter'),
__metadata("design:type", L$1.LatLng)
], exports.LeafletDirective.prototype, "center", void 0);
__decorate([
__decorate$1([
_angular_core.Input('leafletFitBounds'),
__metadata("design:type", L$1.LatLngBounds)
], exports.LeafletDirective.prototype, "fitBounds", void 0);
__decorate([
__decorate$1([
_angular_core.HostListener('window:resize', ['$event']),

@@ -167,3 +176,3 @@ __metadata("design:type", Function),

], exports.LeafletDirective.prototype, "onResize", null);
exports.LeafletDirective = __decorate([
exports.LeafletDirective = __decorate$1([
_angular_core.Directive({

@@ -223,2 +232,11 @@ selector: '[leaflet]'

var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata$1 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LeafletLayersDirective = (function () {

@@ -258,11 +276,11 @@ function LeafletLayersDirective(leafletDirective) {

}());
__decorate([
__decorate$2([
_angular_core.Input('leafletLayers'),
__metadata("design:type", Array)
__metadata$1("design:type", Array)
], LeafletLayersDirective.prototype, "layers", void 0);
LeafletLayersDirective = __decorate([
LeafletLayersDirective = __decorate$2([
_angular_core.Directive({
selector: '[leafletLayers]'
}),
__metadata("design:paramtypes", [exports.LeafletDirective])
__metadata$1("design:paramtypes", [exports.LeafletDirective])
], LeafletLayersDirective);

@@ -396,2 +414,11 @@

var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata$2 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LeafletLayersControlDirective = (function () {

@@ -418,15 +445,15 @@ function LeafletLayersControlDirective(leafletDirective) {

}());
__decorate([
__decorate$3([
_angular_core.Input('leafletLayersControl'),
__metadata("design:type", Object)
__metadata$2("design:type", Object)
], LeafletLayersControlDirective.prototype, "layersControlConfig", void 0);
__decorate([
__decorate$3([
_angular_core.Input('leafletLayersControlOptions'),
__metadata("design:type", Object)
__metadata$2("design:type", Object)
], LeafletLayersControlDirective.prototype, "layersControlOptions", void 0);
LeafletLayersControlDirective = __decorate([
LeafletLayersControlDirective = __decorate$3([
_angular_core.Directive({
selector: '[leafletLayersControl]'
}),
__metadata("design:paramtypes", [exports.LeafletDirective])
__metadata$2("design:paramtypes", [exports.LeafletDirective])
], LeafletLayersControlDirective);

@@ -442,2 +469,11 @@

var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata$3 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var LeafletBaseLayersDirective = (function () {

@@ -496,17 +532,23 @@ function LeafletBaseLayersDirective(leafletDirective) {

}());
__decorate([
__decorate$4([
_angular_core.Input('leafletBaseLayers'),
__metadata("design:type", Object)
__metadata$3("design:type", Object)
], LeafletBaseLayersDirective.prototype, "baseLayers", void 0);
__decorate([
__decorate$4([
_angular_core.Input('leafletLayersControlOptions'),
__metadata("design:type", Object)
__metadata$3("design:type", Object)
], LeafletBaseLayersDirective.prototype, "layersControlOptions", void 0);
LeafletBaseLayersDirective = __decorate([
LeafletBaseLayersDirective = __decorate$4([
_angular_core.Directive({
selector: '[leafletBaseLayers]'
}),
__metadata("design:paramtypes", [exports.LeafletDirective])
__metadata$3("design:paramtypes", [exports.LeafletDirective])
], LeafletBaseLayersDirective);
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
exports.LeafletModule = (function () {

@@ -513,0 +555,0 @@ function LeafletModule() {

@@ -1,2 +0,2 @@

/*! @asymmetrik/angular2-leaflet-1.2.0 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("leaflet")):"function"==typeof define&&define.amd?define(["exports","@angular/core","leaflet"],t):t(e.angular2Leaflet=e.angular2Leaflet||{},e.ng.core,e.L)}(this,function(e,t,r){"use strict";e.LeafletDirective=function(){function e(e){this.DEFAULT_ZOOM=1,this.DEFAULT_CENTER=r.latLng([38.907192,-77.036871]),this.DEFAULT_FPZ_OPTIONS={},this.fitBoundsOptions=this.DEFAULT_FPZ_OPTIONS,this.panOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomPanOptions=this.DEFAULT_FPZ_OPTIONS,this.options={},this.mapReady=new t.EventEmitter,this.element=e}return e.prototype.ngOnInit=function(){this.map=r.map(this.element.nativeElement,this.options),null!=this.center&&null!=this.zoom&&this.setView(this.center,this.zoom),null!=this.fitBounds&&this.setFitBounds(this.fitBounds),this.doResize(),this.mapReady.emit(this.map)},e.prototype.ngOnChanges=function(e){e.zoom&&e.center&&null!=this.zoom&&null!=this.center?this.setView(e.center.currentValue,e.zoom.currentValue):e.zoom?this.setZoom(e.zoom.currentValue):e.center&&this.setCenter(e.center.currentValue),e.fitBounds&&this.setFitBounds(e.fitBounds.currentValue)},e.prototype.getMap=function(){return this.map},e.prototype.onResize=function(){this.delayResize()},e.prototype.doResize=function(){this.map.invalidateSize({})},e.prototype.delayResize=function(){null!=this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(this.doResize.bind(this),200)},e.prototype.setView=function(e,t){this.map&&null!=e&&null!=t&&this.map.setView(e,t,this.zoomPanOptions)},e.prototype.setZoom=function(e){this.map&&null!=e&&this.map.setZoom(e,this.zoomOptions)},e.prototype.setCenter=function(e){this.map&&null!=e&&this.map.panTo(e,this.panOptions)},e.prototype.setFitBounds=function(e){this.map&&null!=e&&this.map.fitBounds(e,this.fitBoundsOptions)},e}(),__decorate([t.Input("leafletFitBoundsOptions"),__metadata("design:type",Object)],e.LeafletDirective.prototype,"fitBoundsOptions",void 0),__decorate([t.Input("leafletPanOptions"),__metadata("design:type",Object)],e.LeafletDirective.prototype,"panOptions",void 0),__decorate([t.Input("leafletZoomOptions"),__metadata("design:type",Object)],e.LeafletDirective.prototype,"zoomOptions",void 0),__decorate([t.Input("leafletZoomPanOptions"),__metadata("design:type",Object)],e.LeafletDirective.prototype,"zoomPanOptions",void 0),__decorate([t.Input("leafletOptions"),__metadata("design:type",Object)],e.LeafletDirective.prototype,"options",void 0),__decorate([t.Output("leafletMapReady"),__metadata("design:type",Object)],e.LeafletDirective.prototype,"mapReady",void 0),__decorate([t.Input("leafletZoom"),__metadata("design:type",Number)],e.LeafletDirective.prototype,"zoom",void 0),__decorate([t.Input("leafletCenter"),__metadata("design:type",r.LatLng)],e.LeafletDirective.prototype,"center",void 0),__decorate([t.Input("leafletFitBounds"),__metadata("design:type",r.LatLngBounds)],e.LeafletDirective.prototype,"fitBounds",void 0),__decorate([t.HostListener("window:resize",["$event"]),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],e.LeafletDirective.prototype,"onResize",null),e.LeafletDirective=__decorate([t.Directive({selector:"[leaflet]"}),__metadata("design:paramtypes",[t.ElementRef])],e.LeafletDirective);var n=function(){function e(e){this.leafletDirective=e}return e.prototype.init=function(){},e.prototype.getMap=function(){return this.leafletDirective.getMap()},e}(),i=function(){function e(e,t){this.remove=e,this.add=t}return e}(),o=function(){function e(){}return e.diffLayers=function(e,t){var r,n;return null==e&&(e=[]),null==t&&(t=[]),r=t.filter(function(t){return!e.find(function(e){return t===e})}),n=e.filter(function(e){return!t.find(function(t){return e===t})}),new i(r,n)},e}(),a=function(){function e(e){this.leafletDirective=new n(e)}return e.prototype.ngOnInit=function(){this.leafletDirective.init(),this.setLayers(this.layers,[])},e.prototype.ngOnChanges=function(e){if(e.layers){var t=e.layers.currentValue,r=e.layers.isFirstChange()?[]:e.layers.previousValue;this.setLayers(t,r)}},e.prototype.setLayers=function(e,t){var r=this.leafletDirective.getMap();if(null!=r){var n=o.diffLayers(e,t);n.remove.forEach(function(e){r.removeLayer(e)}),n.add.forEach(function(e){r.addLayer(e)})}},e}();__decorate([t.Input("leafletLayers"),__metadata("design:type",Array)],a.prototype,"layers",void 0),a=__decorate([t.Directive({selector:"[leafletLayers]"}),__metadata("design:paramtypes",[e.LeafletDirective])],a);var s=function(){function e(){}return e.mergeMaps=function(e,t){var r={};if(null!=e)for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);if(null!=t)for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},e.mapSubtract=function(e,t){var r={};if(null!=e){for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);if(null!=t)for(var n in t)t.hasOwnProperty(n)&&delete r[n]}return r},e.mapToArray=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t},e}(),l=function(){function e(e,t){this.remove=e,this.add=t}return e}(),p=function(){function e(){}return e.prototype.getLayersControl=function(){return this.layersControl},e.prototype.init=function(e,t){var n=e.baseLayers||{},i=e.overlays||{};return this.layersControl=r.control.layers(n,i,t),this.layersControl},e.prototype.setLayersControlConfig=function(e,t){if(null==this.layersControl)return new l({},{});var r,n,i;r=s.mergeMaps(s.mapSubtract(t.baseLayers,e.baseLayers),s.mapSubtract(t.overlays,e.overlays)),n=s.mapSubtract(e.baseLayers,t.baseLayers),i=s.mapSubtract(e.overlays,t.overlays);for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];this.layersControl.removeLayer(a)}for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];this.layersControl.addBaseLayer(a,o)}for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];this.layersControl.addOverlay(a,o)}return new l(r,s.mergeMaps(n,i))},e}(),u=function(){function e(e){this.leafletDirective=new n(e),this.controlLayers=new p}return e.prototype.ngOnInit=function(){this.leafletDirective.init(),this.controlLayers.init(this.layersControlConfig,this.layersControlOptions).addTo(this.leafletDirective.getMap())},e.prototype.ngOnChanges=function(e){e.layersControlCfg&&this.controlLayers.setLayersControlConfig(e.layersControlCfg.currentValue,e.layersControlCfg.previousValue)},e}();__decorate([t.Input("leafletLayersControl"),__metadata("design:type",Object)],u.prototype,"layersControlConfig",void 0),__decorate([t.Input("leafletLayersControlOptions"),__metadata("design:type",Object)],u.prototype,"layersControlOptions",void 0),u=__decorate([t.Directive({selector:"[leafletLayersControl]"}),__metadata("design:paramtypes",[e.LeafletDirective])],u);var c=function(){function e(e,t){this.baseLayers=e,this.overlays=t}return e}(),f=function(){function e(e){this.leafletDirective=new n(e),this.controlLayers=new p}return e.prototype.ngOnInit=function(){this.leafletDirective.init(),this.controlLayers.init({baseLayers:this.baseLayers},this.layersControlOptions).addTo(this.leafletDirective.getMap()),this.syncBaseLayer()},e.prototype.ngOnChanges=function(e){e.baseLayers&&this.setBaseLayers(e.baseLayers.currentValue,e.baseLayers.previousValue)},e.prototype.setBaseLayers=function(e,t){this.controlLayers.setLayersControlConfig(new c(e),new c(t)),this.syncBaseLayer()},e.prototype.syncBaseLayer=function(){var e,t=this.leafletDirective.getMap(),r=s.mapToArray(this.baseLayers);t.eachLayer(function(t){e=r.find(function(e){return t===e})}),null!=e?this.baseLayer=e:r.length>0&&(this.baseLayer=r[0],this.baseLayer.addTo(t))},e}();__decorate([t.Input("leafletBaseLayers"),__metadata("design:type",Object)],f.prototype,"baseLayers",void 0),__decorate([t.Input("leafletLayersControlOptions"),__metadata("design:type",Object)],f.prototype,"layersControlOptions",void 0),f=__decorate([t.Directive({selector:"[leafletBaseLayers]"}),__metadata("design:paramtypes",[e.LeafletDirective])],f),e.LeafletModule=function(){function e(){}return e}(),e.LeafletModule=__decorate([t.NgModule({imports:[],exports:[e.LeafletDirective,a,u,f],declarations:[e.LeafletDirective,a,u,f],providers:[]})],e.LeafletModule);var y=function(){function e(){}return e.prototype.diffLayers=function(e,t){var r,n;return r=s.mapSubtract(t,e),n=s.mapSubtract(e,t),new l(r,n)},e}(),d=function(){function e(e,t,r){this.type=e,this.url=t,this.options=r}return e.createTileLayer=function(e){var t;switch(e.type){case"xyz":t=L.tileLayer(e.url,e.options);break;case"wms":default:t=L.tileLayer.wms(e.url,e.options)}return t},e.createTileLayers=function(t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=e.createTileLayer(t[n]));return r},e.prototype.createTileLayer=function(){return e.createTileLayer(this)},e}();e.LeafletDirectiveWrapper=n,e.LeafletControlLayersUtil=y,e.LeafletLayersUtil=o,e.LeafletTileLayerDefinition=d,Object.defineProperty(e,"__esModule",{value:!0})});
/*! @asymmetrik/angular2-leaflet-1.2.1 - Copyright Asymmetrik, Ltd. 2007-2017 - All Rights Reserved.*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("leaflet")):"function"==typeof define&&define.amd?define(["exports","@angular/core","leaflet"],t):t(e.angular2Leaflet=e.angular2Leaflet||{},e.ng.core,e.L)}(this,function(e,t,n){"use strict";var r=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},o=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};e.LeafletDirective=function(){function e(e){this.DEFAULT_ZOOM=1,this.DEFAULT_CENTER=n.latLng([38.907192,-77.036871]),this.DEFAULT_FPZ_OPTIONS={},this.fitBoundsOptions=this.DEFAULT_FPZ_OPTIONS,this.panOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomOptions=this.DEFAULT_FPZ_OPTIONS,this.zoomPanOptions=this.DEFAULT_FPZ_OPTIONS,this.options={},this.mapReady=new t.EventEmitter,this.element=e}return e.prototype.ngOnInit=function(){this.map=n.map(this.element.nativeElement,this.options),null!=this.center&&null!=this.zoom&&this.setView(this.center,this.zoom),null!=this.fitBounds&&this.setFitBounds(this.fitBounds),this.doResize(),this.mapReady.emit(this.map)},e.prototype.ngOnChanges=function(e){e.zoom&&e.center&&null!=this.zoom&&null!=this.center?this.setView(e.center.currentValue,e.zoom.currentValue):e.zoom?this.setZoom(e.zoom.currentValue):e.center&&this.setCenter(e.center.currentValue),e.fitBounds&&this.setFitBounds(e.fitBounds.currentValue)},e.prototype.getMap=function(){return this.map},e.prototype.onResize=function(){this.delayResize()},e.prototype.doResize=function(){this.map.invalidateSize({})},e.prototype.delayResize=function(){null!=this.resizeTimer&&clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout(this.doResize.bind(this),200)},e.prototype.setView=function(e,t){this.map&&null!=e&&null!=t&&this.map.setView(e,t,this.zoomPanOptions)},e.prototype.setZoom=function(e){this.map&&null!=e&&this.map.setZoom(e,this.zoomOptions)},e.prototype.setCenter=function(e){this.map&&null!=e&&this.map.panTo(e,this.panOptions)},e.prototype.setFitBounds=function(e){this.map&&null!=e&&this.map.fitBounds(e,this.fitBoundsOptions)},e}(),r([t.Input("leafletFitBoundsOptions"),o("design:type",Object)],e.LeafletDirective.prototype,"fitBoundsOptions",void 0),r([t.Input("leafletPanOptions"),o("design:type",Object)],e.LeafletDirective.prototype,"panOptions",void 0),r([t.Input("leafletZoomOptions"),o("design:type",Object)],e.LeafletDirective.prototype,"zoomOptions",void 0),r([t.Input("leafletZoomPanOptions"),o("design:type",Object)],e.LeafletDirective.prototype,"zoomPanOptions",void 0),r([t.Input("leafletOptions"),o("design:type",Object)],e.LeafletDirective.prototype,"options",void 0),r([t.Output("leafletMapReady"),o("design:type",Object)],e.LeafletDirective.prototype,"mapReady",void 0),r([t.Input("leafletZoom"),o("design:type",Number)],e.LeafletDirective.prototype,"zoom",void 0),r([t.Input("leafletCenter"),o("design:type",n.LatLng)],e.LeafletDirective.prototype,"center",void 0),r([t.Input("leafletFitBounds"),o("design:type",n.LatLngBounds)],e.LeafletDirective.prototype,"fitBounds",void 0),r([t.HostListener("window:resize",["$event"]),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],e.LeafletDirective.prototype,"onResize",null),e.LeafletDirective=r([t.Directive({selector:"[leaflet]"}),o("design:paramtypes",[t.ElementRef])],e.LeafletDirective);var i=function(){function e(e){this.leafletDirective=e}return e.prototype.init=function(){},e.prototype.getMap=function(){return this.leafletDirective.getMap()},e}(),a=function(){function e(e,t){this.remove=e,this.add=t}return e}(),s=function(){function e(){}return e.diffLayers=function(e,t){var n,r;return null==e&&(e=[]),null==t&&(t=[]),n=t.filter(function(t){return!e.find(function(e){return t===e})}),r=e.filter(function(e){return!t.find(function(t){return e===t})}),new a(n,r)},e}(),l=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},f=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=function(){function e(e){this.leafletDirective=new i(e)}return e.prototype.ngOnInit=function(){this.leafletDirective.init(),this.setLayers(this.layers,[])},e.prototype.ngOnChanges=function(e){if(e.layers){var t=e.layers.currentValue,n=e.layers.isFirstChange()?[]:e.layers.previousValue;this.setLayers(t,n)}},e.prototype.setLayers=function(e,t){var n=this.leafletDirective.getMap();if(null!=n){var r=s.diffLayers(e,t);r.remove.forEach(function(e){n.removeLayer(e)}),r.add.forEach(function(e){n.addLayer(e)})}},e}();l([t.Input("leafletLayers"),f("design:type",Array)],c.prototype,"layers",void 0),c=l([t.Directive({selector:"[leafletLayers]"}),f("design:paramtypes",[e.LeafletDirective])],c);var p=function(){function e(){}return e.mergeMaps=function(e,t){var n={};if(null!=e)for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);if(null!=t)for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n},e.mapSubtract=function(e,t){var n={};if(null!=e){for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);if(null!=t)for(var r in t)t.hasOwnProperty(r)&&delete n[r]}return n},e.mapToArray=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t},e}(),u=function(){function e(e,t){this.remove=e,this.add=t}return e}(),y=function(){function e(){}return e.prototype.getLayersControl=function(){return this.layersControl},e.prototype.init=function(e,t){var r=e.baseLayers||{},o=e.overlays||{};return this.layersControl=n.control.layers(r,o,t),this.layersControl},e.prototype.setLayersControlConfig=function(e,t){if(null==this.layersControl)return new u({},{});var n,r,o;n=p.mergeMaps(p.mapSubtract(t.baseLayers,e.baseLayers),p.mapSubtract(t.overlays,e.overlays)),r=p.mapSubtract(e.baseLayers,t.baseLayers),o=p.mapSubtract(e.overlays,t.overlays);for(var i in n)if(n.hasOwnProperty(i)){var a=n[i];this.layersControl.removeLayer(a)}for(var i in r)if(r.hasOwnProperty(i)){var a=r[i];this.layersControl.addBaseLayer(a,i)}for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];this.layersControl.addOverlay(a,i)}return new u(n,p.mergeMaps(r,o))},e}(),h=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},d=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},v=function(){function e(e){this.leafletDirective=new i(e),this.controlLayers=new y}return e.prototype.ngOnInit=function(){this.leafletDirective.init(),this.controlLayers.init(this.layersControlConfig,this.layersControlOptions).addTo(this.leafletDirective.getMap())},e.prototype.ngOnChanges=function(e){e.layersControlCfg&&this.controlLayers.setLayersControlConfig(e.layersControlCfg.currentValue,e.layersControlCfg.previousValue)},e}();h([t.Input("leafletLayersControl"),d("design:type",Object)],v.prototype,"layersControlConfig",void 0),h([t.Input("leafletLayersControlOptions"),d("design:type",Object)],v.prototype,"layersControlOptions",void 0),v=h([t.Directive({selector:"[leafletLayersControl]"}),d("design:paramtypes",[e.LeafletDirective])],v);var m=function(){function e(e,t){this.baseLayers=e,this.overlays=t}return e}(),O=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},g=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},b=function(){function e(e){this.leafletDirective=new i(e),this.controlLayers=new y}return e.prototype.ngOnInit=function(){this.leafletDirective.init(),this.controlLayers.init({baseLayers:this.baseLayers},this.layersControlOptions).addTo(this.leafletDirective.getMap()),this.syncBaseLayer()},e.prototype.ngOnChanges=function(e){e.baseLayers&&this.setBaseLayers(e.baseLayers.currentValue,e.baseLayers.previousValue)},e.prototype.setBaseLayers=function(e,t){this.controlLayers.setLayersControlConfig(new m(e),new m(t)),this.syncBaseLayer()},e.prototype.syncBaseLayer=function(){var e,t=this.leafletDirective.getMap(),n=p.mapToArray(this.baseLayers);t.eachLayer(function(t){e=n.find(function(e){return t===e})}),null!=e?this.baseLayer=e:n.length>0&&(this.baseLayer=n[0],this.baseLayer.addTo(t))},e}();O([t.Input("leafletBaseLayers"),g("design:type",Object)],b.prototype,"baseLayers",void 0),O([t.Input("leafletLayersControlOptions"),g("design:type",Object)],b.prototype,"layersControlOptions",void 0),b=O([t.Directive({selector:"[leafletBaseLayers]"}),g("design:paramtypes",[e.LeafletDirective])],b);var D=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};e.LeafletModule=function(){function e(){}return e}(),e.LeafletModule=D([t.NgModule({imports:[],exports:[e.LeafletDirective,c,v,b],declarations:[e.LeafletDirective,c,v,b],providers:[]})],e.LeafletModule);var C=function(){function e(){}return e.prototype.diffLayers=function(e,t){var n,r;return n=p.mapSubtract(t,e),r=p.mapSubtract(e,t),new u(n,r)},e}(),R=function(){function e(e,t,n){this.type=e,this.url=t,this.options=n}return e.createTileLayer=function(e){var t;switch(e.type){case"xyz":t=L.tileLayer(e.url,e.options);break;case"wms":default:t=L.tileLayer.wms(e.url,e.options)}return t},e.createTileLayers=function(t){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e.createTileLayer(t[r]));return n},e.prototype.createTileLayer=function(){return e.createTileLayer(this)},e}();e.LeafletDirectiveWrapper=i,e.LeafletControlLayersUtil=C,e.LeafletLayersUtil=s,e.LeafletTileLayerDefinition=R,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -0,1 +1,10 @@

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Directive, ElementRef, EventEmitter, HostListener, Input, Output } from '@angular/core';

@@ -2,0 +11,0 @@ import * as L from 'leaflet';

@@ -0,1 +1,10 @@

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Directive, Input } from '@angular/core';

@@ -2,0 +11,0 @@ import * as L from 'leaflet';

@@ -0,1 +1,10 @@

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Directive, Input } from '@angular/core';

@@ -2,0 +11,0 @@ import { LeafletDirective } from '../../core/leaflet.directive';

@@ -0,1 +1,10 @@

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Directive, Input } from '@angular/core';

@@ -2,0 +11,0 @@ import { LeafletDirective } from '../core/leaflet.directive';

@@ -0,1 +1,7 @@

var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { NgModule } from '@angular/core';

@@ -2,0 +8,0 @@ import { LeafletDirective } from './core/leaflet.directive';

@@ -5,3 +5,3 @@ {

"description": "Angular 2 components for Leaflet",
"version": "1.2.0",
"version": "1.2.1",

@@ -25,3 +25,3 @@ "author": "Asymmetrik, Ltd.",

"leaflet": "1.0"
"leaflet": "1"
},

@@ -54,3 +54,2 @@

"typescript": "2.1",
"ts-helpers": "1.1",
"tslint": "4.4",

@@ -57,0 +56,0 @@ "tslint-stylish": "2.1",

@@ -23,4 +23,4 @@ /**

import 'core-js/es7/reflect';
import 'ts-helpers';
// Global Imports

@@ -33,2 +33,3 @@ import 'bootstrap/dist/css/bootstrap.css';

// This addresses a weird thing with how Leaflet handles icon URLs. See README for details.

@@ -45,2 +46,3 @@ import 'leaflet/dist/images/marker-shadow.png';

// Angular2 Third-Party

@@ -47,0 +49,0 @@

@@ -9,3 +9,3 @@ {

"declaration": false,
"noEmitHelpers": true,
"noEmitHelpers": false,
"emitDecoratorMetadata": true,

@@ -12,0 +12,0 @@ "experimentalDecorators": true,

@@ -9,3 +9,3 @@ {

"declaration": true,
"noEmitHelpers": true,
"noEmitHelpers": false,
"emitDecoratorMetadata": true,

@@ -12,0 +12,0 @@ "experimentalDecorators": true,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc