(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"],{
/***/ "./node_modules/@agm/core/core.module.js":
/*!***********************************************!*\
!*** ./node_modules/@agm/core/core.module.js ***!
\***********************************************/
/*! exports provided: coreDirectives, AgmCoreModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "coreDirectives", function() { return coreDirectives; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmCoreModule", function() { return AgmCoreModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _directives_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./directives/map */ "./node_modules/@agm/core/directives/map.js");
/* harmony import */ var _directives_circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./directives/circle */ "./node_modules/@agm/core/directives/circle.js");
/* harmony import */ var _directives_info_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./directives/info-window */ "./node_modules/@agm/core/directives/info-window.js");
/* harmony import */ var _directives_marker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./directives/marker */ "./node_modules/@agm/core/directives/marker.js");
/* harmony import */ var _directives_polygon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./directives/polygon */ "./node_modules/@agm/core/directives/polygon.js");
/* harmony import */ var _directives_polyline__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./directives/polyline */ "./node_modules/@agm/core/directives/polyline.js");
/* harmony import */ var _directives_polyline_point__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./directives/polyline-point */ "./node_modules/@agm/core/directives/polyline-point.js");
/* harmony import */ var _directives_kml_layer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./directives/kml-layer */ "./node_modules/@agm/core/directives/kml-layer.js");
/* harmony import */ var _directives_data_layer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./directives/data-layer */ "./node_modules/@agm/core/directives/data-layer.js");
/* harmony import */ var _services_maps_api_loader_lazy_maps_api_loader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./services/maps-api-loader/lazy-maps-api-loader */ "./node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.js");
/* harmony import */ var _services_maps_api_loader_maps_api_loader__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./services/maps-api-loader/maps-api-loader */ "./node_modules/@agm/core/services/maps-api-loader/maps-api-loader.js");
/* harmony import */ var _utils_browser_globals__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/browser-globals */ "./node_modules/@agm/core/utils/browser-globals.js");
/**
* @internal
*/
function coreDirectives() {
return [
_directives_map__WEBPACK_IMPORTED_MODULE_1__["AgmMap"], _directives_marker__WEBPACK_IMPORTED_MODULE_4__["AgmMarker"], _directives_info_window__WEBPACK_IMPORTED_MODULE_3__["AgmInfoWindow"], _directives_circle__WEBPACK_IMPORTED_MODULE_2__["AgmCircle"],
_directives_polygon__WEBPACK_IMPORTED_MODULE_5__["AgmPolygon"], _directives_polyline__WEBPACK_IMPORTED_MODULE_6__["AgmPolyline"], _directives_polyline_point__WEBPACK_IMPORTED_MODULE_7__["AgmPolylinePoint"], _directives_kml_layer__WEBPACK_IMPORTED_MODULE_8__["AgmKmlLayer"],
_directives_data_layer__WEBPACK_IMPORTED_MODULE_9__["AgmDataLayer"]
];
}
/**
* The angular-google-maps core module. Contains all Directives/Services/Pipes
* of the core module. Please use `AgmCoreModule.forRoot()` in your app module.
*/
var AgmCoreModule = (function () {
function AgmCoreModule() {
}
/**
* Please use this method when you register the module at the root level.
*/
AgmCoreModule.forRoot = function (lazyMapsAPILoaderConfig) {
return {
ngModule: AgmCoreModule,
providers: _utils_browser_globals__WEBPACK_IMPORTED_MODULE_12__["BROWSER_GLOBALS_PROVIDERS"].concat([
{ provide: _services_maps_api_loader_maps_api_loader__WEBPACK_IMPORTED_MODULE_11__["MapsAPILoader"], useClass: _services_maps_api_loader_lazy_maps_api_loader__WEBPACK_IMPORTED_MODULE_10__["LazyMapsAPILoader"] },
{ provide: _services_maps_api_loader_lazy_maps_api_loader__WEBPACK_IMPORTED_MODULE_10__["LAZY_MAPS_API_CONFIG"], useValue: lazyMapsAPILoaderConfig }
]),
};
};
return AgmCoreModule;
}());
AgmCoreModule.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"], args: [{ declarations: coreDirectives(), exports: coreDirectives() },] },
];
/** @nocollapse */
AgmCoreModule.ctorParameters = function () { return []; };
//# sourceMappingURL=core.module.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives.js":
/*!**********************************************!*\
!*** ./node_modules/@agm/core/directives.js ***!
\**********************************************/
/*! exports provided: AgmMap, AgmCircle, AgmInfoWindow, AgmKmlLayer, AgmDataLayer, AgmMarker, AgmPolygon, AgmPolyline, AgmPolylinePoint */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _directives_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./directives/map */ "./node_modules/@agm/core/directives/map.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmMap", function() { return _directives_map__WEBPACK_IMPORTED_MODULE_0__["AgmMap"]; });
/* harmony import */ var _directives_circle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./directives/circle */ "./node_modules/@agm/core/directives/circle.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmCircle", function() { return _directives_circle__WEBPACK_IMPORTED_MODULE_1__["AgmCircle"]; });
/* harmony import */ var _directives_info_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./directives/info-window */ "./node_modules/@agm/core/directives/info-window.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmInfoWindow", function() { return _directives_info_window__WEBPACK_IMPORTED_MODULE_2__["AgmInfoWindow"]; });
/* harmony import */ var _directives_kml_layer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./directives/kml-layer */ "./node_modules/@agm/core/directives/kml-layer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmKmlLayer", function() { return _directives_kml_layer__WEBPACK_IMPORTED_MODULE_3__["AgmKmlLayer"]; });
/* harmony import */ var _directives_data_layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./directives/data-layer */ "./node_modules/@agm/core/directives/data-layer.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmDataLayer", function() { return _directives_data_layer__WEBPACK_IMPORTED_MODULE_4__["AgmDataLayer"]; });
/* harmony import */ var _directives_marker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./directives/marker */ "./node_modules/@agm/core/directives/marker.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmMarker", function() { return _directives_marker__WEBPACK_IMPORTED_MODULE_5__["AgmMarker"]; });
/* harmony import */ var _directives_polygon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./directives/polygon */ "./node_modules/@agm/core/directives/polygon.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmPolygon", function() { return _directives_polygon__WEBPACK_IMPORTED_MODULE_6__["AgmPolygon"]; });
/* harmony import */ var _directives_polyline__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./directives/polyline */ "./node_modules/@agm/core/directives/polyline.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmPolyline", function() { return _directives_polyline__WEBPACK_IMPORTED_MODULE_7__["AgmPolyline"]; });
/* harmony import */ var _directives_polyline_point__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./directives/polyline-point */ "./node_modules/@agm/core/directives/polyline-point.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmPolylinePoint", function() { return _directives_polyline_point__WEBPACK_IMPORTED_MODULE_8__["AgmPolylinePoint"]; });
//# sourceMappingURL=directives.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/circle.js":
/*!*****************************************************!*\
!*** ./node_modules/@agm/core/directives/circle.js ***!
\*****************************************************/
/*! exports provided: AgmCircle */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmCircle", function() { return AgmCircle; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_managers_circle_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/managers/circle-manager */ "./node_modules/@agm/core/services/managers/circle-manager.js");
var AgmCircle = (function () {
function AgmCircle(_manager) {
this._manager = _manager;
/**
* Indicates whether this Circle handles mouse events. Defaults to true.
*/
this.clickable = true;
/**
* If set to true, the user can drag this circle over the map. Defaults to false.
*/
// tslint:disable-next-line:no-input-rename
this.draggable = false;
/**
* If set to true, the user can edit this circle by dragging the control points shown at
* the center and around the circumference of the circle. Defaults to false.
*/
this.editable = false;
/**
* The radius in meters on the Earth's surface.
*/
this.radius = 0;
/**
* The stroke position. Defaults to CENTER.
* This property is not supported on Internet Explorer 8 and earlier.
*/
this.strokePosition = 'CENTER';
/**
* The stroke width in pixels.
*/
this.strokeWeight = 0;
/**
* Whether this circle is visible on the map. Defaults to true.
*/
this.visible = true;
/**
* This event is fired when the circle's center is changed.
*/
this.centerChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event emitter gets emitted when the user clicks on the circle.
*/
this.circleClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event emitter gets emitted when the user clicks on the circle.
*/
this.circleDblClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is repeatedly fired while the user drags the circle.
*/
this.drag = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user stops dragging the circle.
*/
this.dragEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user starts dragging the circle.
*/
this.dragStart = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM mousedown event is fired on the circle.
*/
this.mouseDown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM mousemove event is fired on the circle.
*/
this.mouseMove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired on circle mouseout.
*/
this.mouseOut = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired on circle mouseover.
*/
this.mouseOver = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM mouseup event is fired on the circle.
*/
this.mouseUp = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the circle's radius is changed.
*/
this.radiusChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the circle is right-clicked on.
*/
this.rightClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this._circleAddedToManager = false;
this._eventSubscriptions = [];
}
/** @internal */
AgmCircle.prototype.ngOnInit = function () {
this._manager.addCircle(this);
this._circleAddedToManager = true;
this._registerEventListeners();
};
/** @internal */
AgmCircle.prototype.ngOnChanges = function (changes) {
if (!this._circleAddedToManager) {
return;
}
if (changes['latitude'] || changes['longitude']) {
this._manager.setCenter(this);
}
if (changes['editable']) {
this._manager.setEditable(this);
}
if (changes['draggable']) {
this._manager.setDraggable(this);
}
if (changes['visible']) {
this._manager.setVisible(this);
}
if (changes['radius']) {
this._manager.setRadius(this);
}
this._updateCircleOptionsChanges(changes);
};
AgmCircle.prototype._updateCircleOptionsChanges = function (changes) {
var options = {};
var optionKeys = Object.keys(changes).filter(function (k) { return AgmCircle._mapOptions.indexOf(k) !== -1; });
optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });
if (optionKeys.length > 0) {
this._manager.setOptions(this, options);
}
};
AgmCircle.prototype._registerEventListeners = function () {
var _this = this;
var events = new Map();
events.set('center_changed', this.centerChange);
events.set('click', this.circleClick);
events.set('dblclick', this.circleDblClick);
events.set('drag', this.drag);
events.set('dragend', this.dragEnd);
events.set('dragStart', this.dragStart);
events.set('mousedown', this.mouseDown);
events.set('mousemove', this.mouseMove);
events.set('mouseout', this.mouseOut);
events.set('mouseover', this.mouseOver);
events.set('mouseup', this.mouseUp);
events.set('radius_changed', this.radiusChange);
events.set('rightclick', this.rightClick);
events.forEach(function (eventEmitter, eventName) {
_this._eventSubscriptions.push(_this._manager.createEventObservable(eventName, _this).subscribe(function (value) {
switch (eventName) {
case 'radius_changed':
_this._manager.getRadius(_this).then(function (radius) { return eventEmitter.emit(radius); });
break;
case 'center_changed':
_this._manager.getCenter(_this).then(function (center) {
return eventEmitter.emit({ lat: center.lat(), lng: center.lng() });
});
break;
default:
eventEmitter.emit({ coords: { lat: value.latLng.lat(), lng: value.latLng.lng() } });
}
}));
});
};
/** @internal */
AgmCircle.prototype.ngOnDestroy = function () {
this._eventSubscriptions.forEach(function (s) { s.unsubscribe(); });
this._eventSubscriptions = null;
this._manager.removeCircle(this);
};
/**
* Gets the LatLngBounds of this Circle.
*/
AgmCircle.prototype.getBounds = function () { return this._manager.getBounds(this); };
AgmCircle.prototype.getCenter = function () { return this._manager.getCenter(this); };
return AgmCircle;
}());
AgmCircle._mapOptions = [
'fillColor', 'fillOpacity', 'strokeColor', 'strokeOpacity', 'strokePosition', 'strokeWeight',
'visible', 'zIndex', 'clickable'
];
AgmCircle.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
selector: 'agm-circle'
},] },
];
/** @nocollapse */
AgmCircle.ctorParameters = function () { return [
{ type: _services_managers_circle_manager__WEBPACK_IMPORTED_MODULE_1__["CircleManager"], },
]; };
AgmCircle.propDecorators = {
'latitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'longitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'clickable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'draggable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['circleDraggable',] },],
'editable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'fillColor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'fillOpacity': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'radius': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeColor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeOpacity': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokePosition': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeWeight': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'visible': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zIndex': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'centerChange': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'circleClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'circleDblClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'drag': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'dragEnd': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'dragStart': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mouseDown': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mouseMove': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mouseOut': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mouseOver': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mouseUp': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'radiusChange': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'rightClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
};
//# sourceMappingURL=circle.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/data-layer.js":
/*!*********************************************************!*\
!*** ./node_modules/@agm/core/directives/data-layer.js ***!
\*********************************************************/
/*! exports provided: AgmDataLayer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmDataLayer", function() { return AgmDataLayer; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_managers_data_layer_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../services/managers/data-layer-manager */ "./node_modules/@agm/core/services/managers/data-layer-manager.js");
var layerId = 0;
/**
* AgmDataLayer enables the user to add data layers to the map.
*
* ### Example
* ```typescript
* import { Component } from 'angular2/core';
* import { AgmMap, AgmDataLayer } from
* 'angular-google-maps/core';
*
* @Component({
* selector: 'my-map-cmp',
* directives: [AgmMap, AgmDataLayer],
* styles: [`
* .agm-container {
* height: 300px;
* }
* `],
* template: `
*
*
*
*
* `
* })
* export class MyMapCmp {
* lat: number = -25.274449;
* lng: number = 133.775060;
* zoom: number = 5;
*
* clicked(clickEvent) {
* console.log(clickEvent);
* }
*
* styleFunc(feature) {
* return ({
* clickable: false,
* fillColor: feature.getProperty('color'),
* strokeWeight: 1
* });
* }
*
* geoJsonObject: Object = {
* "type": "FeatureCollection",
* "features": [
* {
* "type": "Feature",
* "properties": {
* "letter": "G",
* "color": "blue",
* "rank": "7",
* "ascii": "71"
* },
* "geometry": {
* "type": "Polygon",
* "coordinates": [
* [
* [123.61, -22.14], [122.38, -21.73], [121.06, -21.69], [119.66, -22.22], [119.00, -23.40],
* [118.65, -24.76], [118.43, -26.07], [118.78, -27.56], [119.22, -28.57], [120.23, -29.49],
* [121.77, -29.87], [123.57, -29.64], [124.45, -29.03], [124.71, -27.95], [124.80, -26.70],
* [124.80, -25.60], [123.61, -25.64], [122.56, -25.64], [121.72, -25.72], [121.81, -26.62],
* [121.86, -26.98], [122.60, -26.90], [123.57, -27.05], [123.57, -27.68], [123.35, -28.18],
* [122.51, -28.38], [121.77, -28.26], [121.02, -27.91], [120.49, -27.21], [120.14, -26.50],
* [120.10, -25.64], [120.27, -24.52], [120.67, -23.68], [121.72, -23.32], [122.43, -23.48],
* [123.04, -24.04], [124.54, -24.28], [124.58, -23.20], [123.61, -22.14]
* ]
* ]
* }
* },
* {
* "type": "Feature",
* "properties": {
* "letter": "o",
* "color": "red",
* "rank": "15",
* "ascii": "111"
* },
* "geometry": {
* "type": "Polygon",
* "coordinates": [
* [
* [128.84, -25.76], [128.18, -25.60], [127.96, -25.52], [127.88, -25.52], [127.70, -25.60],
* [127.26, -25.79], [126.60, -26.11], [126.16, -26.78], [126.12, -27.68], [126.21, -28.42],
* [126.69, -29.49], [127.74, -29.80], [128.80, -29.72], [129.41, -29.03], [129.72, -27.95],
* [129.68, -27.21], [129.33, -26.23], [128.84, -25.76]
* ],
* [
* [128.45, -27.44], [128.32, -26.94], [127.70, -26.82], [127.35, -27.05], [127.17, -27.80],
* [127.57, -28.22], [128.10, -28.42], [128.49, -27.80], [128.45, -27.44]
* ]
* ]
* }
* },
* {
* "type": "Feature",
* "properties": {
* "letter": "o",
* "color": "yellow",
* "rank": "15",
* "ascii": "111"
* },
* "geometry": {
* "type": "Polygon",
* "coordinates": [
* [
* [131.87, -25.76], [131.35, -26.07], [130.95, -26.78], [130.82, -27.64], [130.86, -28.53],
* [131.26, -29.22], [131.92, -29.76], [132.45, -29.87], [133.06, -29.76], [133.72, -29.34],
* [134.07, -28.80], [134.20, -27.91], [134.07, -27.21], [133.81, -26.31], [133.37, -25.83],
* [132.71, -25.64], [131.87, -25.76]
* ],
* [
* [133.15, -27.17], [132.71, -26.86], [132.09, -26.90], [131.74, -27.56], [131.79, -28.26],
* [132.36, -28.45], [132.93, -28.34], [133.15, -27.76], [133.15, -27.17]
* ]
* ]
* }
* },
* {
* "type": "Feature",
* "properties": {
* "letter": "g",
* "color": "blue",
* "rank": "7",
* "ascii": "103"
* },
* "geometry": {
* "type": "Polygon",
* "coordinates": [
* [
* [138.12, -25.04], [136.84, -25.16], [135.96, -25.36], [135.26, -25.99], [135, -26.90],
* [135.04, -27.91], [135.26, -28.88], [136.05, -29.45], [137.02, -29.49], [137.81, -29.49],
* [137.94, -29.99], [137.90, -31.20], [137.85, -32.24], [136.88, -32.69], [136.45, -32.36],
* [136.27, -31.80], [134.95, -31.84], [135.17, -32.99], [135.52, -33.43], [136.14, -33.76],
* [137.06, -33.83], [138.12, -33.65], [138.86, -33.21], [139.30, -32.28], [139.30, -31.24],
* [139.30, -30.14], [139.21, -28.96], [139.17, -28.22], [139.08, -27.41], [139.08, -26.47],
* [138.99, -25.40], [138.73, -25.00], [138.12, -25.04]
* ],
* [
* [137.50, -26.54], [136.97, -26.47], [136.49, -26.58], [136.31, -27.13], [136.31, -27.72],
* [136.58, -27.99], [137.50, -28.03], [137.68, -27.68], [137.59, -26.78], [137.50, -26.54]
* ]
* ]
* }
* },
* {
* "type": "Feature",
* "properties": {
* "letter": "l",
* "color": "green",
* "rank": "12",
* "ascii": "108"
* },
* "geometry": {
* "type": "Polygon",
* "coordinates": [
* [
* [140.14, -21.04], [140.31, -29.42], [141.67, -29.49], [141.59, -20.92], [140.14, -21.04]
* ]
* ]
* }
* },
* {
* "type": "Feature",
* "properties": {
* "letter": "e",
* "color": "red",
* "rank": "5",
* "ascii": "101"
* },
* "geometry": {
* "type": "Polygon",
* "coordinates": [
* [
* [144.14, -27.41], [145.67, -27.52], [146.86, -27.09], [146.82, -25.64], [146.25, -25.04],
* [145.45, -24.68], [144.66, -24.60], [144.09, -24.76], [143.43, -25.08], [142.99, -25.40],
* [142.64, -26.03], [142.64, -27.05], [142.64, -28.26], [143.30, -29.11], [144.18, -29.57],
* [145.41, -29.64], [146.46, -29.19], [146.64, -28.72], [146.82, -28.14], [144.84, -28.42],
* [144.31, -28.26], [144.14, -27.41]
* ],
* [
* [144.18, -26.39], [144.53, -26.58], [145.19, -26.62], [145.72, -26.35], [145.81, -25.91],
* [145.41, -25.68], [144.97, -25.68], [144.49, -25.64], [144, -25.99], [144.18, -26.39]
* ]
* ]
* }
* }
* ]
* };
* }
* ```
*/
var AgmDataLayer = (function () {
function AgmDataLayer(_manager) {
this._manager = _manager;
this._addedToManager = false;
this._id = (layerId++).toString();
this._subscriptions = [];
/**
* This event is fired when a feature in the layer is clicked.
*/
this.layerClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* The geoJson to be displayed
*/
this.geoJson = null;
}
AgmDataLayer.prototype.ngOnInit = function () {
if (this._addedToManager) {
return;
}
this._manager.addDataLayer(this);
this._addedToManager = true;
this._addEventListeners();
};
AgmDataLayer.prototype._addEventListeners = function () {
var _this = this;
var listeners = [
{ name: 'click', handler: function (ev) { return _this.layerClick.emit(ev); } },
];
listeners.forEach(function (obj) {
var os = _this._manager.createEventObservable(obj.name, _this).subscribe(obj.handler);
_this._subscriptions.push(os);
});
};
/** @internal */
AgmDataLayer.prototype.id = function () { return this._id; };
/** @internal */
AgmDataLayer.prototype.toString = function () { return "AgmDataLayer-" + this._id.toString(); };
/** @internal */
AgmDataLayer.prototype.ngOnDestroy = function () {
this._manager.deleteDataLayer(this);
// unsubscribe all registered observable subscriptions
this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
};
/** @internal */
AgmDataLayer.prototype.ngOnChanges = function (changes) {
var _this = this;
if (!this._addedToManager) {
return;
}
var geoJsonChange = changes['geoJson'];
if (geoJsonChange) {
this._manager.updateGeoJson(this, geoJsonChange.currentValue);
}
var dataOptions = {};
AgmDataLayer._dataOptionsAttributes.forEach(function (k) { return dataOptions[k] = changes.hasOwnProperty(k) ? changes[k].currentValue : _this[k]; });
this._manager.setDataOptions(this, dataOptions);
};
return AgmDataLayer;
}());
AgmDataLayer._dataOptionsAttributes = ['style'];
AgmDataLayer.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
selector: 'agm-data-layer'
},] },
];
/** @nocollapse */
AgmDataLayer.ctorParameters = function () { return [
{ type: _services_managers_data_layer_manager__WEBPACK_IMPORTED_MODULE_1__["DataLayerManager"], },
]; };
AgmDataLayer.propDecorators = {
'layerClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'geoJson': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'style': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
};
//# sourceMappingURL=data-layer.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/info-window.js":
/*!**********************************************************!*\
!*** ./node_modules/@agm/core/directives/info-window.js ***!
\**********************************************************/
/*! exports provided: AgmInfoWindow */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmInfoWindow", function() { return AgmInfoWindow; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_managers_info_window_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/managers/info-window-manager */ "./node_modules/@agm/core/services/managers/info-window-manager.js");
var infoWindowId = 0;
/**
* AgmInfoWindow renders a info window inside a {@link AgmMarker} or standalone.
*
* ### Example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-map-cmp',
* styles: [`
* .agm-map-container {
* height: 300px;
* }
* `],
* template: `
*
*
*
* Hi, this is the content of the info window
*
*
*
* `
* })
* ```
*/
var AgmInfoWindow = (function () {
function AgmInfoWindow(_infoWindowManager, _el) {
this._infoWindowManager = _infoWindowManager;
this._el = _el;
/**
* Sets the open state for the InfoWindow. You can also call the open() and close() methods.
*/
this.isOpen = false;
/**
* Emits an event when the info window is closed.
*/
this.infoWindowClose = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this._infoWindowAddedToManager = false;
this._id = (infoWindowId++).toString();
}
AgmInfoWindow.prototype.ngOnInit = function () {
this.content = this._el.nativeElement.querySelector('.agm-info-window-content');
this._infoWindowManager.addInfoWindow(this);
this._infoWindowAddedToManager = true;
this._updateOpenState();
this._registerEventListeners();
};
/** @internal */
AgmInfoWindow.prototype.ngOnChanges = function (changes) {
if (!this._infoWindowAddedToManager) {
return;
}
if ((changes['latitude'] || changes['longitude']) && typeof this.latitude === 'number' &&
typeof this.longitude === 'number') {
this._infoWindowManager.setPosition(this);
}
if (changes['zIndex']) {
this._infoWindowManager.setZIndex(this);
}
if (changes['isOpen']) {
this._updateOpenState();
}
this._setInfoWindowOptions(changes);
};
AgmInfoWindow.prototype._registerEventListeners = function () {
var _this = this;
this._infoWindowManager.createEventObservable('closeclick', this).subscribe(function () {
_this.isOpen = false;
_this.infoWindowClose.emit();
});
};
AgmInfoWindow.prototype._updateOpenState = function () {
this.isOpen ? this.open() : this.close();
};
AgmInfoWindow.prototype._setInfoWindowOptions = function (changes) {
var options = {};
var optionKeys = Object.keys(changes).filter(function (k) { return AgmInfoWindow._infoWindowOptionsInputs.indexOf(k) !== -1; });
optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });
this._infoWindowManager.setOptions(this, options);
};
/**
* Opens the info window.
*/
AgmInfoWindow.prototype.open = function () { return this._infoWindowManager.open(this); };
/**
* Closes the info window.
*/
AgmInfoWindow.prototype.close = function () {
var _this = this;
return this._infoWindowManager.close(this).then(function () { _this.infoWindowClose.emit(); });
};
/** @internal */
AgmInfoWindow.prototype.id = function () { return this._id; };
/** @internal */
AgmInfoWindow.prototype.toString = function () { return 'AgmInfoWindow-' + this._id.toString(); };
/** @internal */
AgmInfoWindow.prototype.ngOnDestroy = function () { this._infoWindowManager.deleteInfoWindow(this); };
return AgmInfoWindow;
}());
AgmInfoWindow._infoWindowOptionsInputs = ['disableAutoPan', 'maxWidth'];
AgmInfoWindow.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
selector: 'agm-info-window',
template: "
\n \n
\n "
},] },
];
/** @nocollapse */
AgmInfoWindow.ctorParameters = function () { return [
{ type: _services_managers_info_window_manager__WEBPACK_IMPORTED_MODULE_1__["InfoWindowManager"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
]; };
AgmInfoWindow.propDecorators = {
'latitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'longitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'disableAutoPan': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zIndex': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'maxWidth': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'isOpen': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'infoWindowClose': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
};
//# sourceMappingURL=info-window.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/kml-layer.js":
/*!********************************************************!*\
!*** ./node_modules/@agm/core/directives/kml-layer.js ***!
\********************************************************/
/*! exports provided: AgmKmlLayer */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmKmlLayer", function() { return AgmKmlLayer; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_managers_kml_layer_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../services/managers/kml-layer-manager */ "./node_modules/@agm/core/services/managers/kml-layer-manager.js");
var layerId = 0;
var AgmKmlLayer = (function () {
function AgmKmlLayer(_manager) {
this._manager = _manager;
this._addedToManager = false;
this._id = (layerId++).toString();
this._subscriptions = [];
/**
* If true, the layer receives mouse events. Default value is true.
*/
this.clickable = true;
/**
* By default, the input map is centered and zoomed to the bounding box of the contents of the
* layer.
* If this option is set to true, the viewport is left unchanged, unless the map's center and zoom
* were never set.
*/
this.preserveViewport = false;
/**
* Whether to render the screen overlays. Default true.
*/
this.screenOverlays = true;
/**
* Suppress the rendering of info windows when layer features are clicked.
*/
this.suppressInfoWindows = false;
/**
* The URL of the KML document to display.
*/
this.url = null;
/**
* The z-index of the layer.
*/
this.zIndex = null;
/**
* This event is fired when a feature in the layer is clicked.
*/
this.layerClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the KML layers default viewport has changed.
*/
this.defaultViewportChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the KML layer has finished loading.
* At this point it is safe to read the status property to determine if the layer loaded
* successfully.
*/
this.statusChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
}
AgmKmlLayer.prototype.ngOnInit = function () {
if (this._addedToManager) {
return;
}
this._manager.addKmlLayer(this);
this._addedToManager = true;
this._addEventListeners();
};
AgmKmlLayer.prototype.ngOnChanges = function (changes) {
if (!this._addedToManager) {
return;
}
this._updatePolygonOptions(changes);
};
AgmKmlLayer.prototype._updatePolygonOptions = function (changes) {
var options = Object.keys(changes)
.filter(function (k) { return AgmKmlLayer._kmlLayerOptions.indexOf(k) !== -1; })
.reduce(function (obj, k) {
obj[k] = changes[k].currentValue;
return obj;
}, {});
if (Object.keys(options).length > 0) {
this._manager.setOptions(this, options);
}
};
AgmKmlLayer.prototype._addEventListeners = function () {
var _this = this;
var listeners = [
{ name: 'click', handler: function (ev) { return _this.layerClick.emit(ev); } },
{ name: 'defaultviewport_changed', handler: function () { return _this.defaultViewportChange.emit(); } },
{ name: 'status_changed', handler: function () { return _this.statusChange.emit(); } },
];
listeners.forEach(function (obj) {
var os = _this._manager.createEventObservable(obj.name, _this).subscribe(obj.handler);
_this._subscriptions.push(os);
});
};
/** @internal */
AgmKmlLayer.prototype.id = function () { return this._id; };
/** @internal */
AgmKmlLayer.prototype.toString = function () { return "AgmKmlLayer-" + this._id.toString(); };
/** @internal */
AgmKmlLayer.prototype.ngOnDestroy = function () {
this._manager.deleteKmlLayer(this);
// unsubscribe all registered observable subscriptions
this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
};
return AgmKmlLayer;
}());
AgmKmlLayer._kmlLayerOptions = ['clickable', 'preserveViewport', 'screenOverlays', 'suppressInfoWindows', 'url', 'zIndex'];
AgmKmlLayer.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
selector: 'agm-kml-layer'
},] },
];
/** @nocollapse */
AgmKmlLayer.ctorParameters = function () { return [
{ type: _services_managers_kml_layer_manager__WEBPACK_IMPORTED_MODULE_1__["KmlLayerManager"], },
]; };
AgmKmlLayer.propDecorators = {
'clickable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'preserveViewport': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'screenOverlays': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'suppressInfoWindows': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'url': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zIndex': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'layerClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'defaultViewportChange': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'statusChange': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
};
//# sourceMappingURL=kml-layer.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/map.js":
/*!**************************************************!*\
!*** ./node_modules/@agm/core/directives/map.js ***!
\**************************************************/
/*! exports provided: AgmMap */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmMap", function() { return AgmMap; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
/* harmony import */ var _services_managers_circle_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/managers/circle-manager */ "./node_modules/@agm/core/services/managers/circle-manager.js");
/* harmony import */ var _services_managers_info_window_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/managers/info-window-manager */ "./node_modules/@agm/core/services/managers/info-window-manager.js");
/* harmony import */ var _services_managers_marker_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/managers/marker-manager */ "./node_modules/@agm/core/services/managers/marker-manager.js");
/* harmony import */ var _services_managers_polygon_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../services/managers/polygon-manager */ "./node_modules/@agm/core/services/managers/polygon-manager.js");
/* harmony import */ var _services_managers_polyline_manager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../services/managers/polyline-manager */ "./node_modules/@agm/core/services/managers/polyline-manager.js");
/* harmony import */ var _services_managers_kml_layer_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../services/managers/kml-layer-manager */ "./node_modules/@agm/core/services/managers/kml-layer-manager.js");
/* harmony import */ var _services_managers_data_layer_manager__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../services/managers/data-layer-manager */ "./node_modules/@agm/core/services/managers/data-layer-manager.js");
/**
* AgmMap renders a Google Map.
* **Important note**: To be able see a map in the browser, you have to define a height for the
* element `agm-map`.
*
* ### Example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-map-cmp',
* styles: [`
* agm-map {
* height: 300px;
* }
* `],
* template: `
*
*
* `
* })
* ```
*/
var AgmMap = (function () {
function AgmMap(_elem, _mapsWrapper) {
this._elem = _elem;
this._mapsWrapper = _mapsWrapper;
/**
* The longitude that defines the center of the map.
*/
this.longitude = 0;
/**
* The latitude that defines the center of the map.
*/
this.latitude = 0;
/**
* The zoom level of the map. The default zoom level is 8.
*/
this.zoom = 8;
/**
* Enables/disables if map is draggable.
*/
// tslint:disable-next-line:no-input-rename
this.draggable = true;
/**
* Enables/disables zoom and center on double click. Enabled by default.
*/
this.disableDoubleClickZoom = false;
/**
* Enables/disables all default UI of the Google map. Please note: When the map is created, this
* value cannot get updated.
*/
this.disableDefaultUI = false;
/**
* If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.
*/
this.scrollwheel = true;
/**
* If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are
* enabled by default.
*/
this.keyboardShortcuts = true;
/**
* The enabled/disabled state of the Zoom control.
*/
this.zoomControl = true;
/**
* Styles to apply to each of the default map types. Note that for Satellite/Hybrid and Terrain
* modes, these styles will only apply to labels and geometry.
*/
this.styles = [];
/**
* When true and the latitude and/or longitude values changes, the Google Maps panTo method is
* used to
* center the map. See: https://developers.google.com/maps/documentation/javascript/reference#Map
*/
this.usePanning = false;
/**
* The initial enabled/disabled state of the Street View Pegman control.
* This control is part of the default UI, and should be set to false when displaying a map type
* on which the Street View road overlay should not appear (e.g. a non-Earth map type).
*/
this.streetViewControl = true;
/**
* Sets the viewport to contain the given bounds.
*/
this.fitBounds = null;
/**
* The initial enabled/disabled state of the Scale control. This is disabled by default.
*/
this.scaleControl = false;
/**
* The initial enabled/disabled state of the Map type control.
*/
this.mapTypeControl = false;
/**
* The initial enabled/disabled state of the Pan control.
*/
this.panControl = false;
/**
* The initial enabled/disabled state of the Rotate control.
*/
this.rotateControl = false;
/**
* The initial enabled/disabled state of the Fullscreen control.
*/
this.fullscreenControl = false;
/**
* The map mapTypeId. Defaults to 'roadmap'.
*/
this.mapTypeId = 'roadmap';
/**
* When false, map icons are not clickable. A map icon represents a point of interest,
* also known as a POI. By default map icons are clickable.
*/
this.clickableIcons = true;
/**
* This setting controls how gestures on the map are handled.
* Allowed values:
* - 'cooperative' (Two-finger touch gestures pan and zoom the map. One-finger touch gestures are not handled by the map.)
* - 'greedy' (All touch gestures pan or zoom the map.)
* - 'none' (The map cannot be panned or zoomed by user gestures.)
* - 'auto' [default] (Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or not.
*/
this.gestureHandling = 'auto';
this._observableSubscriptions = [];
/**
* This event emitter gets emitted when the user clicks on the map (but not when they click on a
* marker or infoWindow).
*/
this.mapClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event emitter gets emitted when the user right-clicks on the map (but not when they click
* on a marker or infoWindow).
*/
this.mapRightClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event emitter gets emitted when the user double-clicks on the map (but not when they click
* on a marker or infoWindow).
*/
this.mapDblClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event emitter is fired when the map center changes.
*/
this.centerChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the viewport bounds have changed.
*/
this.boundsChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the map becomes idle after panning or zooming.
*/
this.idle = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the zoom level has changed.
*/
this.zoomChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the google map is fully initialized.
* You get the google.maps.Map instance as a result of this EventEmitter.
*/
this.mapReady = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
}
/** @internal */
AgmMap.prototype.ngOnInit = function () {
// todo: this should be solved with a new component and a viewChild decorator
var container = this._elem.nativeElement.querySelector('.agm-map-container-inner');
this._initMapInstance(container);
};
AgmMap.prototype._initMapInstance = function (el) {
var _this = this;
this._mapsWrapper.createMap(el, {
center: { lat: this.latitude || 0, lng: this.longitude || 0 },
zoom: this.zoom,
minZoom: this.minZoom,
maxZoom: this.maxZoom,
disableDefaultUI: this.disableDefaultUI,
disableDoubleClickZoom: this.disableDoubleClickZoom,
scrollwheel: this.scrollwheel,
backgroundColor: this.backgroundColor,
draggable: this.draggable,
draggableCursor: this.draggableCursor,
draggingCursor: this.draggingCursor,
keyboardShortcuts: this.keyboardShortcuts,
styles: this.styles,
zoomControl: this.zoomControl,
zoomControlOptions: this.zoomControlOptions,
streetViewControl: this.streetViewControl,
streetViewControlOptions: this.streetViewControlOptions,
scaleControl: this.scaleControl,
scaleControlOptions: this.scaleControlOptions,
mapTypeControl: this.mapTypeControl,
mapTypeControlOptions: this.mapTypeControlOptions,
panControl: this.panControl,
panControlOptions: this.panControlOptions,
rotateControl: this.rotateControl,
rotateControlOptions: this.rotateControlOptions,
fullscreenControl: this.fullscreenControl,
fullscreenControlOptions: this.fullscreenControlOptions,
mapTypeId: this.mapTypeId,
clickableIcons: this.clickableIcons,
gestureHandling: this.gestureHandling
})
.then(function () { return _this._mapsWrapper.getNativeMap(); })
.then(function (map) { return _this.mapReady.emit(map); });
// register event listeners
this._handleMapCenterChange();
this._handleMapZoomChange();
this._handleMapMouseEvents();
this._handleBoundsChange();
this._handleIdleEvent();
};
/** @internal */
AgmMap.prototype.ngOnDestroy = function () {
// unsubscribe all registered observable subscriptions
this._observableSubscriptions.forEach(function (s) { return s.unsubscribe(); });
};
/* @internal */
AgmMap.prototype.ngOnChanges = function (changes) {
this._updateMapOptionsChanges(changes);
this._updatePosition(changes);
};
AgmMap.prototype._updateMapOptionsChanges = function (changes) {
var options = {};
var optionKeys = Object.keys(changes).filter(function (k) { return AgmMap._mapOptionsAttributes.indexOf(k) !== -1; });
optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });
this._mapsWrapper.setMapOptions(options);
};
/**
* Triggers a resize event on the google map instance.
* When recenter is true, the of the google map gets called with the current lat/lng values or fitBounds value to recenter the map.
* Returns a promise that gets resolved after the event was triggered.
*/
AgmMap.prototype.triggerResize = function (recenter) {
var _this = this;
if (recenter === void 0) { recenter = true; }
// Note: When we would trigger the resize event and show the map in the same turn (which is a
// common case for triggering a resize event), then the resize event would not
// work (to show the map), so we trigger the event in a timeout.
return new Promise(function (resolve) {
setTimeout(function () {
return _this._mapsWrapper.triggerMapEvent('resize').then(function () {
if (recenter) {
_this.fitBounds != null ? _this._fitBounds() : _this._setCenter();
}
resolve();
});
});
});
};
AgmMap.prototype._updatePosition = function (changes) {
if (changes['latitude'] == null && changes['longitude'] == null &&
changes['fitBounds'] == null) {
// no position update needed
return;
}
// we prefer fitBounds in changes
if (changes['fitBounds'] && this.fitBounds != null) {
this._fitBounds();
return;
}
if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {
return;
}
this._setCenter();
};
AgmMap.prototype._setCenter = function () {
var newCenter = {
lat: this.latitude,
lng: this.longitude,
};
if (this.usePanning) {
this._mapsWrapper.panTo(newCenter);
}
else {
this._mapsWrapper.setCenter(newCenter);
}
};
AgmMap.prototype._fitBounds = function () {
if (this.usePanning) {
this._mapsWrapper.panToBounds(this.fitBounds);
return;
}
this._mapsWrapper.fitBounds(this.fitBounds);
};
AgmMap.prototype._handleMapCenterChange = function () {
var _this = this;
var s = this._mapsWrapper.subscribeToMapEvent('center_changed').subscribe(function () {
_this._mapsWrapper.getCenter().then(function (center) {
_this.latitude = center.lat();
_this.longitude = center.lng();
_this.centerChange.emit({ lat: _this.latitude, lng: _this.longitude });
});
});
this._observableSubscriptions.push(s);
};
AgmMap.prototype._handleBoundsChange = function () {
var _this = this;
var s = this._mapsWrapper.subscribeToMapEvent('bounds_changed').subscribe(function () {
_this._mapsWrapper.getBounds().then(function (bounds) { _this.boundsChange.emit(bounds); });
});
this._observableSubscriptions.push(s);
};
AgmMap.prototype._handleMapZoomChange = function () {
var _this = this;
var s = this._mapsWrapper.subscribeToMapEvent('zoom_changed').subscribe(function () {
_this._mapsWrapper.getZoom().then(function (z) {
_this.zoom = z;
_this.zoomChange.emit(z);
});
});
this._observableSubscriptions.push(s);
};
AgmMap.prototype._handleIdleEvent = function () {
var _this = this;
var s = this._mapsWrapper.subscribeToMapEvent('idle').subscribe(function () { _this.idle.emit(void 0); });
this._observableSubscriptions.push(s);
};
AgmMap.prototype._handleMapMouseEvents = function () {
var _this = this;
var events = [
{ name: 'click', emitter: this.mapClick },
{ name: 'rightclick', emitter: this.mapRightClick },
{ name: 'dblclick', emitter: this.mapDblClick },
];
events.forEach(function (e) {
var s = _this._mapsWrapper.subscribeToMapEvent(e.name).subscribe(function (event) {
var value = { coords: { lat: event.latLng.lat(), lng: event.latLng.lng() } };
e.emitter.emit(value);
});
_this._observableSubscriptions.push(s);
});
};
return AgmMap;
}());
/**
* Map option attributes that can change over time
*/
AgmMap._mapOptionsAttributes = [
'disableDoubleClickZoom', 'scrollwheel', 'draggable', 'draggableCursor', 'draggingCursor',
'keyboardShortcuts', 'zoomControl', 'zoomControlOptions', 'styles', 'streetViewControl',
'streetViewControlOptions', 'zoom', 'mapTypeControl', 'mapTypeControlOptions', 'minZoom',
'maxZoom', 'panControl', 'panControlOptions', 'rotateControl', 'rotateControlOptions',
'fullscreenControl', 'fullscreenControlOptions', 'scaleControl', 'scaleControlOptions',
'mapTypeId', 'clickableIcons', 'gestureHandling'
];
AgmMap.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"], args: [{
selector: 'agm-map',
providers: [
_services_google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_1__["GoogleMapsAPIWrapper"], _services_managers_marker_manager__WEBPACK_IMPORTED_MODULE_4__["MarkerManager"], _services_managers_info_window_manager__WEBPACK_IMPORTED_MODULE_3__["InfoWindowManager"], _services_managers_circle_manager__WEBPACK_IMPORTED_MODULE_2__["CircleManager"], _services_managers_polyline_manager__WEBPACK_IMPORTED_MODULE_6__["PolylineManager"],
_services_managers_polygon_manager__WEBPACK_IMPORTED_MODULE_5__["PolygonManager"], _services_managers_kml_layer_manager__WEBPACK_IMPORTED_MODULE_7__["KmlLayerManager"], _services_managers_data_layer_manager__WEBPACK_IMPORTED_MODULE_8__["DataLayerManager"]
],
host: {
// todo: deprecated - we will remove it with the next version
'[class.sebm-google-map-container]': 'true'
},
styles: ["\n .agm-map-container-inner {\n width: inherit;\n height: inherit;\n }\n .agm-map-content {\n display:none;\n }\n "],
template: "\n \n \n \n
\n "
},] },
];
/** @nocollapse */
AgmMap.ctorParameters = function () { return [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ElementRef"], },
{ type: _services_google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_1__["GoogleMapsAPIWrapper"], },
]; };
AgmMap.propDecorators = {
'longitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'latitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zoom': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'minZoom': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'maxZoom': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'draggable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['mapDraggable',] },],
'disableDoubleClickZoom': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'disableDefaultUI': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'scrollwheel': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'backgroundColor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'draggableCursor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'draggingCursor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'keyboardShortcuts': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zoomControl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zoomControlOptions': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'styles': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'usePanning': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'streetViewControl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'streetViewControlOptions': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'fitBounds': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'scaleControl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'scaleControlOptions': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'mapTypeControl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'mapTypeControlOptions': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'panControl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'panControlOptions': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'rotateControl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'rotateControlOptions': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'fullscreenControl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'fullscreenControlOptions': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'mapTypeId': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'clickableIcons': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'gestureHandling': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'mapClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mapRightClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mapDblClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'centerChange': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'boundsChange': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'idle': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'zoomChange': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mapReady': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
};
//# sourceMappingURL=map.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/marker.js":
/*!*****************************************************!*\
!*** ./node_modules/@agm/core/directives/marker.js ***!
\*****************************************************/
/*! exports provided: AgmMarker */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmMarker", function() { return AgmMarker; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_managers_marker_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/managers/marker-manager */ "./node_modules/@agm/core/services/managers/marker-manager.js");
/* harmony import */ var _info_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./info-window */ "./node_modules/@agm/core/directives/info-window.js");
var markerId = 0;
/**
* AgmMarker renders a map marker inside a {@link AgmMap}.
*
* ### Example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-map-cmp',
* styles: [`
* .agm-map-container {
* height: 300px;
* }
* `],
* template: `
*
*
*
*
* `
* })
* ```
*/
var AgmMarker = (function () {
function AgmMarker(_markerManager) {
this._markerManager = _markerManager;
/**
* If true, the marker can be dragged. Default value is false.
*/
// tslint:disable-next-line:no-input-rename
this.draggable = false;
/**
* If true, the marker is visible
*/
this.visible = true;
/**
* Whether to automatically open the child info window when the marker is clicked.
*/
this.openInfoWindow = true;
/**
* The marker's opacity between 0.0 and 1.0.
*/
this.opacity = 1;
/**
* All markers are displayed on the map in order of their zIndex, with higher values displaying in
* front of markers with lower values. By default, markers are displayed according to their
* vertical position on screen, with lower markers appearing in front of markers further up the
* screen.
*/
this.zIndex = 1;
/**
* If true, the marker can be clicked. Default value is true.
*/
// tslint:disable-next-line:no-input-rename
this.clickable = true;
/**
* This event emitter gets emitted when the user clicks on the marker.
*/
this.markerClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user stops dragging the marker.
*/
this.dragEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user mouses over the marker.
*/
this.mouseOver = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user mouses outside the marker.
*/
this.mouseOut = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* @internal
*/
this.infoWindow = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["QueryList"]();
this._markerAddedToManger = false;
this._observableSubscriptions = [];
this._id = (markerId++).toString();
}
/* @internal */
AgmMarker.prototype.ngAfterContentInit = function () {
var _this = this;
this.handleInfoWindowUpdate();
this.infoWindow.changes.subscribe(function () { return _this.handleInfoWindowUpdate(); });
};
AgmMarker.prototype.handleInfoWindowUpdate = function () {
var _this = this;
if (this.infoWindow.length > 1) {
throw new Error('Expected no more than one info window.');
}
this.infoWindow.forEach(function (marker) {
marker.hostMarker = _this;
});
};
/** @internal */
AgmMarker.prototype.ngOnChanges = function (changes) {
if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {
return;
}
if (!this._markerAddedToManger) {
this._markerManager.addMarker(this);
this._markerAddedToManger = true;
this._addEventListeners();
return;
}
if (changes['latitude'] || changes['longitude']) {
this._markerManager.updateMarkerPosition(this);
}
if (changes['title']) {
this._markerManager.updateTitle(this);
}
if (changes['label']) {
this._markerManager.updateLabel(this);
}
if (changes['draggable']) {
this._markerManager.updateDraggable(this);
}
if (changes['iconUrl']) {
this._markerManager.updateIcon(this);
}
if (changes['opacity']) {
this._markerManager.updateOpacity(this);
}
if (changes['visible']) {
this._markerManager.updateVisible(this);
}
if (changes['zIndex']) {
this._markerManager.updateZIndex(this);
}
if (changes['clickable']) {
this._markerManager.updateClickable(this);
}
};
AgmMarker.prototype._addEventListeners = function () {
var _this = this;
var cs = this._markerManager.createEventObservable('click', this).subscribe(function () {
if (_this.openInfoWindow) {
_this.infoWindow.forEach(function (infoWindow) { return infoWindow.open(); });
}
_this.markerClick.emit(null);
});
this._observableSubscriptions.push(cs);
var ds = this._markerManager.createEventObservable('dragend', this)
.subscribe(function (e) {
_this.dragEnd.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });
});
this._observableSubscriptions.push(ds);
var mover = this._markerManager.createEventObservable('mouseover', this)
.subscribe(function (e) {
_this.mouseOver.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });
});
this._observableSubscriptions.push(mover);
var mout = this._markerManager.createEventObservable('mouseout', this)
.subscribe(function (e) {
_this.mouseOut.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });
});
this._observableSubscriptions.push(mout);
};
/** @internal */
AgmMarker.prototype.id = function () { return this._id; };
/** @internal */
AgmMarker.prototype.toString = function () { return 'AgmMarker-' + this._id.toString(); };
/** @internal */
AgmMarker.prototype.ngOnDestroy = function () {
this._markerManager.deleteMarker(this);
// unsubscribe all registered observable subscriptions
this._observableSubscriptions.forEach(function (s) { return s.unsubscribe(); });
};
return AgmMarker;
}());
AgmMarker.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
selector: 'agm-marker'
},] },
];
/** @nocollapse */
AgmMarker.ctorParameters = function () { return [
{ type: _services_managers_marker_manager__WEBPACK_IMPORTED_MODULE_1__["MarkerManager"], },
]; };
AgmMarker.propDecorators = {
'latitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'longitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'title': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'label': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'draggable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['markerDraggable',] },],
'iconUrl': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'visible': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'openInfoWindow': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'opacity': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zIndex': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'clickable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['markerClickable',] },],
'markerClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'dragEnd': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mouseOver': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'mouseOut': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'infoWindow': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [_info_window__WEBPACK_IMPORTED_MODULE_2__["AgmInfoWindow"],] },],
};
//# sourceMappingURL=marker.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/polygon.js":
/*!******************************************************!*\
!*** ./node_modules/@agm/core/directives/polygon.js ***!
\******************************************************/
/*! exports provided: AgmPolygon */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmPolygon", function() { return AgmPolygon; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_managers_polygon_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/managers/polygon-manager */ "./node_modules/@agm/core/services/managers/polygon-manager.js");
/**
* AgmPolygon renders a polygon on a {@link AgmMap}
*
* ### Example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-map-cmp',
* styles: [`
* agm-map {
* height: 300px;
* }
* `],
* template: `
*
*
*
*
* `
* })
* export class MyMapCmp {
* lat: number = 0;
* lng: number = 0;
* zoom: number = 10;
* paths: Array = [
* { lat: 0, lng: 10 },
* { lat: 0, lng: 20 },
* { lat: 10, lng: 20 },
* { lat: 10, lng: 10 },
* { lat: 0, lng: 10 }
* ]
* // Nesting paths will create a hole where they overlap;
* nestedPaths: Array> = [[
* { lat: 0, lng: 10 },
* { lat: 0, lng: 20 },
* { lat: 10, lng: 20 },
* { lat: 10, lng: 10 },
* { lat: 0, lng: 10 }
* ], [
* { lat: 0, lng: 15 },
* { lat: 0, lng: 20 },
* { lat: 5, lng: 20 },
* { lat: 5, lng: 15 },
* { lat: 0, lng: 15 }
* ]]
* }
* ```
*/
var AgmPolygon = (function () {
function AgmPolygon(_polygonManager) {
this._polygonManager = _polygonManager;
/**
* Indicates whether this Polygon handles mouse events. Defaults to true.
*/
this.clickable = true;
/**
* If set to true, the user can drag this shape over the map. The geodesic
* property defines the mode of dragging. Defaults to false.
*/
// tslint:disable-next-line:no-input-rename
this.draggable = false;
/**
* If set to true, the user can edit this shape by dragging the control
* points shown at the vertices and on each segment. Defaults to false.
*/
this.editable = false;
/**
* When true, edges of the polygon are interpreted as geodesic and will
* follow the curvature of the Earth. When false, edges of the polygon are
* rendered as straight lines in screen space. Note that the shape of a
* geodesic polygon may appear to change when dragged, as the dimensions
* are maintained relative to the surface of the earth. Defaults to false.
*/
this.geodesic = false;
/**
* The ordered sequence of coordinates that designates a closed loop.
* Unlike polylines, a polygon may consist of one or more paths.
* As a result, the paths property may specify one or more arrays of
* LatLng coordinates. Paths are closed automatically; do not repeat the
* first vertex of the path as the last vertex. Simple polygons may be
* defined using a single array of LatLngs. More complex polygons may
* specify an array of arrays. Any simple arrays are converted into Arrays.
* Inserting or removing LatLngs from the Array will automatically update
* the polygon on the map.
*/
this.paths = [];
/**
* This event is fired when the DOM click event is fired on the Polygon.
*/
this.polyClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM dblclick event is fired on the Polygon.
*/
this.polyDblClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is repeatedly fired while the user drags the polygon.
*/
this.polyDrag = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user stops dragging the polygon.
*/
this.polyDragEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user starts dragging the polygon.
*/
this.polyDragStart = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM mousedown event is fired on the Polygon.
*/
this.polyMouseDown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM mousemove event is fired on the Polygon.
*/
this.polyMouseMove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired on Polygon mouseout.
*/
this.polyMouseOut = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired on Polygon mouseover.
*/
this.polyMouseOver = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired whe the DOM mouseup event is fired on the Polygon
*/
this.polyMouseUp = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This even is fired when the Polygon is right-clicked on.
*/
this.polyRightClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this._polygonAddedToManager = false;
this._subscriptions = [];
}
/** @internal */
AgmPolygon.prototype.ngAfterContentInit = function () {
if (!this._polygonAddedToManager) {
this._init();
}
};
AgmPolygon.prototype.ngOnChanges = function (changes) {
if (!this._polygonAddedToManager) {
this._init();
return;
}
this._polygonManager.setPolygonOptions(this, this._updatePolygonOptions(changes));
};
AgmPolygon.prototype._init = function () {
this._polygonManager.addPolygon(this);
this._polygonAddedToManager = true;
this._addEventListeners();
};
AgmPolygon.prototype._addEventListeners = function () {
var _this = this;
var handlers = [
{ name: 'click', handler: function (ev) { return _this.polyClick.emit(ev); } },
{ name: 'dbclick', handler: function (ev) { return _this.polyDblClick.emit(ev); } },
{ name: 'drag', handler: function (ev) { return _this.polyDrag.emit(ev); } },
{ name: 'dragend', handler: function (ev) { return _this.polyDragEnd.emit(ev); } },
{ name: 'dragstart', handler: function (ev) { return _this.polyDragStart.emit(ev); } },
{ name: 'mousedown', handler: function (ev) { return _this.polyMouseDown.emit(ev); } },
{ name: 'mousemove', handler: function (ev) { return _this.polyMouseMove.emit(ev); } },
{ name: 'mouseout', handler: function (ev) { return _this.polyMouseOut.emit(ev); } },
{ name: 'mouseover', handler: function (ev) { return _this.polyMouseOver.emit(ev); } },
{ name: 'mouseup', handler: function (ev) { return _this.polyMouseUp.emit(ev); } },
{ name: 'rightclick', handler: function (ev) { return _this.polyRightClick.emit(ev); } },
];
handlers.forEach(function (obj) {
var os = _this._polygonManager.createEventObservable(obj.name, _this).subscribe(obj.handler);
_this._subscriptions.push(os);
});
};
AgmPolygon.prototype._updatePolygonOptions = function (changes) {
return Object.keys(changes)
.filter(function (k) { return AgmPolygon._polygonOptionsAttributes.indexOf(k) !== -1; })
.reduce(function (obj, k) {
obj[k] = changes[k].currentValue;
return obj;
}, {});
};
/** @internal */
AgmPolygon.prototype.id = function () { return this._id; };
/** @internal */
AgmPolygon.prototype.ngOnDestroy = function () {
this._polygonManager.deletePolygon(this);
// unsubscribe all registered observable subscriptions
this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
};
return AgmPolygon;
}());
AgmPolygon._polygonOptionsAttributes = [
'clickable', 'draggable', 'editable', 'fillColor', 'fillOpacity', 'geodesic', 'icon', 'map',
'paths', 'strokeColor', 'strokeOpacity', 'strokeWeight', 'visible', 'zIndex', 'draggable',
'editable', 'visible'
];
AgmPolygon.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
selector: 'agm-polygon'
},] },
];
/** @nocollapse */
AgmPolygon.ctorParameters = function () { return [
{ type: _services_managers_polygon_manager__WEBPACK_IMPORTED_MODULE_1__["PolygonManager"], },
]; };
AgmPolygon.propDecorators = {
'clickable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'draggable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['polyDraggable',] },],
'editable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'fillColor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'fillOpacity': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'geodesic': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'paths': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeColor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeOpacity': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeWeight': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'visible': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zIndex': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'polyClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyDblClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyDrag': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyDragEnd': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyDragStart': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyMouseDown': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyMouseMove': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyMouseOut': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyMouseOver': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyMouseUp': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'polyRightClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
};
//# sourceMappingURL=polygon.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/polyline-point.js":
/*!*************************************************************!*\
!*** ./node_modules/@agm/core/directives/polyline-point.js ***!
\*************************************************************/
/*! exports provided: AgmPolylinePoint */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmPolylinePoint", function() { return AgmPolylinePoint; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/**
* AgmPolylinePoint represents one element of a polyline within a {@link
* SembGoogleMapPolyline}
*/
var AgmPolylinePoint = (function () {
function AgmPolylinePoint() {
/**
* This event emitter gets emitted when the position of the point changed.
*/
this.positionChanged = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
}
AgmPolylinePoint.prototype.ngOnChanges = function (changes) {
if (changes['latitude'] || changes['longitude']) {
var position = {
lat: changes['latitude'].currentValue,
lng: changes['longitude'].currentValue
};
this.positionChanged.emit(position);
}
};
return AgmPolylinePoint;
}());
AgmPolylinePoint.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{ selector: 'agm-polyline-point' },] },
];
/** @nocollapse */
AgmPolylinePoint.ctorParameters = function () { return []; };
AgmPolylinePoint.propDecorators = {
'latitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'longitude': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'positionChanged': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
};
//# sourceMappingURL=polyline-point.js.map
/***/ }),
/***/ "./node_modules/@agm/core/directives/polyline.js":
/*!*******************************************************!*\
!*** ./node_modules/@agm/core/directives/polyline.js ***!
\*******************************************************/
/*! exports provided: AgmPolyline */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AgmPolyline", function() { return AgmPolyline; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _services_managers_polyline_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services/managers/polyline-manager */ "./node_modules/@agm/core/services/managers/polyline-manager.js");
/* harmony import */ var _polyline_point__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polyline-point */ "./node_modules/@agm/core/directives/polyline-point.js");
var polylineId = 0;
/**
* AgmPolyline renders a polyline on a {@link AgmMap}
*
* ### Example
* ```typescript
* import { Component } from '@angular/core';
*
* @Component({
* selector: 'my-map-cmp',
* styles: [`
* .agm-map-container {
* height: 300px;
* }
* `],
* template: `
*
*
*
*
*
*
*
*
* `
* })
* ```
*/
var AgmPolyline = (function () {
function AgmPolyline(_polylineManager) {
this._polylineManager = _polylineManager;
/**
* Indicates whether this Polyline handles mouse events. Defaults to true.
*/
this.clickable = true;
/**
* If set to true, the user can drag this shape over the map. The geodesic property defines the
* mode of dragging. Defaults to false.
*/
// tslint:disable-next-line:no-input-rename
this.draggable = false;
/**
* If set to true, the user can edit this shape by dragging the control points shown at the
* vertices and on each segment. Defaults to false.
*/
this.editable = false;
/**
* When true, edges of the polygon are interpreted as geodesic and will follow the curvature of
* the Earth. When false, edges of the polygon are rendered as straight lines in screen space.
* Note that the shape of a geodesic polygon may appear to change when dragged, as the dimensions
* are maintained relative to the surface of the earth. Defaults to false.
*/
this.geodesic = false;
/**
* Whether this polyline is visible on the map. Defaults to true.
*/
this.visible = true;
/**
* This event is fired when the DOM click event is fired on the Polyline.
*/
this.lineClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM dblclick event is fired on the Polyline.
*/
this.lineDblClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is repeatedly fired while the user drags the polyline.
*/
this.lineDrag = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user stops dragging the polyline.
*/
this.lineDragEnd = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the user starts dragging the polyline.
*/
this.lineDragStart = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM mousedown event is fired on the Polyline.
*/
this.lineMouseDown = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired when the DOM mousemove event is fired on the Polyline.
*/
this.lineMouseMove = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired on Polyline mouseout.
*/
this.lineMouseOut = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired on Polyline mouseover.
*/
this.lineMouseOver = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This event is fired whe the DOM mouseup event is fired on the Polyline
*/
this.lineMouseUp = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
/**
* This even is fired when the Polyline is right-clicked on.
*/
this.lineRightClick = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
this._polylineAddedToManager = false;
this._subscriptions = [];
this._id = (polylineId++).toString();
}
/** @internal */
AgmPolyline.prototype.ngAfterContentInit = function () {
var _this = this;
if (this.points.length) {
this.points.forEach(function (point) {
var s = point.positionChanged.subscribe(function () { _this._polylineManager.updatePolylinePoints(_this); });
_this._subscriptions.push(s);
});
}
if (!this._polylineAddedToManager) {
this._init();
}
var s = this.points.changes.subscribe(function () { return _this._polylineManager.updatePolylinePoints(_this); });
this._subscriptions.push(s);
this._polylineManager.updatePolylinePoints(this);
};
AgmPolyline.prototype.ngOnChanges = function (changes) {
if (!this._polylineAddedToManager) {
this._init();
return;
}
var options = {};
var optionKeys = Object.keys(changes).filter(function (k) { return AgmPolyline._polylineOptionsAttributes.indexOf(k) !== -1; });
optionKeys.forEach(function (k) { return options[k] = changes[k].currentValue; });
this._polylineManager.setPolylineOptions(this, options);
};
AgmPolyline.prototype._init = function () {
this._polylineManager.addPolyline(this);
this._polylineAddedToManager = true;
this._addEventListeners();
};
AgmPolyline.prototype._addEventListeners = function () {
var _this = this;
var handlers = [
{ name: 'click', handler: function (ev) { return _this.lineClick.emit(ev); } },
{ name: 'dblclick', handler: function (ev) { return _this.lineDblClick.emit(ev); } },
{ name: 'drag', handler: function (ev) { return _this.lineDrag.emit(ev); } },
{ name: 'dragend', handler: function (ev) { return _this.lineDragEnd.emit(ev); } },
{ name: 'dragstart', handler: function (ev) { return _this.lineDragStart.emit(ev); } },
{ name: 'mousedown', handler: function (ev) { return _this.lineMouseDown.emit(ev); } },
{ name: 'mousemove', handler: function (ev) { return _this.lineMouseMove.emit(ev); } },
{ name: 'mouseout', handler: function (ev) { return _this.lineMouseOut.emit(ev); } },
{ name: 'mouseover', handler: function (ev) { return _this.lineMouseOver.emit(ev); } },
{ name: 'mouseup', handler: function (ev) { return _this.lineMouseUp.emit(ev); } },
{ name: 'rightclick', handler: function (ev) { return _this.lineRightClick.emit(ev); } },
];
handlers.forEach(function (obj) {
var os = _this._polylineManager.createEventObservable(obj.name, _this).subscribe(obj.handler);
_this._subscriptions.push(os);
});
};
/** @internal */
AgmPolyline.prototype._getPoints = function () {
if (this.points) {
return this.points.toArray();
}
return [];
};
/** @internal */
AgmPolyline.prototype.id = function () { return this._id; };
/** @internal */
AgmPolyline.prototype.ngOnDestroy = function () {
this._polylineManager.deletePolyline(this);
// unsubscribe all registered observable subscriptions
this._subscriptions.forEach(function (s) { return s.unsubscribe(); });
};
return AgmPolyline;
}());
AgmPolyline._polylineOptionsAttributes = [
'draggable', 'editable', 'visible', 'geodesic', 'strokeColor', 'strokeOpacity', 'strokeWeight',
'zIndex'
];
AgmPolyline.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Directive"], args: [{
selector: 'agm-polyline'
},] },
];
/** @nocollapse */
AgmPolyline.ctorParameters = function () { return [
{ type: _services_managers_polyline_manager__WEBPACK_IMPORTED_MODULE_1__["PolylineManager"], },
]; };
AgmPolyline.propDecorators = {
'clickable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'draggable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"], args: ['polylineDraggable',] },],
'editable': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'geodesic': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeColor': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeOpacity': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'strokeWeight': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'visible': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'zIndex': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"] },],
'lineClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineDblClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineDrag': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineDragEnd': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineDragStart': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineMouseDown': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineMouseMove': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineMouseOut': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineMouseOver': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineMouseUp': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'lineRightClick': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"] },],
'points': [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ContentChildren"], args: [_polyline_point__WEBPACK_IMPORTED_MODULE_2__["AgmPolylinePoint"],] },],
};
//# sourceMappingURL=polyline.js.map
/***/ }),
/***/ "./node_modules/@agm/core/index.js":
/*!*****************************************!*\
!*** ./node_modules/@agm/core/index.js ***!
\*****************************************/
/*! exports provided: AgmCoreModule, AgmMap, AgmCircle, AgmInfoWindow, AgmKmlLayer, AgmDataLayer, AgmMarker, AgmPolygon, AgmPolyline, AgmPolylinePoint, GoogleMapsAPIWrapper, CircleManager, InfoWindowManager, MarkerManager, PolygonManager, PolylineManager, KmlLayerManager, DataLayerManager, GoogleMapsScriptProtocol, LAZY_MAPS_API_CONFIG, LazyMapsAPILoader, MapsAPILoader, NoOpMapsAPILoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _directives__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./directives */ "./node_modules/@agm/core/directives.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmMap", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmMap"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmCircle", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmCircle"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmInfoWindow", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmInfoWindow"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmKmlLayer", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmKmlLayer"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmDataLayer", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmDataLayer"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmMarker", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmMarker"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmPolygon", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmPolygon"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmPolyline", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmPolyline"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmPolylinePoint", function() { return _directives__WEBPACK_IMPORTED_MODULE_0__["AgmPolylinePoint"]; });
/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services */ "./node_modules/@agm/core/services.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GoogleMapsAPIWrapper", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["GoogleMapsAPIWrapper"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CircleManager", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["CircleManager"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InfoWindowManager", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["InfoWindowManager"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkerManager", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["MarkerManager"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolygonManager", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["PolygonManager"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolylineManager", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["PolylineManager"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KmlLayerManager", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["KmlLayerManager"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLayerManager", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["DataLayerManager"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GoogleMapsScriptProtocol", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["GoogleMapsScriptProtocol"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LAZY_MAPS_API_CONFIG", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["LAZY_MAPS_API_CONFIG"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LazyMapsAPILoader", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["LazyMapsAPILoader"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MapsAPILoader", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["MapsAPILoader"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NoOpMapsAPILoader", function() { return _services__WEBPACK_IMPORTED_MODULE_1__["NoOpMapsAPILoader"]; });
/* harmony import */ var _core_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core.module */ "./node_modules/@agm/core/core.module.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AgmCoreModule", function() { return _core_module__WEBPACK_IMPORTED_MODULE_2__["AgmCoreModule"]; });
// main modules
// core module
// we explicitly export the module here to prevent this Ionic 2 bug:
// http://stevemichelotti.com/integrate-angular-2-google-maps-into-ionic-2/
//# sourceMappingURL=index.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services.js":
/*!********************************************!*\
!*** ./node_modules/@agm/core/services.js ***!
\********************************************/
/*! exports provided: GoogleMapsAPIWrapper, CircleManager, InfoWindowManager, MarkerManager, PolygonManager, PolylineManager, KmlLayerManager, DataLayerManager, GoogleMapsScriptProtocol, LAZY_MAPS_API_CONFIG, LazyMapsAPILoader, MapsAPILoader, NoOpMapsAPILoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _services_google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./services/google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GoogleMapsAPIWrapper", function() { return _services_google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_0__["GoogleMapsAPIWrapper"]; });
/* harmony import */ var _services_managers_circle_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services/managers/circle-manager */ "./node_modules/@agm/core/services/managers/circle-manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CircleManager", function() { return _services_managers_circle_manager__WEBPACK_IMPORTED_MODULE_1__["CircleManager"]; });
/* harmony import */ var _services_managers_info_window_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./services/managers/info-window-manager */ "./node_modules/@agm/core/services/managers/info-window-manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InfoWindowManager", function() { return _services_managers_info_window_manager__WEBPACK_IMPORTED_MODULE_2__["InfoWindowManager"]; });
/* harmony import */ var _services_managers_marker_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./services/managers/marker-manager */ "./node_modules/@agm/core/services/managers/marker-manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkerManager", function() { return _services_managers_marker_manager__WEBPACK_IMPORTED_MODULE_3__["MarkerManager"]; });
/* harmony import */ var _services_managers_polygon_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./services/managers/polygon-manager */ "./node_modules/@agm/core/services/managers/polygon-manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolygonManager", function() { return _services_managers_polygon_manager__WEBPACK_IMPORTED_MODULE_4__["PolygonManager"]; });
/* harmony import */ var _services_managers_polyline_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./services/managers/polyline-manager */ "./node_modules/@agm/core/services/managers/polyline-manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PolylineManager", function() { return _services_managers_polyline_manager__WEBPACK_IMPORTED_MODULE_5__["PolylineManager"]; });
/* harmony import */ var _services_managers_kml_layer_manager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./services/managers/kml-layer-manager */ "./node_modules/@agm/core/services/managers/kml-layer-manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KmlLayerManager", function() { return _services_managers_kml_layer_manager__WEBPACK_IMPORTED_MODULE_6__["KmlLayerManager"]; });
/* harmony import */ var _services_managers_data_layer_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./services/managers/data-layer-manager */ "./node_modules/@agm/core/services/managers/data-layer-manager.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DataLayerManager", function() { return _services_managers_data_layer_manager__WEBPACK_IMPORTED_MODULE_7__["DataLayerManager"]; });
/* harmony import */ var _services_maps_api_loader_lazy_maps_api_loader__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./services/maps-api-loader/lazy-maps-api-loader */ "./node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GoogleMapsScriptProtocol", function() { return _services_maps_api_loader_lazy_maps_api_loader__WEBPACK_IMPORTED_MODULE_8__["GoogleMapsScriptProtocol"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LAZY_MAPS_API_CONFIG", function() { return _services_maps_api_loader_lazy_maps_api_loader__WEBPACK_IMPORTED_MODULE_8__["LAZY_MAPS_API_CONFIG"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LazyMapsAPILoader", function() { return _services_maps_api_loader_lazy_maps_api_loader__WEBPACK_IMPORTED_MODULE_8__["LazyMapsAPILoader"]; });
/* harmony import */ var _services_maps_api_loader_maps_api_loader__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./services/maps-api-loader/maps-api-loader */ "./node_modules/@agm/core/services/maps-api-loader/maps-api-loader.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MapsAPILoader", function() { return _services_maps_api_loader_maps_api_loader__WEBPACK_IMPORTED_MODULE_9__["MapsAPILoader"]; });
/* harmony import */ var _services_maps_api_loader_noop_maps_api_loader__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./services/maps-api-loader/noop-maps-api-loader */ "./node_modules/@agm/core/services/maps-api-loader/noop-maps-api-loader.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NoOpMapsAPILoader", function() { return _services_maps_api_loader_noop_maps_api_loader__WEBPACK_IMPORTED_MODULE_10__["NoOpMapsAPILoader"]; });
//# sourceMappingURL=services.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/google-maps-api-wrapper.js":
/*!********************************************************************!*\
!*** ./node_modules/@agm/core/services/google-maps-api-wrapper.js ***!
\********************************************************************/
/*! exports provided: GoogleMapsAPIWrapper */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GoogleMapsAPIWrapper", function() { return GoogleMapsAPIWrapper; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _maps_api_loader_maps_api_loader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./maps-api-loader/maps-api-loader */ "./node_modules/@agm/core/services/maps-api-loader/maps-api-loader.js");
/**
* Wrapper class that handles the communication with the Google Maps Javascript
* API v3
*/
var GoogleMapsAPIWrapper = (function () {
function GoogleMapsAPIWrapper(_loader, _zone) {
var _this = this;
this._loader = _loader;
this._zone = _zone;
this._map =
new Promise(function (resolve) { _this._mapResolver = resolve; });
}
GoogleMapsAPIWrapper.prototype.createMap = function (el, mapOptions) {
var _this = this;
return this._loader.load().then(function () {
var map = new google.maps.Map(el, mapOptions);
_this._mapResolver(map);
return;
});
};
GoogleMapsAPIWrapper.prototype.setMapOptions = function (options) {
this._map.then(function (m) { m.setOptions(options); });
};
/**
* Creates a google map marker with the map context
*/
GoogleMapsAPIWrapper.prototype.createMarker = function (options, addToMap) {
if (options === void 0) { options = {}; }
if (addToMap === void 0) { addToMap = true; }
return this._map.then(function (map) {
if (addToMap) {
options.map = map;
}
return new google.maps.Marker(options);
});
};
GoogleMapsAPIWrapper.prototype.createInfoWindow = function (options) {
return this._map.then(function () { return new google.maps.InfoWindow(options); });
};
/**
* Creates a google.map.Circle for the current map.
*/
GoogleMapsAPIWrapper.prototype.createCircle = function (options) {
return this._map.then(function (map) {
options.map = map;
return new google.maps.Circle(options);
});
};
GoogleMapsAPIWrapper.prototype.createPolyline = function (options) {
return this.getNativeMap().then(function (map) {
var line = new google.maps.Polyline(options);
line.setMap(map);
return line;
});
};
GoogleMapsAPIWrapper.prototype.createPolygon = function (options) {
return this.getNativeMap().then(function (map) {
var polygon = new google.maps.Polygon(options);
polygon.setMap(map);
return polygon;
});
};
/**
* Creates a new google.map.Data layer for the current map
*/
GoogleMapsAPIWrapper.prototype.createDataLayer = function (options) {
return this._map.then(function (m) {
var data = new google.maps.Data(options);
data.setMap(m);
return data;
});
};
/**
* Determines if given coordinates are insite a Polygon path.
*/
GoogleMapsAPIWrapper.prototype.containsLocation = function (latLng, polygon) {
return google.maps.geometry.poly.containsLocation(latLng, polygon);
};
GoogleMapsAPIWrapper.prototype.subscribeToMapEvent = function (eventName) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"].create(function (observer) {
_this._map.then(function (m) {
m.addListener(eventName, function (arg) { _this._zone.run(function () { return observer.next(arg); }); });
});
});
};
GoogleMapsAPIWrapper.prototype.setCenter = function (latLng) {
return this._map.then(function (map) { return map.setCenter(latLng); });
};
GoogleMapsAPIWrapper.prototype.getZoom = function () { return this._map.then(function (map) { return map.getZoom(); }); };
GoogleMapsAPIWrapper.prototype.getBounds = function () {
return this._map.then(function (map) { return map.getBounds(); });
};
GoogleMapsAPIWrapper.prototype.setZoom = function (zoom) {
return this._map.then(function (map) { return map.setZoom(zoom); });
};
GoogleMapsAPIWrapper.prototype.getCenter = function () {
return this._map.then(function (map) { return map.getCenter(); });
};
GoogleMapsAPIWrapper.prototype.panTo = function (latLng) {
return this._map.then(function (map) { return map.panTo(latLng); });
};
GoogleMapsAPIWrapper.prototype.panBy = function (x, y) {
return this._map.then(function (map) { return map.panBy(x, y); });
};
GoogleMapsAPIWrapper.prototype.fitBounds = function (latLng) {
return this._map.then(function (map) { return map.fitBounds(latLng); });
};
GoogleMapsAPIWrapper.prototype.panToBounds = function (latLng) {
return this._map.then(function (map) { return map.panToBounds(latLng); });
};
/**
* Returns the native Google Maps Map instance. Be careful when using this instance directly.
*/
GoogleMapsAPIWrapper.prototype.getNativeMap = function () { return this._map; };
/**
* Triggers the given event name on the map instance.
*/
GoogleMapsAPIWrapper.prototype.triggerMapEvent = function (eventName) {
return this._map.then(function (m) { return google.maps.event.trigger(m, eventName); });
};
return GoogleMapsAPIWrapper;
}());
GoogleMapsAPIWrapper.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
GoogleMapsAPIWrapper.ctorParameters = function () { return [
{ type: _maps_api_loader_maps_api_loader__WEBPACK_IMPORTED_MODULE_2__["MapsAPILoader"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
]; };
//# sourceMappingURL=google-maps-api-wrapper.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/managers/circle-manager.js":
/*!********************************************************************!*\
!*** ./node_modules/@agm/core/services/managers/circle-manager.js ***!
\********************************************************************/
/*! exports provided: CircleManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CircleManager", function() { return CircleManager; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
var CircleManager = (function () {
function CircleManager(_apiWrapper, _zone) {
this._apiWrapper = _apiWrapper;
this._zone = _zone;
this._circles = new Map();
}
CircleManager.prototype.addCircle = function (circle) {
this._circles.set(circle, this._apiWrapper.createCircle({
center: { lat: circle.latitude, lng: circle.longitude },
clickable: circle.clickable,
draggable: circle.draggable,
editable: circle.editable,
fillColor: circle.fillColor,
fillOpacity: circle.fillOpacity,
radius: circle.radius,
strokeColor: circle.strokeColor,
strokeOpacity: circle.strokeOpacity,
strokePosition: circle.strokePosition,
strokeWeight: circle.strokeWeight,
visible: circle.visible,
zIndex: circle.zIndex
}));
};
/**
* Removes the given circle from the map.
*/
CircleManager.prototype.removeCircle = function (circle) {
var _this = this;
return this._circles.get(circle).then(function (c) {
c.setMap(null);
_this._circles.delete(circle);
});
};
CircleManager.prototype.setOptions = function (circle, options) {
return this._circles.get(circle).then(function (c) { return c.setOptions(options); });
};
CircleManager.prototype.getBounds = function (circle) {
return this._circles.get(circle).then(function (c) { return c.getBounds(); });
};
CircleManager.prototype.getCenter = function (circle) {
return this._circles.get(circle).then(function (c) { return c.getCenter(); });
};
CircleManager.prototype.getRadius = function (circle) {
return this._circles.get(circle).then(function (c) { return c.getRadius(); });
};
CircleManager.prototype.setCenter = function (circle) {
return this._circles.get(circle).then(function (c) { return c.setCenter({ lat: circle.latitude, lng: circle.longitude }); });
};
CircleManager.prototype.setEditable = function (circle) {
return this._circles.get(circle).then(function (c) { return c.setEditable(circle.editable); });
};
CircleManager.prototype.setDraggable = function (circle) {
return this._circles.get(circle).then(function (c) { return c.setDraggable(circle.draggable); });
};
CircleManager.prototype.setVisible = function (circle) {
return this._circles.get(circle).then(function (c) { return c.setVisible(circle.visible); });
};
CircleManager.prototype.setRadius = function (circle) {
return this._circles.get(circle).then(function (c) { return c.setRadius(circle.radius); });
};
CircleManager.prototype.createEventObservable = function (eventName, circle) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"].create(function (observer) {
var listener = null;
_this._circles.get(circle).then(function (c) {
listener = c.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });
});
return function () {
if (listener !== null) {
listener.remove();
}
};
});
};
return CircleManager;
}());
CircleManager.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
CircleManager.ctorParameters = function () { return [
{ type: _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__["GoogleMapsAPIWrapper"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
]; };
//# sourceMappingURL=circle-manager.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/managers/data-layer-manager.js":
/*!************************************************************************!*\
!*** ./node_modules/@agm/core/services/managers/data-layer-manager.js ***!
\************************************************************************/
/*! exports provided: DataLayerManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataLayerManager", function() { return DataLayerManager; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
/**
* Manages all Data Layers for a Google Map instance.
*/
var DataLayerManager = (function () {
function DataLayerManager(_wrapper, _zone) {
this._wrapper = _wrapper;
this._zone = _zone;
this._layers = new Map();
}
/**
* Adds a new Data Layer to the map.
*/
DataLayerManager.prototype.addDataLayer = function (layer) {
var _this = this;
var newLayer = this._wrapper.createDataLayer({
style: layer.style
})
.then(function (d) {
if (layer.geoJson) {
_this.getDataFeatures(d, layer.geoJson).then(function (features) { return d.features = features; });
}
return d;
});
this._layers.set(layer, newLayer);
};
DataLayerManager.prototype.deleteDataLayer = function (layer) {
var _this = this;
this._layers.get(layer).then(function (l) {
l.setMap(null);
_this._layers.delete(layer);
});
};
DataLayerManager.prototype.updateGeoJson = function (layer, geoJson) {
var _this = this;
this._layers.get(layer).then(function (l) {
l.forEach(function (feature) {
l.remove(feature);
var index = l.features.indexOf(feature, 0);
if (index > -1) {
l.features.splice(index, 1);
}
});
_this.getDataFeatures(l, geoJson).then(function (features) { return l.features = features; });
});
};
DataLayerManager.prototype.setDataOptions = function (layer, options) {
this._layers.get(layer).then(function (l) {
l.setControlPosition(options.controlPosition);
l.setControls(options.controls);
l.setDrawingMode(options.drawingMode);
l.setStyle(options.style);
});
};
/**
* Creates a Google Maps event listener for the given DataLayer as an Observable
*/
DataLayerManager.prototype.createEventObservable = function (eventName, layer) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"].create(function (observer) {
_this._layers.get(layer).then(function (d) {
d.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });
});
});
};
/**
* Extract features from a geoJson using google.maps Data Class
* @param d : google.maps.Data class instance
* @param geoJson : url or geojson object
*/
DataLayerManager.prototype.getDataFeatures = function (d, geoJson) {
return new Promise(function (resolve, reject) {
if (typeof geoJson === 'object') {
try {
var features = d.addGeoJson(geoJson);
resolve(features);
}
catch (e) {
reject(e);
}
}
else if (typeof geoJson === 'string') {
d.loadGeoJson(geoJson, null, resolve);
}
else {
reject("Impossible to extract features from geoJson: wrong argument type");
}
});
};
return DataLayerManager;
}());
DataLayerManager.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
DataLayerManager.ctorParameters = function () { return [
{ type: _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__["GoogleMapsAPIWrapper"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
]; };
//# sourceMappingURL=data-layer-manager.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/managers/info-window-manager.js":
/*!*************************************************************************!*\
!*** ./node_modules/@agm/core/services/managers/info-window-manager.js ***!
\*************************************************************************/
/*! exports provided: InfoWindowManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InfoWindowManager", function() { return InfoWindowManager; });
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
/* harmony import */ var _marker_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./marker-manager */ "./node_modules/@agm/core/services/managers/marker-manager.js");
var InfoWindowManager = (function () {
function InfoWindowManager(_mapsWrapper, _zone, _markerManager) {
this._mapsWrapper = _mapsWrapper;
this._zone = _zone;
this._markerManager = _markerManager;
this._infoWindows = new Map();
}
InfoWindowManager.prototype.deleteInfoWindow = function (infoWindow) {
var _this = this;
var iWindow = this._infoWindows.get(infoWindow);
if (iWindow == null) {
// info window already deleted
return Promise.resolve();
}
return iWindow.then(function (i) {
return _this._zone.run(function () {
i.close();
_this._infoWindows.delete(infoWindow);
});
});
};
InfoWindowManager.prototype.setPosition = function (infoWindow) {
return this._infoWindows.get(infoWindow).then(function (i) { return i.setPosition({
lat: infoWindow.latitude,
lng: infoWindow.longitude
}); });
};
InfoWindowManager.prototype.setZIndex = function (infoWindow) {
return this._infoWindows.get(infoWindow)
.then(function (i) { return i.setZIndex(infoWindow.zIndex); });
};
InfoWindowManager.prototype.open = function (infoWindow) {
var _this = this;
return this._infoWindows.get(infoWindow).then(function (w) {
if (infoWindow.hostMarker != null) {
return _this._markerManager.getNativeMarker(infoWindow.hostMarker).then(function (marker) {
return _this._mapsWrapper.getNativeMap().then(function (map) { return w.open(map, marker); });
});
}
return _this._mapsWrapper.getNativeMap().then(function (map) { return w.open(map); });
});
};
InfoWindowManager.prototype.close = function (infoWindow) {
return this._infoWindows.get(infoWindow).then(function (w) { return w.close(); });
};
InfoWindowManager.prototype.setOptions = function (infoWindow, options) {
return this._infoWindows.get(infoWindow).then(function (i) { return i.setOptions(options); });
};
InfoWindowManager.prototype.addInfoWindow = function (infoWindow) {
var options = {
content: infoWindow.content,
maxWidth: infoWindow.maxWidth,
zIndex: infoWindow.zIndex,
disableAutoPan: infoWindow.disableAutoPan
};
if (typeof infoWindow.latitude === 'number' && typeof infoWindow.longitude === 'number') {
options.position = { lat: infoWindow.latitude, lng: infoWindow.longitude };
}
var infoWindowPromise = this._mapsWrapper.createInfoWindow(options);
this._infoWindows.set(infoWindow, infoWindowPromise);
};
/**
* Creates a Google Maps event listener for the given InfoWindow as an Observable
*/
InfoWindowManager.prototype.createEventObservable = function (eventName, infoWindow) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"].create(function (observer) {
_this._infoWindows.get(infoWindow).then(function (i) {
i.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });
});
});
};
return InfoWindowManager;
}());
InfoWindowManager.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"] },
];
/** @nocollapse */
InfoWindowManager.ctorParameters = function () { return [
{ type: _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__["GoogleMapsAPIWrapper"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"], },
{ type: _marker_manager__WEBPACK_IMPORTED_MODULE_3__["MarkerManager"], },
]; };
//# sourceMappingURL=info-window-manager.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/managers/kml-layer-manager.js":
/*!***********************************************************************!*\
!*** ./node_modules/@agm/core/services/managers/kml-layer-manager.js ***!
\***********************************************************************/
/*! exports provided: KmlLayerManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KmlLayerManager", function() { return KmlLayerManager; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
/**
* Manages all KML Layers for a Google Map instance.
*/
var KmlLayerManager = (function () {
function KmlLayerManager(_wrapper, _zone) {
this._wrapper = _wrapper;
this._zone = _zone;
this._layers = new Map();
}
/**
* Adds a new KML Layer to the map.
*/
KmlLayerManager.prototype.addKmlLayer = function (layer) {
var newLayer = this._wrapper.getNativeMap().then(function (m) {
return new google.maps.KmlLayer({
clickable: layer.clickable,
map: m,
preserveViewport: layer.preserveViewport,
screenOverlays: layer.screenOverlays,
suppressInfoWindows: layer.suppressInfoWindows,
url: layer.url,
zIndex: layer.zIndex
});
});
this._layers.set(layer, newLayer);
};
KmlLayerManager.prototype.setOptions = function (layer, options) {
this._layers.get(layer).then(function (l) { return l.setOptions(options); });
};
KmlLayerManager.prototype.deleteKmlLayer = function (layer) {
var _this = this;
this._layers.get(layer).then(function (l) {
l.setMap(null);
_this._layers.delete(layer);
});
};
/**
* Creates a Google Maps event listener for the given KmlLayer as an Observable
*/
KmlLayerManager.prototype.createEventObservable = function (eventName, layer) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"].create(function (observer) {
_this._layers.get(layer).then(function (m) {
m.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });
});
});
};
return KmlLayerManager;
}());
KmlLayerManager.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
KmlLayerManager.ctorParameters = function () { return [
{ type: _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__["GoogleMapsAPIWrapper"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
]; };
//# sourceMappingURL=kml-layer-manager.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/managers/marker-manager.js":
/*!********************************************************************!*\
!*** ./node_modules/@agm/core/services/managers/marker-manager.js ***!
\********************************************************************/
/*! exports provided: MarkerManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkerManager", function() { return MarkerManager; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
var MarkerManager = (function () {
function MarkerManager(_mapsWrapper, _zone) {
this._mapsWrapper = _mapsWrapper;
this._zone = _zone;
this._markers = new Map();
}
MarkerManager.prototype.deleteMarker = function (marker) {
var _this = this;
var m = this._markers.get(marker);
if (m == null) {
// marker already deleted
return Promise.resolve();
}
return m.then(function (m) {
return _this._zone.run(function () {
m.setMap(null);
_this._markers.delete(marker);
});
});
};
MarkerManager.prototype.updateMarkerPosition = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setPosition({ lat: marker.latitude, lng: marker.longitude }); });
};
MarkerManager.prototype.updateTitle = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setTitle(marker.title); });
};
MarkerManager.prototype.updateLabel = function (marker) {
return this._markers.get(marker).then(function (m) { m.setLabel(marker.label); });
};
MarkerManager.prototype.updateDraggable = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setDraggable(marker.draggable); });
};
MarkerManager.prototype.updateIcon = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setIcon(marker.iconUrl); });
};
MarkerManager.prototype.updateOpacity = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setOpacity(marker.opacity); });
};
MarkerManager.prototype.updateVisible = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setVisible(marker.visible); });
};
MarkerManager.prototype.updateZIndex = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setZIndex(marker.zIndex); });
};
MarkerManager.prototype.updateClickable = function (marker) {
return this._markers.get(marker).then(function (m) { return m.setClickable(marker.clickable); });
};
MarkerManager.prototype.addMarker = function (marker) {
var markerPromise = this._mapsWrapper.createMarker({
position: { lat: marker.latitude, lng: marker.longitude },
label: marker.label,
draggable: marker.draggable,
icon: marker.iconUrl,
opacity: marker.opacity,
visible: marker.visible,
zIndex: marker.zIndex,
title: marker.title,
clickable: marker.clickable
});
this._markers.set(marker, markerPromise);
};
MarkerManager.prototype.getNativeMarker = function (marker) {
return this._markers.get(marker);
};
MarkerManager.prototype.createEventObservable = function (eventName, marker) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"].create(function (observer) {
_this._markers.get(marker).then(function (m) {
m.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });
});
});
};
return MarkerManager;
}());
MarkerManager.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
MarkerManager.ctorParameters = function () { return [
{ type: _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__["GoogleMapsAPIWrapper"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
]; };
//# sourceMappingURL=marker-manager.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/managers/polygon-manager.js":
/*!*********************************************************************!*\
!*** ./node_modules/@agm/core/services/managers/polygon-manager.js ***!
\*********************************************************************/
/*! exports provided: PolygonManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PolygonManager", function() { return PolygonManager; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
var PolygonManager = (function () {
function PolygonManager(_mapsWrapper, _zone) {
this._mapsWrapper = _mapsWrapper;
this._zone = _zone;
this._polygons = new Map();
}
PolygonManager.prototype.addPolygon = function (path) {
var polygonPromise = this._mapsWrapper.createPolygon({
clickable: path.clickable,
draggable: path.draggable,
editable: path.editable,
fillColor: path.fillColor,
fillOpacity: path.fillOpacity,
geodesic: path.geodesic,
paths: path.paths,
strokeColor: path.strokeColor,
strokeOpacity: path.strokeOpacity,
strokeWeight: path.strokeWeight,
visible: path.visible,
zIndex: path.zIndex,
});
this._polygons.set(path, polygonPromise);
};
PolygonManager.prototype.updatePolygon = function (polygon) {
var _this = this;
var m = this._polygons.get(polygon);
if (m == null) {
return Promise.resolve();
}
return m.then(function (l) { return _this._zone.run(function () { l.setPaths(polygon.paths); }); });
};
PolygonManager.prototype.setPolygonOptions = function (path, options) {
return this._polygons.get(path).then(function (l) { l.setOptions(options); });
};
PolygonManager.prototype.deletePolygon = function (paths) {
var _this = this;
var m = this._polygons.get(paths);
if (m == null) {
return Promise.resolve();
}
return m.then(function (l) {
return _this._zone.run(function () {
l.setMap(null);
_this._polygons.delete(paths);
});
});
};
PolygonManager.prototype.createEventObservable = function (eventName, path) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"].create(function (observer) {
_this._polygons.get(path).then(function (l) {
l.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });
});
});
};
return PolygonManager;
}());
PolygonManager.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
PolygonManager.ctorParameters = function () { return [
{ type: _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__["GoogleMapsAPIWrapper"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
]; };
//# sourceMappingURL=polygon-manager.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/managers/polyline-manager.js":
/*!**********************************************************************!*\
!*** ./node_modules/@agm/core/services/managers/polyline-manager.js ***!
\**********************************************************************/
/*! exports provided: PolylineManager */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PolylineManager", function() { return PolylineManager; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs/Observable */ "./node_modules/rxjs-compat/_esm5/Observable.js");
/* harmony import */ var _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../google-maps-api-wrapper */ "./node_modules/@agm/core/services/google-maps-api-wrapper.js");
var PolylineManager = (function () {
function PolylineManager(_mapsWrapper, _zone) {
this._mapsWrapper = _mapsWrapper;
this._zone = _zone;
this._polylines = new Map();
}
PolylineManager._convertPoints = function (line) {
var path = line._getPoints().map(function (point) {
return { lat: point.latitude, lng: point.longitude };
});
return path;
};
PolylineManager.prototype.addPolyline = function (line) {
var path = PolylineManager._convertPoints(line);
var polylinePromise = this._mapsWrapper.createPolyline({
clickable: line.clickable,
draggable: line.draggable,
editable: line.editable,
geodesic: line.geodesic,
strokeColor: line.strokeColor,
strokeOpacity: line.strokeOpacity,
strokeWeight: line.strokeWeight,
visible: line.visible,
zIndex: line.zIndex,
path: path
});
this._polylines.set(line, polylinePromise);
};
PolylineManager.prototype.updatePolylinePoints = function (line) {
var _this = this;
var path = PolylineManager._convertPoints(line);
var m = this._polylines.get(line);
if (m == null) {
return Promise.resolve();
}
return m.then(function (l) { return _this._zone.run(function () { l.setPath(path); }); });
};
PolylineManager.prototype.setPolylineOptions = function (line, options) {
return this._polylines.get(line).then(function (l) { l.setOptions(options); });
};
PolylineManager.prototype.deletePolyline = function (line) {
var _this = this;
var m = this._polylines.get(line);
if (m == null) {
return Promise.resolve();
}
return m.then(function (l) {
return _this._zone.run(function () {
l.setMap(null);
_this._polylines.delete(line);
});
});
};
PolylineManager.prototype.createEventObservable = function (eventName, line) {
var _this = this;
return rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"].create(function (observer) {
_this._polylines.get(line).then(function (l) {
l.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });
});
});
};
return PolylineManager;
}());
PolylineManager.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
PolylineManager.ctorParameters = function () { return [
{ type: _google_maps_api_wrapper__WEBPACK_IMPORTED_MODULE_2__["GoogleMapsAPIWrapper"], },
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgZone"], },
]; };
//# sourceMappingURL=polyline-manager.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.js ***!
\*********************************************************************************/
/*! exports provided: GoogleMapsScriptProtocol, LAZY_MAPS_API_CONFIG, LazyMapsAPILoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GoogleMapsScriptProtocol", function() { return GoogleMapsScriptProtocol; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LAZY_MAPS_API_CONFIG", function() { return LAZY_MAPS_API_CONFIG; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LazyMapsAPILoader", function() { return LazyMapsAPILoader; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _utils_browser_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/browser-globals */ "./node_modules/@agm/core/utils/browser-globals.js");
/* harmony import */ var _maps_api_loader__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./maps-api-loader */ "./node_modules/@agm/core/services/maps-api-loader/maps-api-loader.js");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var GoogleMapsScriptProtocol;
(function (GoogleMapsScriptProtocol) {
GoogleMapsScriptProtocol[GoogleMapsScriptProtocol["HTTP"] = 1] = "HTTP";
GoogleMapsScriptProtocol[GoogleMapsScriptProtocol["HTTPS"] = 2] = "HTTPS";
GoogleMapsScriptProtocol[GoogleMapsScriptProtocol["AUTO"] = 3] = "AUTO";
})(GoogleMapsScriptProtocol || (GoogleMapsScriptProtocol = {}));
/**
* Token for the config of the LazyMapsAPILoader. Please provide an object of type {@link
* LazyMapsAPILoaderConfig}.
*/
var LAZY_MAPS_API_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["InjectionToken"]('angular-google-maps LAZY_MAPS_API_CONFIG');
var LazyMapsAPILoader = (function (_super) {
__extends(LazyMapsAPILoader, _super);
function LazyMapsAPILoader(config, w, d) {
var _this = _super.call(this) || this;
_this._config = config || {};
_this._windowRef = w;
_this._documentRef = d;
return _this;
}
LazyMapsAPILoader.prototype.load = function () {
var _this = this;
if (this._scriptLoadingPromise) {
return this._scriptLoadingPromise;
}
var script = this._documentRef.getNativeDocument().createElement('script');
script.type = 'text/javascript';
script.async = true;
script.defer = true;
var callbackName = "angular2GoogleMapsLazyMapsAPILoader";
script.src = this._getScriptSrc(callbackName);
this._scriptLoadingPromise = new Promise(function (resolve, reject) {
_this._windowRef.getNativeWindow()[callbackName] = function () {
resolve();
};
script.onerror = function (error) {
reject(error);
};
});
this._documentRef.getNativeDocument().body.appendChild(script);
return this._scriptLoadingPromise;
};
LazyMapsAPILoader.prototype._getScriptSrc = function (callbackName) {
var protocolType = (this._config && this._config.protocol) || GoogleMapsScriptProtocol.HTTPS;
var protocol;
switch (protocolType) {
case GoogleMapsScriptProtocol.AUTO:
protocol = '';
break;
case GoogleMapsScriptProtocol.HTTP:
protocol = 'http:';
break;
case GoogleMapsScriptProtocol.HTTPS:
protocol = 'https:';
break;
}
var hostAndPath = this._config.hostAndPath || 'maps.googleapis.com/maps/api/js';
var queryParams = {
v: this._config.apiVersion || '3',
callback: callbackName,
key: this._config.apiKey,
client: this._config.clientId,
channel: this._config.channel,
libraries: this._config.libraries,
region: this._config.region,
language: this._config.language
};
var params = Object.keys(queryParams)
.filter(function (k) { return queryParams[k] != null; })
.filter(function (k) {
// remove empty arrays
return !Array.isArray(queryParams[k]) ||
(Array.isArray(queryParams[k]) && queryParams[k].length > 0);
})
.map(function (k) {
// join arrays as comma seperated strings
var i = queryParams[k];
if (Array.isArray(i)) {
return { key: k, value: i.join(',') };
}
return { key: k, value: queryParams[k] };
})
.map(function (entry) {
return entry.key + "=" + entry.value;
})
.join('&');
return protocol + "//" + hostAndPath + "?" + params;
};
return LazyMapsAPILoader;
}(_maps_api_loader__WEBPACK_IMPORTED_MODULE_2__["MapsAPILoader"]));
LazyMapsAPILoader.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
LazyMapsAPILoader.ctorParameters = function () { return [
{ type: undefined, decorators: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"], args: [LAZY_MAPS_API_CONFIG,] },] },
{ type: _utils_browser_globals__WEBPACK_IMPORTED_MODULE_1__["WindowRef"], },
{ type: _utils_browser_globals__WEBPACK_IMPORTED_MODULE_1__["DocumentRef"], },
]; };
//# sourceMappingURL=lazy-maps-api-loader.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/maps-api-loader/maps-api-loader.js":
/*!****************************************************************************!*\
!*** ./node_modules/@agm/core/services/maps-api-loader/maps-api-loader.js ***!
\****************************************************************************/
/*! exports provided: MapsAPILoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapsAPILoader", function() { return MapsAPILoader; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
var MapsAPILoader = (function () {
function MapsAPILoader() {
}
return MapsAPILoader;
}());
MapsAPILoader.decorators = [
{ type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"] },
];
/** @nocollapse */
MapsAPILoader.ctorParameters = function () { return []; };
//# sourceMappingURL=maps-api-loader.js.map
/***/ }),
/***/ "./node_modules/@agm/core/services/maps-api-loader/noop-maps-api-loader.js":
/*!*********************************************************************************!*\
!*** ./node_modules/@agm/core/services/maps-api-loader/noop-maps-api-loader.js ***!
\*********************************************************************************/
/*! exports provided: NoOpMapsAPILoader */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoOpMapsAPILoader", function() { return NoOpMapsAPILoader; });
/**
* When using the NoOpMapsAPILoader, the Google Maps API must be added to the page via a `