@asymmetrik/ngx-leaflet
Advanced tools
Comparing version 5.0.2 to 6.0.0
# Changelog | ||
## 6.0 | ||
Support for Angular.io 8. | ||
## 5.0 | ||
@@ -38,2 +41,1 @@ Support for Angular.io 7. | ||
Renamed the package to ```ngx-leaflet``` | ||
@@ -1,2 +0,2 @@ | ||
/*! @asymmetrik/ngx-leaflet - 5.0.2 - Copyright Asymmetrik, Ltd. 2007-2019 - All Rights Reserved. + */ | ||
/*! @asymmetrik/ngx-leaflet - 6.0.0 - Copyright Asymmetrik, Ltd. 2007-2019 - All Rights Reserved. + */ | ||
(function (global, factory) { | ||
@@ -64,2 +64,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('leaflet')) : | ||
this.onMouseOver = new core.EventEmitter(); | ||
this.onMouseOut = new core.EventEmitter(); | ||
// Map Move Events | ||
@@ -153,2 +154,3 @@ this.onMapMove = new core.EventEmitter(); | ||
this.map.on('mouseover', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMouseOver, e); }); | ||
this.map.on('mouseout', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMouseOut, e); }); | ||
this.map.on('mousemove', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMouseMove, e); }); | ||
@@ -343,2 +345,6 @@ this.map.on('zoomstart', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMapZoomStart, e); }); | ||
__decorate([ | ||
core.Output('leafletMouseOut'), | ||
__metadata("design:type", Object) | ||
], LeafletDirective.prototype, "onMouseOut", void 0); | ||
__decorate([ | ||
core.Output('leafletMapMove'), | ||
@@ -963,4 +969,11 @@ __metadata("design:type", Object) | ||
exports.LeafletBaseLayersDirective = LeafletBaseLayersDirective; | ||
exports.LeafletControlLayersChanges = LeafletControlLayersChanges; | ||
exports.LeafletControlLayersConfig = LeafletControlLayersConfig; | ||
exports.LeafletControlLayersWrapper = LeafletControlLayersWrapper; | ||
exports.LeafletDirective = LeafletDirective; | ||
exports.LeafletDirectiveWrapper = LeafletDirectiveWrapper; | ||
exports.LeafletLayerDirective = LeafletLayerDirective; | ||
exports.LeafletLayersControlDirective = LeafletLayersControlDirective; | ||
exports.LeafletLayersDirective = LeafletLayersDirective; | ||
exports.LeafletModule = LeafletModule; | ||
@@ -967,0 +980,0 @@ exports.LeafletTileLayerDefinition = LeafletTileLayerDefinition; |
@@ -1,2 +0,2 @@ | ||
/*! @asymmetrik/ngx-leaflet - 5.0.2 - Copyright Asymmetrik, Ltd. 2007-2019 - All Rights Reserved. + */ | ||
/*! @asymmetrik/ngx-leaflet - 6.0.0 - Copyright Asymmetrik, Ltd. 2007-2019 - All Rights Reserved. + */ | ||
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports,require("@angular/core"),require("leaflet")):typeof define==="function"&&define.amd?define(["exports","@angular/core","leaflet"],factory):(global=global||self,factory(global.ngxLeaflet={},global.ng.core,global.L))})(this,function(exports,core,leaflet){"use strict";var LeafletUtil=/** @class */function(){function LeafletUtil(){}LeafletUtil.mapToArray=function(map){var toReturn=[];for(var k in map){if(map.hasOwnProperty(k)){toReturn.push(map[k])}}return toReturn};LeafletUtil.handleEvent=function(zone,eventEmitter,event){ | ||
@@ -10,3 +10,3 @@ // Don't want to emit if there are no observers | ||
// Mouse Map Events | ||
this.onClick=new core.EventEmitter;this.onDoubleClick=new core.EventEmitter;this.onMouseDown=new core.EventEmitter;this.onMouseUp=new core.EventEmitter;this.onMouseMove=new core.EventEmitter;this.onMouseOver=new core.EventEmitter; | ||
this.onClick=new core.EventEmitter;this.onDoubleClick=new core.EventEmitter;this.onMouseDown=new core.EventEmitter;this.onMouseUp=new core.EventEmitter;this.onMouseMove=new core.EventEmitter;this.onMouseOver=new core.EventEmitter;this.onMouseOut=new core.EventEmitter; | ||
// Map Move Events | ||
@@ -45,3 +45,3 @@ this.onMapMove=new core.EventEmitter;this.onMapMoveStart=new core.EventEmitter;this.onMapMoveEnd=new core.EventEmitter; | ||
// Add all the pass-through mouse event handlers | ||
this.map.on("click",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onClick,e)});this.map.on("dblclick",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onDoubleClick,e)});this.map.on("mousedown",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseDown,e)});this.map.on("mouseup",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseUp,e)});this.map.on("mouseover",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseOver,e)});this.map.on("mousemove",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseMove,e)});this.map.on("zoomstart",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapZoomStart,e)});this.map.on("zoom",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapZoom,e)});this.map.on("zoomend",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapZoomEnd,e)});this.map.on("movestart",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapMoveStart,e)});this.map.on("move",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapMove,e)});this.map.on("moveend",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapMoveEnd,e)}); | ||
this.map.on("click",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onClick,e)});this.map.on("dblclick",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onDoubleClick,e)});this.map.on("mousedown",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseDown,e)});this.map.on("mouseup",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseUp,e)});this.map.on("mouseover",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseOver,e)});this.map.on("mouseout",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseOut,e)});this.map.on("mousemove",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMouseMove,e)});this.map.on("zoomstart",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapZoomStart,e)});this.map.on("zoom",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapZoom,e)});this.map.on("zoomend",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapZoomEnd,e)});this.map.on("movestart",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapMoveStart,e)});this.map.on("move",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapMove,e)});this.map.on("moveend",function(e){return LeafletUtil.handleEvent(_this.zone,_this.onMapMoveEnd,e)}); | ||
// Update any things for which we provide output bindings | ||
@@ -87,3 +87,3 @@ this.map.on("zoomend moveend",function(){var zoom=_this.map.getZoom();if(zoom!==_this.zoom){_this.zoom=zoom;LeafletUtil.handleEvent(_this.zone,_this.zoomChange,zoom)}var center=_this.map.getCenter();if(null!=center||null!=_this.center){if((null==center||null==_this.center)&¢er!==_this.center||(center.lat!==_this.center.lat||center.lng!==_this.center.lng)){_this.center=center;LeafletUtil.handleEvent(_this.zone,_this.centerChange,center)}}})}; | ||
* @param number the new min zoom | ||
*/LeafletDirective.prototype.setMaxZoom=function(zoom){if(this.map&&null!=zoom){this.map.setMaxZoom(zoom)}};__decorate([core.Input("leafletFitBoundsOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"fitBoundsOptions",void 0);__decorate([core.Input("leafletPanOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"panOptions",void 0);__decorate([core.Input("leafletZoomOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"zoomOptions",void 0);__decorate([core.Input("leafletZoomPanOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"zoomPanOptions",void 0);__decorate([core.Input("leafletOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"options",void 0);__decorate([core.Output("leafletMapReady"),__metadata("design:type",Object)],LeafletDirective.prototype,"mapReady",void 0);__decorate([core.Input("leafletZoom"),__metadata("design:type",Number)],LeafletDirective.prototype,"zoom",void 0);__decorate([core.Output("leafletZoomChange"),__metadata("design:type",Object)],LeafletDirective.prototype,"zoomChange",void 0);__decorate([core.Input("leafletCenter"),__metadata("design:type",leaflet.LatLng)],LeafletDirective.prototype,"center",void 0);__decorate([core.Output("leafletCenterChange"),__metadata("design:type",Object)],LeafletDirective.prototype,"centerChange",void 0);__decorate([core.Input("leafletFitBounds"),__metadata("design:type",leaflet.LatLngBounds)],LeafletDirective.prototype,"fitBounds",void 0);__decorate([core.Input("leafletMaxBounds"),__metadata("design:type",leaflet.LatLngBounds)],LeafletDirective.prototype,"maxBounds",void 0);__decorate([core.Input("leafletMinZoom"),__metadata("design:type",Number)],LeafletDirective.prototype,"minZoom",void 0);__decorate([core.Input("leafletMaxZoom"),__metadata("design:type",Number)],LeafletDirective.prototype,"maxZoom",void 0);__decorate([core.Output("leafletClick"),__metadata("design:type",Object)],LeafletDirective.prototype,"onClick",void 0);__decorate([core.Output("leafletDoubleClick"),__metadata("design:type",Object)],LeafletDirective.prototype,"onDoubleClick",void 0);__decorate([core.Output("leafletMouseDown"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseDown",void 0);__decorate([core.Output("leafletMouseUp"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseUp",void 0);__decorate([core.Output("leafletMouseMove"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseMove",void 0);__decorate([core.Output("leafletMouseOver"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseOver",void 0);__decorate([core.Output("leafletMapMove"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapMove",void 0);__decorate([core.Output("leafletMapMoveStart"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapMoveStart",void 0);__decorate([core.Output("leafletMapMoveEnd"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapMoveEnd",void 0);__decorate([core.Output("leafletMapZoom"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapZoom",void 0);__decorate([core.Output("leafletMapZoomStart"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapZoomStart",void 0);__decorate([core.Output("leafletMapZoomEnd"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapZoomEnd",void 0);__decorate([core.HostListener("window:resize",[]),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],LeafletDirective.prototype,"onResize",null);LeafletDirective=__decorate([core.Directive({selector:"[leaflet]"}),__metadata("design:paramtypes",[core.ElementRef,core.NgZone])],LeafletDirective);return LeafletDirective}();var LeafletDirectiveWrapper=/** @class */function(){function LeafletDirectiveWrapper(leafletDirective){this.leafletDirective=leafletDirective}LeafletDirectiveWrapper.prototype.init=function(){ | ||
*/LeafletDirective.prototype.setMaxZoom=function(zoom){if(this.map&&null!=zoom){this.map.setMaxZoom(zoom)}};__decorate([core.Input("leafletFitBoundsOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"fitBoundsOptions",void 0);__decorate([core.Input("leafletPanOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"panOptions",void 0);__decorate([core.Input("leafletZoomOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"zoomOptions",void 0);__decorate([core.Input("leafletZoomPanOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"zoomPanOptions",void 0);__decorate([core.Input("leafletOptions"),__metadata("design:type",Object)],LeafletDirective.prototype,"options",void 0);__decorate([core.Output("leafletMapReady"),__metadata("design:type",Object)],LeafletDirective.prototype,"mapReady",void 0);__decorate([core.Input("leafletZoom"),__metadata("design:type",Number)],LeafletDirective.prototype,"zoom",void 0);__decorate([core.Output("leafletZoomChange"),__metadata("design:type",Object)],LeafletDirective.prototype,"zoomChange",void 0);__decorate([core.Input("leafletCenter"),__metadata("design:type",leaflet.LatLng)],LeafletDirective.prototype,"center",void 0);__decorate([core.Output("leafletCenterChange"),__metadata("design:type",Object)],LeafletDirective.prototype,"centerChange",void 0);__decorate([core.Input("leafletFitBounds"),__metadata("design:type",leaflet.LatLngBounds)],LeafletDirective.prototype,"fitBounds",void 0);__decorate([core.Input("leafletMaxBounds"),__metadata("design:type",leaflet.LatLngBounds)],LeafletDirective.prototype,"maxBounds",void 0);__decorate([core.Input("leafletMinZoom"),__metadata("design:type",Number)],LeafletDirective.prototype,"minZoom",void 0);__decorate([core.Input("leafletMaxZoom"),__metadata("design:type",Number)],LeafletDirective.prototype,"maxZoom",void 0);__decorate([core.Output("leafletClick"),__metadata("design:type",Object)],LeafletDirective.prototype,"onClick",void 0);__decorate([core.Output("leafletDoubleClick"),__metadata("design:type",Object)],LeafletDirective.prototype,"onDoubleClick",void 0);__decorate([core.Output("leafletMouseDown"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseDown",void 0);__decorate([core.Output("leafletMouseUp"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseUp",void 0);__decorate([core.Output("leafletMouseMove"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseMove",void 0);__decorate([core.Output("leafletMouseOver"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseOver",void 0);__decorate([core.Output("leafletMouseOut"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMouseOut",void 0);__decorate([core.Output("leafletMapMove"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapMove",void 0);__decorate([core.Output("leafletMapMoveStart"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapMoveStart",void 0);__decorate([core.Output("leafletMapMoveEnd"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapMoveEnd",void 0);__decorate([core.Output("leafletMapZoom"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapZoom",void 0);__decorate([core.Output("leafletMapZoomStart"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapZoomStart",void 0);__decorate([core.Output("leafletMapZoomEnd"),__metadata("design:type",Object)],LeafletDirective.prototype,"onMapZoomEnd",void 0);__decorate([core.HostListener("window:resize",[]),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],LeafletDirective.prototype,"onResize",null);LeafletDirective=__decorate([core.Directive({selector:"[leaflet]"}),__metadata("design:paramtypes",[core.ElementRef,core.NgZone])],LeafletDirective);return LeafletDirective}();var LeafletDirectiveWrapper=/** @class */function(){function LeafletDirectiveWrapper(leafletDirective){this.leafletDirective=leafletDirective}LeafletDirectiveWrapper.prototype.init=function(){ | ||
// Nothing for now | ||
@@ -219,3 +219,3 @@ };LeafletDirectiveWrapper.prototype.getMap=function(){return this.leafletDirective.getMap()};return LeafletDirectiveWrapper}();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$1=undefined&&undefined.__metadata||function(k,v){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(k,v)}; | ||
* @returns {TileLayer} A new TileLayer | ||
*/LeafletTileLayerDefinition.prototype.createTileLayer=function(){return LeafletTileLayerDefinition.createTileLayer(this)};return LeafletTileLayerDefinition}();exports.LeafletDirective=LeafletDirective;exports.LeafletDirectiveWrapper=LeafletDirectiveWrapper;exports.LeafletModule=LeafletModule;exports.LeafletTileLayerDefinition=LeafletTileLayerDefinition;exports.LeafletUtil=LeafletUtil;Object.defineProperty(exports,"__esModule",{value:true})}); | ||
*/LeafletTileLayerDefinition.prototype.createTileLayer=function(){return LeafletTileLayerDefinition.createTileLayer(this)};return LeafletTileLayerDefinition}();exports.LeafletBaseLayersDirective=LeafletBaseLayersDirective;exports.LeafletControlLayersChanges=LeafletControlLayersChanges;exports.LeafletControlLayersConfig=LeafletControlLayersConfig;exports.LeafletControlLayersWrapper=LeafletControlLayersWrapper;exports.LeafletDirective=LeafletDirective;exports.LeafletDirectiveWrapper=LeafletDirectiveWrapper;exports.LeafletLayerDirective=LeafletLayerDirective;exports.LeafletLayersControlDirective=LeafletLayersControlDirective;exports.LeafletLayersDirective=LeafletLayersDirective;exports.LeafletModule=LeafletModule;exports.LeafletTileLayerDefinition=LeafletTileLayerDefinition;exports.LeafletUtil=LeafletUtil;Object.defineProperty(exports,"__esModule",{value:true})}); | ||
//# sourceMappingURL=ngx-leaflet.js.map |
export { LeafletModule } from './leaflet/leaflet.module'; | ||
export { LeafletDirective } from './leaflet/core/leaflet.directive'; | ||
export { LeafletDirectiveWrapper } from './leaflet/core/leaflet.directive.wrapper'; | ||
export { LeafletUtil } from './leaflet/core/leaflet.util'; | ||
export { LeafletLayerDirective } from './leaflet/layers/leaflet-layer.directive'; | ||
export { LeafletLayersDirective } from './leaflet/layers/leaflet-layers.directive'; | ||
export { LeafletTileLayerDefinition } from './leaflet/layers/leaflet-tile-layer-definition.model'; | ||
export { LeafletUtil } from './leaflet/core/leaflet.util'; | ||
export { LeafletBaseLayersDirective } from './leaflet/layers/base/leaflet-baselayers.directive'; | ||
export { LeafletLayersControlDirective } from './leaflet/layers/control/leaflet-control-layers.directive'; | ||
export { LeafletControlLayersWrapper } from './leaflet/layers/control/leaflet-control-layers.wrapper'; | ||
export { LeafletControlLayersConfig } from './leaflet/layers/control/leaflet-control-layers-config.model'; | ||
export { LeafletControlLayersChanges } from './leaflet/layers/control/leaflet-control-layers-changes.model'; |
export { LeafletModule } from './leaflet/leaflet.module'; | ||
export { LeafletDirective } from './leaflet/core/leaflet.directive'; | ||
export { LeafletDirectiveWrapper } from './leaflet/core/leaflet.directive.wrapper'; | ||
export { LeafletUtil } from './leaflet/core/leaflet.util'; | ||
export { LeafletLayerDirective } from './leaflet/layers/leaflet-layer.directive'; | ||
export { LeafletLayersDirective } from './leaflet/layers/leaflet-layers.directive'; | ||
export { LeafletTileLayerDefinition } from './leaflet/layers/leaflet-tile-layer-definition.model'; | ||
export { LeafletUtil } from './leaflet/core/leaflet.util'; | ||
export { LeafletBaseLayersDirective } from './leaflet/layers/base/leaflet-baselayers.directive'; | ||
export { LeafletLayersControlDirective } from './leaflet/layers/control/leaflet-control-layers.directive'; | ||
export { LeafletControlLayersWrapper } from './leaflet/layers/control/leaflet-control-layers.wrapper'; | ||
export { LeafletControlLayersConfig } from './leaflet/layers/control/leaflet-control-layers-config.model'; | ||
export { LeafletControlLayersChanges } from './leaflet/layers/control/leaflet-control-layers-changes.model'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./leaflet/leaflet.module","export":["LeafletModule"]},{"from":"./leaflet/core/leaflet.directive","export":["LeafletDirective"]},{"from":"./leaflet/core/leaflet.directive.wrapper","export":["LeafletDirectiveWrapper"]},{"from":"./leaflet/layers/leaflet-tile-layer-definition.model","export":["LeafletTileLayerDefinition"]},{"from":"./leaflet/core/leaflet.util","export":["LeafletUtil"]}]}] | ||
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./leaflet/leaflet.module","export":["LeafletModule"]},{"from":"./leaflet/core/leaflet.directive","export":["LeafletDirective"]},{"from":"./leaflet/core/leaflet.directive.wrapper","export":["LeafletDirectiveWrapper"]},{"from":"./leaflet/core/leaflet.util","export":["LeafletUtil"]},{"from":"./leaflet/layers/leaflet-layer.directive","export":["LeafletLayerDirective"]},{"from":"./leaflet/layers/leaflet-layers.directive","export":["LeafletLayersDirective"]},{"from":"./leaflet/layers/leaflet-tile-layer-definition.model","export":["LeafletTileLayerDefinition"]},{"from":"./leaflet/layers/base/leaflet-baselayers.directive","export":["LeafletBaseLayersDirective"]},{"from":"./leaflet/layers/control/leaflet-control-layers.directive","export":["LeafletLayersControlDirective"]},{"from":"./leaflet/layers/control/leaflet-control-layers.wrapper","export":["LeafletControlLayersWrapper"]},{"from":"./leaflet/layers/control/leaflet-control-layers-config.model","export":["LeafletControlLayersConfig"]},{"from":"./leaflet/layers/control/leaflet-control-layers-changes.model","export":["LeafletControlLayersChanges"]}]}] |
@@ -31,2 +31,3 @@ import { ElementRef, EventEmitter, NgZone, OnChanges, OnInit, SimpleChange } from '@angular/core'; | ||
onMouseOver: EventEmitter<LeafletMouseEvent>; | ||
onMouseOut: EventEmitter<LeafletMouseEvent>; | ||
onMapMove: EventEmitter<LeafletEvent>; | ||
@@ -33,0 +34,0 @@ onMapMoveStart: EventEmitter<LeafletEvent>; |
@@ -37,2 +37,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
this.onMouseOver = new EventEmitter(); | ||
this.onMouseOut = new EventEmitter(); | ||
// Map Move Events | ||
@@ -126,2 +127,3 @@ this.onMapMove = new EventEmitter(); | ||
this.map.on('mouseover', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMouseOver, e); }); | ||
this.map.on('mouseout', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMouseOut, e); }); | ||
this.map.on('mousemove', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMouseMove, e); }); | ||
@@ -316,2 +318,6 @@ this.map.on('zoomstart', function (e) { return LeafletUtil.handleEvent(_this.zone, _this.onMapZoomStart, e); }); | ||
__decorate([ | ||
Output('leafletMouseOut'), | ||
__metadata("design:type", Object) | ||
], LeafletDirective.prototype, "onMouseOut", void 0); | ||
__decorate([ | ||
Output('leafletMapMove'), | ||
@@ -318,0 +324,0 @@ __metadata("design:type", Object) |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"LeafletDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":9,"character":1},"arguments":[{"selector":"[leaflet]"}]}],"members":{"fitBoundsOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":2},"arguments":["leafletFitBoundsOptions"]}]}],"panOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":2},"arguments":["leafletPanOptions"]}]}],"zoomOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":2},"arguments":["leafletZoomOptions"]}]}],"zoomPanOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":2},"arguments":["leafletZoomPanOptions"]}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":2},"arguments":["leafletOptions"]}]}],"mapReady":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":34,"character":2},"arguments":["leafletMapReady"]}]}],"zoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":2},"arguments":["leafletZoom"]}]}],"zoomChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":38,"character":2},"arguments":["leafletZoomChange"]}]}],"center":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":2},"arguments":["leafletCenter"]}]}],"centerChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":2},"arguments":["leafletCenterChange"]}]}],"fitBounds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":2},"arguments":["leafletFitBounds"]}]}],"maxBounds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":48,"character":2},"arguments":["leafletMaxBounds"]}]}],"minZoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":2},"arguments":["leafletMinZoom"]}]}],"maxZoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":54,"character":2},"arguments":["leafletMaxZoom"]}]}],"onClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":58,"character":2},"arguments":["leafletClick"]}]}],"onDoubleClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":59,"character":2},"arguments":["leafletDoubleClick"]}]}],"onMouseDown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":60,"character":2},"arguments":["leafletMouseDown"]}]}],"onMouseUp":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":61,"character":2},"arguments":["leafletMouseUp"]}]}],"onMouseMove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":62,"character":2},"arguments":["leafletMouseMove"]}]}],"onMouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":63,"character":2},"arguments":["leafletMouseOver"]}]}],"onMapMove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":66,"character":2},"arguments":["leafletMapMove"]}]}],"onMapMoveStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":67,"character":2},"arguments":["leafletMapMoveStart"]}]}],"onMapMoveEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":68,"character":2},"arguments":["leafletMapMoveEnd"]}]}],"onMapZoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":71,"character":2},"arguments":["leafletMapZoom"]}]}],"onMapZoomStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":72,"character":2},"arguments":["leafletMapZoomStart"]}]}],"onMapZoomEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":73,"character":2},"arguments":["leafletMapZoomEnd"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":76,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":76,"character":56}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"getMap":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":168,"character":2},"arguments":["window:resize",[]]}]}],"addMapEventListeners":[{"__symbolic":"method"}],"doResize":[{"__symbolic":"method"}],"delayResize":[{"__symbolic":"method"}],"setView":[{"__symbolic":"method"}],"setZoom":[{"__symbolic":"method"}],"setCenter":[{"__symbolic":"method"}],"setFitBounds":[{"__symbolic":"method"}],"setMaxBounds":[{"__symbolic":"method"}],"setMinZoom":[{"__symbolic":"method"}],"setMaxZoom":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"LeafletDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":9,"character":1},"arguments":[{"selector":"[leaflet]"}]}],"members":{"fitBoundsOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":2},"arguments":["leafletFitBoundsOptions"]}]}],"panOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":25,"character":2},"arguments":["leafletPanOptions"]}]}],"zoomOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":2},"arguments":["leafletZoomOptions"]}]}],"zoomPanOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":2},"arguments":["leafletZoomPanOptions"]}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":2},"arguments":["leafletOptions"]}]}],"mapReady":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":34,"character":2},"arguments":["leafletMapReady"]}]}],"zoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":2},"arguments":["leafletZoom"]}]}],"zoomChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":38,"character":2},"arguments":["leafletZoomChange"]}]}],"center":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":2},"arguments":["leafletCenter"]}]}],"centerChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":2},"arguments":["leafletCenterChange"]}]}],"fitBounds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":45,"character":2},"arguments":["leafletFitBounds"]}]}],"maxBounds":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":48,"character":2},"arguments":["leafletMaxBounds"]}]}],"minZoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":2},"arguments":["leafletMinZoom"]}]}],"maxZoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":54,"character":2},"arguments":["leafletMaxZoom"]}]}],"onClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":58,"character":2},"arguments":["leafletClick"]}]}],"onDoubleClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":59,"character":2},"arguments":["leafletDoubleClick"]}]}],"onMouseDown":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":60,"character":2},"arguments":["leafletMouseDown"]}]}],"onMouseUp":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":61,"character":2},"arguments":["leafletMouseUp"]}]}],"onMouseMove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":62,"character":2},"arguments":["leafletMouseMove"]}]}],"onMouseOver":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":63,"character":2},"arguments":["leafletMouseOver"]}]}],"onMouseOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":64,"character":2},"arguments":["leafletMouseOut"]}]}],"onMapMove":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":67,"character":2},"arguments":["leafletMapMove"]}]}],"onMapMoveStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":68,"character":2},"arguments":["leafletMapMoveStart"]}]}],"onMapMoveEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":69,"character":2},"arguments":["leafletMapMoveEnd"]}]}],"onMapZoom":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":72,"character":2},"arguments":["leafletMapZoom"]}]}],"onMapZoomStart":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":73,"character":2},"arguments":["leafletMapZoomStart"]}]}],"onMapZoomEnd":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":74,"character":2},"arguments":["leafletMapZoomEnd"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":77,"character":30},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":77,"character":56}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"getMap":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":169,"character":2},"arguments":["window:resize",[]]}]}],"addMapEventListeners":[{"__symbolic":"method"}],"doResize":[{"__symbolic":"method"}],"delayResize":[{"__symbolic":"method"}],"setView":[{"__symbolic":"method"}],"setZoom":[{"__symbolic":"method"}],"setCenter":[{"__symbolic":"method"}],"setFitBounds":[{"__symbolic":"method"}],"setMaxBounds":[{"__symbolic":"method"}],"setMinZoom":[{"__symbolic":"method"}],"setMaxZoom":[{"__symbolic":"method"}]}}}}] |
@@ -6,3 +6,3 @@ { | ||
"description": "Angular.io components for Leaflet", | ||
"version": "5.0.2", | ||
"version": "6.0.0", | ||
"author": "Asymmetrik, Ltd.", | ||
@@ -36,16 +36,16 @@ "copyright": "Copyright Asymmetrik, Ltd. 2007-2019 - All Rights Reserved.", | ||
"peerDependencies": { | ||
"@angular/core": ">=7", | ||
"@angular/common": ">=7", | ||
"@angular/core": ">=8", | ||
"@angular/common": ">=8", | ||
"leaflet": "1" | ||
}, | ||
"devDependencies": { | ||
"@angular/common": "7", | ||
"@angular/compiler": "7", | ||
"@angular/compiler-cli": "7", | ||
"@angular/core": "7", | ||
"@angular/forms": "7", | ||
"@angular/platform-browser": "7", | ||
"@angular/platform-browser-dynamic": "7", | ||
"@angular/common": "8", | ||
"@angular/compiler": "8", | ||
"@angular/compiler-cli": "8", | ||
"@angular/core": "8", | ||
"@angular/forms": "8", | ||
"@angular/platform-browser": "8", | ||
"@angular/platform-browser-dynamic": "8", | ||
"@types/leaflet": "1", | ||
"@types/node": "10", | ||
"@types/node": "12", | ||
"angular2-template-loader": "0.6", | ||
@@ -55,4 +55,4 @@ "awesome-typescript-loader": "5", | ||
"core-js": "2.6", | ||
"css-loader": "2", | ||
"file-loader": "3", | ||
"css-loader": "3", | ||
"file-loader": "4", | ||
"html-loader": "0.5", | ||
@@ -70,5 +70,5 @@ "html-webpack-plugin": "3", | ||
"tslint": "5", | ||
"typescript": "3.1", | ||
"typescript": "3.4", | ||
"uglify-js": "3", | ||
"url-loader": "1", | ||
"url-loader": "2", | ||
"watch": "1", | ||
@@ -79,4 +79,4 @@ "webpack": "4", | ||
"webpack-stats-plugin": "0.2", | ||
"zone.js": "0.8" | ||
"zone.js": "0.9" | ||
} | ||
} |
@@ -383,3 +383,2 @@ # @asymmetrik/ngx-leaflet | ||
<<<<<<< HEAD | ||
#### [leafletLayersControlOptions] | ||
@@ -479,2 +478,3 @@ Input binding for Control.Layers options (see [Leaflet's](http://leafletjs.com) docs). | ||
* ```(leafletMouseOver)``` | ||
* ```(leafletMouseOut)``` | ||
@@ -526,2 +526,6 @@ #### Map Zoom and Move: LeafletEvent | ||
#### Inject LeafletDirective into your Component | ||
This is the more advanced technique and it won't always work depending on your setup. | ||
In particular, this will likely not work unless you are writing your own third-party library that extends the functionality of `ngx-leaflet`. | ||
If this approach does not work for you, try using the `leafletMapReady` event described above. | ||
In Angular.io, directives are injectable the same way that Services are. | ||
@@ -531,2 +535,3 @@ This means that you can create your own component or directive and inject the ```LeafletDirective``` into it. | ||
```html | ||
@@ -563,2 +568,3 @@ <!-- On the same DOM element --> | ||
The benefit of this approach is it's a bit cleaner if you're interested in adding some reusable capability to the existing leaflet map directive. | ||
As mentioned above, it might not work depending on how you are packaging your component. | ||
This is how the ```@asymmetrik/ngx-leaflet-draw``` and ```@asymmetrik/ngx-leaflet-d3``` packages work, so you can use them as references. | ||
@@ -565,0 +571,0 @@ |
@@ -5,4 +5,13 @@ export { LeafletModule } from './leaflet/leaflet.module'; | ||
export { LeafletDirectiveWrapper } from './leaflet/core/leaflet.directive.wrapper'; | ||
export { LeafletUtil } from './leaflet/core/leaflet.util'; | ||
export { LeafletLayerDirective } from './leaflet/layers/leaflet-layer.directive'; | ||
export { LeafletLayersDirective } from './leaflet/layers/leaflet-layers.directive'; | ||
export { LeafletTileLayerDefinition } from './leaflet/layers/leaflet-tile-layer-definition.model'; | ||
export { LeafletUtil } from './leaflet/core/leaflet.util'; | ||
export { LeafletBaseLayersDirective } from './leaflet/layers/base/leaflet-baselayers.directive'; | ||
export { LeafletLayersControlDirective } from './leaflet/layers/control/leaflet-control-layers.directive'; | ||
export { LeafletControlLayersWrapper } from './leaflet/layers/control/leaflet-control-layers.wrapper'; | ||
export { LeafletControlLayersConfig } from './leaflet/layers/control/leaflet-control-layers-config.model'; | ||
export { LeafletControlLayersChanges } from './leaflet/layers/control/leaflet-control-layers-changes.model'; |
@@ -65,2 +65,3 @@ import { | ||
@Output('leafletMouseOver') onMouseOver = new EventEmitter<LeafletMouseEvent>(); | ||
@Output('leafletMouseOut') onMouseOut = new EventEmitter<LeafletMouseEvent>(); | ||
@@ -183,2 +184,3 @@ // Map Move Events | ||
this.map.on('mouseover', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseOver, e)); | ||
this.map.on('mouseout', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseOut, e)); | ||
this.map.on('mousemove', (e: LeafletMouseEvent) => LeafletUtil.handleEvent(this.zone, this.onMouseMove, e)); | ||
@@ -185,0 +187,0 @@ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
353535
3802
726