UNPKG

242 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","../../../packages/core/src/lib/services/maps-api-loader/maps-api-loader.ts","../../../packages/core/src/lib/services/google-maps-api-wrapper.ts","../../../packages/core/src/lib/services/managers/circle-manager.ts","../../../packages/core/src/lib/services/managers/data-layer-manager.ts","../../../packages/core/src/lib/services/fit-bounds.ts","../../../packages/core/src/lib/services/geocoder-service.ts","../../../packages/core/src/lib/services/maps-api-loader/lazy-maps-api-loader.ts","../../../packages/core/src/lib/utils/browser-globals.ts","../../../packages/core/src/lib/services/managers/marker-manager.ts","../../../packages/core/src/lib/services/managers/info-window-manager.ts","../../../packages/core/src/lib/services/managers/kml-layer-manager.ts","../../../packages/core/src/lib/services/managers/layer-manager.ts","../../../packages/core/src/lib/services/maps-api-loader/noop-maps-api-loader.ts","../../../packages/core/src/lib/utils/mvcarray-utils.ts","../../../packages/core/src/lib/services/managers/polygon-manager.ts","../../../packages/core/src/lib/services/managers/polyline-manager.ts","../../../packages/core/src/lib/services/managers/rectangle-manager.ts","../../../packages/core/src/lib/directives/bicycling-layer.ts","../../../packages/core/src/lib/directives/circle.ts","../../../packages/core/src/lib/directives/data-layer.ts","../../../packages/core/src/lib/directives/fit-bounds.ts","../../../packages/core/src/lib/directives/info-window.ts","../../../packages/core/src/lib/directives/kml-layer.ts","../../../packages/core/src/lib/directives/map.ts","../../../packages/core/src/lib/directives/marker.ts","../../../packages/core/src/lib/directives/polygon.ts","../../../packages/core/src/lib/directives/polyline-icon.ts","../../../packages/core/src/lib/directives/polyline-point.ts","../../../packages/core/src/lib/directives/polyline.ts","../../../packages/core/src/lib/directives/rectangle.ts","../../../packages/core/src/lib/directives/transit-layer.ts","../../../packages/core/src/lib/core.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","TypeError","call","pop","length","push","__read","o","m","r","i","ar","error","__spread","arguments","concat","Injectable","GoogleMapsAPIWrapper","_loader","_zone","_this","_map","_mapResolver","createMap","el","mapOptions","runOutsideAngular","load","map","google","maps","Map","setMapOptions","options","setOptions","createMarker","addToMap","Marker","createInfoWindow","InfoWindow","createCircle","Circle","createRectangle","Rectangle","createPolyline","getNativeMap","line","Polyline","setMap","createPolygon","polygon","Polygon","createDataLayer","data","Data","createTransitLayer","newLayer","TransitLayer","createBicyclingLayer","BicyclingLayer","containsLocation","latLng","geometry","poly","subscribeToMapEvent","eventName","Observable","observer","addListener","run","clearInstanceListeners","event","setCenter","getZoom","getBounds","getMapTypeId","setZoom","zoom","getCenter","panTo","panBy","x","fitBounds","padding","panToBounds","triggerMapEvent","trigger","MapsAPILoader","NgZone","CircleManager","_apiWrapper","_circles","addCircle","circle","set","center","lat","latitude","lng","longitude","clickable","draggable","editable","fillColor","fillOpacity","radius","strokeColor","strokeOpacity","strokePosition","StrokePosition","strokeWeight","visible","zIndex","removeCircle","get","c","delete","actualParam","getRadius","setEditable","setDraggable","setVisible","setRadius","getNativeCircle","createEventObservable","listener","remove","DataLayerManager","_wrapper","_layers","addDataLayer","layer","style","geoJson","getDataFeatures","features","deleteDataLayer","l","updateGeoJson","forEach","feature","index","indexOf","splice","setDataOptions","setControlPosition","controlPosition","setControls","controls","setDrawingMode","drawingMode","setStyle","addGeoJson","loadGeoJson","FitBoundsService","loader","_boundsChangeSampleTime$","BehaviorSubject","_includeInBounds$","bounds$","from","pipe","flatMap","sample","switchMap","time","timer","includeInBounds","_generateBounds","shareReplay","bounds","LatLngBounds","extend","addToBounds","id","_createIdentifier","has","boundsMap","removeFromBounds","changeFitBoundsChangeSampleTime","timeMs","getBounds$","AgmGeocoder","connectableGeocoder$","subscriber","_createGeocoder","multicast","ReplaySubject","connect","geocoder$","geocode","request","geocoder","_getGoogleResults","bindCallback","geocodeObservable","_a","_b","results","status","GeocoderStatus","OK","of","throwError","Geocoder","args","providedIn","GoogleMapsScriptProtocol","WindowRef","getNativeWindow","window","DocumentRef","getNativeDocument","document","BROWSER_GLOBALS_PROVIDERS","LAZY_MAPS_API_CONFIG","InjectionToken","LazyMapsAPILoader","config","w","localeId","_super","_SCRIPT_ID","callbackName","_config","_windowRef","_documentRef","_scriptLoadingPromise","scriptOnPage","getElementById","_assignScriptLoadingPromise","script","createElement","type","async","defer","src","_getScriptSrc","appendChild","scriptElem","onerror","protocol","HTTPS","AUTO","HTTP","hostAndPath","queryParams","apiVersion","callback","key","apiKey","client","clientId","channel","libraries","region","language","keys","filter","k","isArray","join","entry","Optional","Inject","LOCALE_ID","MarkerManager","_mapsWrapper","_markers","convertAnimation","uiAnim","Animation","deleteMarker","markerDirective","markerPromise","marker","updateMarkerPosition","setPosition","updateTitle","setTitle","title","updateLabel","setLabel","updateDraggable","updateIcon","setIcon","iconUrl","updateOpacity","setOpacity","opacity","updateVisible","updateZIndex","setZIndex","updateClickable","setClickable","updateAnimation","_c","setAnimation","animation","addMarker","position","icon","_d","getNativeMarker","InfoWindowManager","_markerManager","_infoWindows","deleteInfoWindow","infoWindow","iWindow","close","open","hostMarker","addInfoWindow","content","maxWidth","disableAutoPan","infoWindowPromise","KmlLayerManager","addKmlLayer","KmlLayer","preserveViewport","screenOverlays","suppressInfoWindows","url","deleteKmlLayer","LayerManager","addTransitLayer","addBicyclingLayer","deleteLayer","currentLayer","NoOpMapsAPILoader","Error","createMVCEventObservable","array","eventNames","fromEventPattern","handler","previous","newArr","getArray","_handler","evListeners","evListener","MvcArrayMock","vals","listeners","remove_at","insert_at","set_at","clear","removeAt","getAt","getLength","insertAt","elem","deleted","setAt","listenerArr","bindTo","changed","notify","setValues","unbind","unbindAll","PolygonManager","_polygons","addPolygon","path","polygonPromise","geodesic","paths","updatePolygon","setPaths","setPolygonOptions","deletePolygon","getPath","polygonDirective","getPaths","createPathEventObservable","agmPolygon","startWith","parentMVEvent","merge","chMVC","chMVCEvent","pathIndex","skip","retVal","subArr","toJSON","PolylineManager","_polylines","_convertPoints","_getPoints","point","_convertPath","symbolPath","SymbolPath","_convertIcons","icons","_getIcons","agmIcon","fixedRotation","offset","repeat","anchor","Point","anchorX","anchorY","rotation","scale","entries","addPolyline","polylinePromise","updatePolylinePoints","setPath","updateIconSequences","setPolylineOptions","deletePolyline","getMVCPath","agmPolyline","RectangleManager","_rectangles","addRectangle","rectangle","north","east","south","west","removeRectangle","actualStrokePosition","setBounds","subsrciber","layerId","AgmBicyclingLayer","_manager","_addedToManager","_id","toString","ngOnInit","ngOnDestroy","Directive","selector","Input","AgmCircle","centerChange","EventEmitter","circleClick","circleDblClick","drag","dragEnd","dragStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","radiusChange","rightClick","_circleAddedToManager","_eventSubscriptions","_registerEventListeners","ngOnChanges","changes","_updateCircleOptionsChanges","optionKeys","_mapOptions","currentValue","events","eventEmitter","subscribe","emit","s","unsubscribe","Output","AgmDataLayer","_subscriptions","layerClick","_addEventListeners","name","ev","obj","os","geoJsonChange","dataOptions","_dataOptionsAttributes","reduce","AgmFitBounds","_fitBoundsAccessor","_fitBoundsService","agmFitBounds","_destroyed$","Subject","_latestFitBoundsDetails","_updateBounds","getFitBoundsDetails$","distinctUntilChanged","takeUntil","details","newFitBoundsDetails","complete","FitBoundsAccessor","decorators","Self","infoWindowId","AgmInfoWindow","_infoWindowManager","_el","isOpen","infoWindowClose","_infoWindowAddedToManager","nativeElement","querySelector","_updateOpenState","_setInfoWindowOptions","_infoWindowOptionsInputs","Component","template","ElementRef","AgmKmlLayer","defaultViewportChange","statusChange","_updatePolygonOptions","_kmlLayerOptions","AgmFullscreenControl","getOptions","fullscreenControl","fullscreenControlOptions","ControlPosition","AgmMapControl","providers","provide","useExisting","AgmMapTypeControl","mapTypeControl","mapTypeControlOptions","MapTypeControlStyle","mapTypeIds","mapTypeId","MapTypeId","AgmPanControl","panControl","panControlOptions","AgmRotateControl","rotateControl","rotateControlOptions","AgmScaleControl","scaleControl","AgmStreetViewControl","streetViewControl","streetViewControlOptions","AgmZoomControl","zoomControl","zoomControlOptions","ZoomControlStyle","AgmMap","_elem","_platformId","disableDoubleClickZoom","disableDefaultUI","scrollwheel","keyboardShortcuts","styles","usePanning","clickableIcons","showDefaultInfoWindow","gestureHandling","tilt","_observableSubscriptions","mapClick","mapRightClick","mapDblClick","boundsChange","mapTypeIdChange","idle","zoomChange","mapReady","tilesLoaded","ngAfterContentInit","isPlatformServer","container","_initMapInstance","minZoom","maxZoom","controlSize","backgroundColor","draggableCursor","draggingCursor","toLocaleLowerCase","restriction","_handleMapCenterChange","_handleMapZoomChange","_handleMapMouseEvents","_handleBoundsChange","_handleMapTypeIdChange","_handleTilesLoadedEvent","_handleIdleEvent","_handleControlChange","_fitBoundsSubscription","_updateMapOptionsChanges","_updatePosition","_mapOptionsAttributes","triggerResize","recenter","setTimeout","_fitBounds","_setCenter","newCenter","_subscribeToFitBoundsUpdates","fitBoundsPadding","_isLatLngBoundsLiteral","newBounds","union","undefined","z","emitter","placeId","stop","_setControls","mapControls","controlOptions","control","assign","PLATFORM_ID","ContentChildren","markerId","AgmMarker","openInfoWindow","animationChange","markerClick","markerDblClick","markerRightClick","QueryList","_markerAddedToManger","_fitBoundsDetails$","handleInfoWindowUpdate","Number","_updateFitBoundsDetails","asObservable","cs","dcs","rc","ds","de","mover","mout","anChng","forwardRef","AgmPolygon","_polygonManager","polyClick","polyDblClick","polyDrag","polyDragEnd","polyDragStart","polyMouseDown","polyMouseMove","polyMouseOut","polyMouseOver","polyMouseUp","polyRightClick","polyPathsChange","_polygonAddedToManager","_init","paths$","pathEvent","_polygonOptionsAttributes","AgmPolylineIcon","AgmPolylinePoint","positionChanged","polylineId","AgmPolyline","_polylineManager","lineClick","lineDblClick","lineDrag","lineDragEnd","lineDragStart","lineMouseDown","lineMouseMove","lineMouseOut","lineMouseOver","lineMouseUp","lineRightClick","polyPathChange","_polylineAddedToManager","points","pointSub","iconSub","iconSequences","_polylineOptionsAttributes","ob$","toArray","AgmRectangle","rectangleClick","rectangleDblClick","_rectangleAddedToManager","_updateRectangleOptionsChanges","getNorthEast","getSouthWest","AgmTransitLayer","coreDirectives","AgmCoreModule","forRoot","lazyMapsAPILoaderConfig","ngModule","useClass","useValue","NgModule","declarations","exports"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,aAGZO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,YAyCnEK,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,IAAW,MAAOG,GAAKL,EAAOK,IACpF,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,IAAW,MAAOG,GAAKL,EAAOK,IACvF,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,OAITO,KAAKR,EAAWK,GAClGH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,oBAItDO,EAAYjB,EAASkB,GACjC,IAAsGC,EAAGC,EAA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O,SAAU,kEATLrH,uCAkBJsH,EAAAA,2BCqCL,SAAAmQ,YAISA,EAAAC,QAAP,SAAeC,GACb,MAAO,CACLC,SAAUH,EACV5K,UAAStgB,EACJyM,EAAyB,CAAE,CAAC8T,QAAS7b,EAAe4mB,SAAU1e,GACjE,CAAC2T,QAAS7T,EAAsB6e,SAAUH,iCAVjDI,EAAAA,SAAQxf,KAAA,CAAC,CAACyf,aAAcR,KAAkBS,QAAST","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Injectable } from '@angular/core';\n\n@Injectable()\nexport abstract class MapsAPILoader {\n abstract load(): Promise<void>;\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { MapsAPILoader } from './maps-api-loader/maps-api-loader';\n\n/**\n * Wrapper class that handles the communication with the Google Maps Javascript\n * API v3\n */\n@Injectable()\nexport class GoogleMapsAPIWrapper {\n private _map: Promise<google.maps.Map>;\n private _mapResolver: (value?: google.maps.Map) => void;\n\n constructor(private _loader: MapsAPILoader, private _zone: NgZone) {\n this._map =\n new Promise<google.maps.Map>((resolve: () => void) => { this._mapResolver = resolve; });\n }\n\n createMap(el: HTMLElement, mapOptions: google.maps.MapOptions): Promise<void> {\n return this._zone.runOutsideAngular(() => {\n return this._loader.load().then(() => {\n const map = new google.maps.Map(el, mapOptions);\n this._mapResolver(map);\n return;\n });\n });\n }\n\n setMapOptions(options: google.maps.MapOptions) {\n return this._zone.runOutsideAngular(() => {\n this._map.then((m: google.maps.Map) => { m.setOptions(options); });\n });\n }\n\n /**\n * Creates a google map marker with the map context\n */\n createMarker(options: google.maps.MarkerOptions = {}, addToMap: boolean = true):\n Promise<google.maps.Marker> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => {\n if (addToMap) {\n options.map = map;\n }\n return new google.maps.Marker(options);\n });\n });\n }\n\n createInfoWindow(options?: google.maps.InfoWindowOptions): Promise<google.maps.InfoWindow> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then(() => new google.maps.InfoWindow(options));\n });\n }\n\n /**\n * Creates a google.map.Circle for the current map.\n */\n createCircle(options: google.maps.CircleOptions): Promise<google.maps.Circle> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => {\n options.map = map;\n return new google.maps.Circle(options);\n });\n });\n }\n\n /**\n * Creates a google.map.Rectangle for the current map.\n */\n createRectangle(options: google.maps.RectangleOptions): Promise<google.maps.Rectangle> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => {\n options.map = map;\n return new google.maps.Rectangle(options);\n });\n });\n }\n\n createPolyline(options: google.maps.PolylineOptions): Promise<google.maps.Polyline> {\n return this._zone.runOutsideAngular(() => {\n return this.getNativeMap().then((map: google.maps.Map) => {\n const line = new google.maps.Polyline(options);\n line.setMap(map);\n return line;\n });\n });\n }\n\n createPolygon(options: google.maps.PolygonOptions): Promise<google.maps.Polygon> {\n return this._zone.runOutsideAngular(() => {\n return this.getNativeMap().then((map: google.maps.Map) => {\n const polygon = new google.maps.Polygon(options);\n polygon.setMap(map);\n return polygon;\n });\n });\n }\n\n /**\n * Creates a new google.map.Data layer for the current map\n */\n createDataLayer(options?: google.maps.Data.DataOptions): Promise<google.maps.Data> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then(m => {\n const data = new google.maps.Data(options);\n data.setMap(m);\n return data;\n });\n });\n }\n\n /**\n * Creates a TransitLayer instance for a map\n * @returns a new transit layer object\n */\n createTransitLayer(): Promise<google.maps.TransitLayer>{\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => {\n const newLayer: google.maps.TransitLayer = new google.maps.TransitLayer();\n newLayer.setMap(map);\n return newLayer;\n });\n });\n }\n\n /**\n * Creates a BicyclingLayer instance for a map\n * @returns a new bicycling layer object\n */\n createBicyclingLayer(): Promise<google.maps.BicyclingLayer>{\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => {\n const newLayer: google.maps.BicyclingLayer = new google.maps.BicyclingLayer();\n newLayer.setMap(map);\n return newLayer;\n });\n });\n }\n\n /**\n * Determines if given coordinates are insite a Polygon path.\n */\n containsLocation(latLng: google.maps.LatLng, polygon: google.maps.Polygon): Promise<boolean> {\n return this._map.then(() => google.maps.geometry.poly.containsLocation(latLng, polygon));\n }\n\n subscribeToMapEvent<N extends keyof google.maps.MapHandlerMap>(eventName: N)\n : Observable<google.maps.MapHandlerMap[N]> {\n return new Observable((observer) => {\n this._map.then(m =>\n m.addListener(eventName, () => this._zone.run(() => observer.next(arguments[0])))\n );\n });\n }\n\n clearInstanceListeners() {\n return this._zone.runOutsideAngular(() => {\n this._map.then((map: google.maps.Map) => {\n google.maps.event.clearInstanceListeners(map);\n });\n });\n }\n\n setCenter(latLng: google.maps.LatLngLiteral): Promise<void> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => map.setCenter(latLng));\n });\n }\n\n getZoom(): Promise<number> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => map.getZoom());\n });\n }\n\n getBounds(): Promise<google.maps.LatLngBounds> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => map.getBounds());\n });\n }\n\n getMapTypeId(): Promise<google.maps.MapTypeId> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => map.getMapTypeId());\n });\n }\n\n setZoom(zoom: number): Promise<void> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => map.setZoom(zoom));\n });\n }\n\n getCenter(): Promise<google.maps.LatLng> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map: google.maps.Map) => map.getCenter());\n });\n }\n\n panTo(latLng: google.maps.LatLng | google.maps.LatLngLiteral): Promise<void> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map) => map.panTo(latLng));\n });\n }\n\n panBy(x: number, y: number): Promise<void> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map) => map.panBy(x, y));\n });\n }\n\n fitBounds(latLng: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): Promise<void> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map) => map.fitBounds(latLng, padding));\n });\n }\n\n panToBounds(latLng: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): Promise<void> {\n return this._zone.runOutsideAngular(() => {\n return this._map.then((map) => map.panToBounds(latLng, padding));\n });\n }\n\n /**\n * Returns the native Google Maps Map instance. Be careful when using this instance directly.\n */\n getNativeMap(): Promise<google.maps.Map> { return this._map; }\n\n /**\n * Triggers the given event name on the map instance.\n */\n triggerMapEvent(eventName: string): Promise<void> {\n return this._map.then((m) => google.maps.event.trigger(m, eventName));\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\n\nimport { Observable, Observer } from 'rxjs';\n\nimport { AgmCircle } from '../../directives/circle';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\n\n@Injectable()\nexport class CircleManager {\n private _circles: Map<AgmCircle, Promise<google.maps.Circle>> =\n new Map<AgmCircle, Promise<google.maps.Circle>>();\n\n constructor(private _apiWrapper: GoogleMapsAPIWrapper, private _zone: NgZone) {}\n\n addCircle(circle: AgmCircle) {\n this._apiWrapper.getNativeMap().then( () =>\n this._circles.set(circle, this._apiWrapper.createCircle({\n center: {lat: circle.latitude, lng: circle.longitude},\n clickable: circle.clickable,\n draggable: circle.draggable,\n editable: circle.editable,\n fillColor: circle.fillColor,\n fillOpacity: circle.fillOpacity,\n radius: circle.radius,\n strokeColor: circle.strokeColor,\n strokeOpacity: circle.strokeOpacity,\n strokePosition: google.maps.StrokePosition[circle.strokePosition],\n strokeWeight: circle.strokeWeight,\n visible: circle.visible,\n zIndex: circle.zIndex,\n }))\n );\n }\n\n /**\n * Removes the given circle from the map.\n */\n removeCircle(circle: AgmCircle): Promise<void> {\n return this._circles.get(circle).then((c) => {\n c.setMap(null);\n this._circles.delete(circle);\n });\n }\n\n async setOptions(circle: AgmCircle, options: google.maps.CircleOptions) {\n return this._circles.get(circle).then((c) => {\n const actualParam = options.strokePosition as any as keyof typeof google.maps.StrokePosition;\n options.strokePosition = google.maps.StrokePosition[actualParam];\n c.setOptions(options);\n });\n }\n\n getBounds(circle: AgmCircle): Promise<google.maps.LatLngBounds> {\n return this._circles.get(circle).then((c) => c.getBounds());\n }\n\n getCenter(circle: AgmCircle): Promise<google.maps.LatLng> {\n return this._circles.get(circle).then((c) => c.getCenter());\n }\n\n getRadius(circle: AgmCircle): Promise<number> {\n return this._circles.get(circle).then((c) => c.getRadius());\n }\n\n setCenter(circle: AgmCircle): Promise<void> {\n return this._circles.get(circle).then(\n c => c.setCenter({lat: circle.latitude, lng: circle.longitude}));\n }\n\n setEditable(circle: AgmCircle): Promise<void> {\n return this._circles.get(circle).then(c => c.setEditable(circle.editable));\n }\n\n setDraggable(circle: AgmCircle): Promise<void> {\n return this._circles.get(circle).then(c => c.setDraggable(circle.draggable));\n }\n\n setVisible(circle: AgmCircle): Promise<void> {\n return this._circles.get(circle).then(c => c.setVisible(circle.visible));\n }\n\n setRadius(circle: AgmCircle): Promise<void> {\n return this._circles.get(circle).then(c => c.setRadius(circle.radius));\n }\n\n getNativeCircle(circle: AgmCircle): Promise<google.maps.Circle> {\n return this._circles.get(circle);\n }\n\n createEventObservable<T>(eventName: string, circle: AgmCircle): Observable<T> {\n return new Observable((observer: Observer<T>) => {\n let listener: google.maps.MapsEventListener = null;\n this._circles.get(circle).then((c) => {\n listener = c.addListener(eventName, (e: T) => this._zone.run(() => observer.next(e)));\n });\n\n return () => {\n if (listener !== null) {\n listener.remove();\n }\n };\n });\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { Observable, Observer } from 'rxjs';\n\nimport { AgmDataLayer } from './../../directives/data-layer';\nimport { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';\n\n/**\n * Manages all Data Layers for a Google Map instance.\n */\n@Injectable()\nexport class DataLayerManager {\n private _layers: Map<AgmDataLayer, Promise<google.maps.Data>> =\n new Map<AgmDataLayer, Promise<google.maps.Data>>();\n\n constructor(private _wrapper: GoogleMapsAPIWrapper, private _zone: NgZone) { }\n\n /**\n * Adds a new Data Layer to the map.\n */\n addDataLayer(layer: AgmDataLayer) {\n const newLayer = this._wrapper.createDataLayer({\n style: layer.style,\n } as google.maps.Data.DataOptions)\n .then(d => {\n if (layer.geoJson) {\n // NOTE: accessing \"features\" on google.maps.Data is undocumented\n this.getDataFeatures(d, layer.geoJson).then(features => (d as any).features = features);\n }\n return d;\n });\n this._layers.set(layer, newLayer);\n }\n\n deleteDataLayer(layer: AgmDataLayer) {\n this._layers.get(layer).then(l => {\n l.setMap(null);\n this._layers.delete(layer);\n });\n }\n\n updateGeoJson(layer: AgmDataLayer, geoJson: object | string) {\n this._layers.get(layer).then(l => {\n l.forEach(feature => {\n l.remove(feature);\n\n // NOTE: accessing \"features\" on google.maps.Data is undocumented\n const index = (l as any).features.indexOf(feature, 0);\n if (index > -1) {\n (l as any).features.splice(index, 1);\n }\n });\n this.getDataFeatures(l, geoJson).then(features => (l as any).features = features);\n });\n }\n\n setDataOptions(layer: AgmDataLayer, options: google.maps.Data.DataOptions)\n {\n this._layers.get(layer).then(l => {\n l.setControlPosition(options.controlPosition);\n l.setControls(options.controls);\n l.setDrawingMode(options.drawingMode);\n l.setStyle(options.style);\n });\n }\n\n /**\n * Creates a Google Maps event listener for the given DataLayer as an Observable\n */\n createEventObservable<T>(eventName: string, layer: AgmDataLayer): Observable<T> {\n return new Observable((observer: Observer<T>) => {\n this._layers.get(layer).then((d: google.maps.Data) => {\n d.addListener(eventName, (e: T) => this._zone.run(() => observer.next(e)));\n });\n });\n }\n\n /**\n * Extract features from a geoJson using google.maps Data Class\n * @param d : google.maps.Data class instance\n * @param geoJson : url or geojson object\n */\n getDataFeatures(d: google.maps.Data, geoJson: object | string): Promise<google.maps.Data.Feature[]> {\n return new Promise<google.maps.Data.Feature[]>((resolve, reject) => {\n if (typeof geoJson === 'object') {\n try {\n const features = d.addGeoJson(geoJson);\n resolve(features);\n } catch (e) {\n reject(e);\n }\n } else if (typeof geoJson === 'string') {\n d.loadGeoJson(geoJson, null, resolve);\n } else {\n reject(`Impossible to extract features from geoJson: wrong argument type`);\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, from, Observable, timer } from 'rxjs';\nimport {\n flatMap,\n map,\n sample,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport { MapsAPILoader } from './maps-api-loader/maps-api-loader';\n\nexport interface FitBoundsDetails {\n latLng: google.maps.LatLng | google.maps.LatLngLiteral;\n}\n\n/**\n * @internal\n */\nexport type BoundsMap = Map<string, google.maps.LatLng | google.maps.LatLngLiteral>;\n\n/**\n * Class to implement when you what to be able to make it work with the auto fit bounds feature\n * of AGM.\n */\nexport abstract class FitBoundsAccessor {\n abstract getFitBoundsDetails$(): Observable<FitBoundsDetails>;\n}\n\n/**\n * The FitBoundsService is responsible for computing the bounds of the a single map.\n */\n@Injectable()\nexport class FitBoundsService {\n protected readonly bounds$: Observable<google.maps.LatLngBounds>;\n protected readonly _boundsChangeSampleTime$ = new BehaviorSubject<number>(200);\n protected readonly _includeInBounds$ = new BehaviorSubject<BoundsMap>(new Map<string, google.maps.LatLng | google.maps.LatLngLiteral>());\n\n constructor(loader: MapsAPILoader) {\n this.bounds$ = from(loader.load()).pipe(\n flatMap(() => this._includeInBounds$),\n sample(\n this._boundsChangeSampleTime$.pipe(switchMap(time => timer(0, time))),\n ),\n map(includeInBounds => this._generateBounds(includeInBounds)),\n shareReplay(1),\n );\n }\n\n private _generateBounds(\n includeInBounds: Map<string, google.maps.LatLng | google.maps.LatLngLiteral>\n ) {\n const bounds = new google.maps.LatLngBounds();\n includeInBounds.forEach(b => bounds.extend(b));\n return bounds;\n }\n\n addToBounds(latLng: google.maps.LatLng | google.maps.LatLngLiteral) {\n const id = this._createIdentifier(latLng);\n if (this._includeInBounds$.value.has(id)) {\n return;\n }\n const boundsMap = this._includeInBounds$.value;\n boundsMap.set(id, latLng);\n this._includeInBounds$.next(boundsMap);\n }\n\n removeFromBounds(latLng: google.maps.LatLng | google.maps.LatLngLiteral) {\n const boundsMap = this._includeInBounds$.value;\n boundsMap.delete(this._createIdentifier(latLng));\n this._includeInBounds$.next(boundsMap);\n }\n\n changeFitBoundsChangeSampleTime(timeMs: number) {\n this._boundsChangeSampleTime$.next(timeMs);\n }\n\n getBounds$(): Observable<google.maps.LatLngBounds> {\n return this.bounds$;\n }\n\n protected _createIdentifier(latLng: google.maps.LatLng | google.maps.LatLngLiteral): string {\n return `${latLng.lat}+${latLng.lng}`;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { bindCallback, ConnectableObservable, Observable, of, ReplaySubject, throwError } from 'rxjs';\nimport { map, multicast, switchMap } from 'rxjs/operators';\nimport { MapsAPILoader } from './maps-api-loader/maps-api-loader';\n\n@Injectable({ providedIn: 'root' })\nexport class AgmGeocoder {\n protected readonly geocoder$: Observable<google.maps.Geocoder>;\n\n constructor(loader: MapsAPILoader) {\n const connectableGeocoder$ = new Observable(subscriber => {\n loader.load().then(() => subscriber.next());\n })\n .pipe(\n map(() => this._createGeocoder()),\n multicast(new ReplaySubject(1)),\n ) as ConnectableObservable<google.maps.Geocoder>;\n\n connectableGeocoder$.connect(); // ignore the subscription\n // since we will remain subscribed till application exits\n\n this.geocoder$ = connectableGeocoder$;\n }\n\n geocode(request: google.maps.GeocoderRequest): Observable<google.maps.GeocoderResult[]> {\n return this.geocoder$.pipe(\n switchMap((geocoder) => this._getGoogleResults(geocoder, request))\n );\n }\n\n private _getGoogleResults(geocoder: google.maps.Geocoder, request: google.maps.GeocoderRequest):\n Observable<google.maps.GeocoderResult[]> {\n const geocodeObservable = bindCallback(geocoder.geocode);\n return geocodeObservable(request).pipe(\n switchMap(([results, status]) => {\n if (status === google.maps.GeocoderStatus.OK) {\n return of(results);\n }\n\n return throwError(status);\n })\n );\n }\n\n private _createGeocoder() {\n return new google.maps.Geocoder();\n }\n}\n","import { Inject, Injectable, InjectionToken, LOCALE_ID, Optional } from '@angular/core';\n\nimport { DocumentRef, WindowRef } from '../../utils/browser-globals';\n\nimport { MapsAPILoader } from './maps-api-loader';\n\nexport enum GoogleMapsScriptProtocol {\n HTTP = 1,\n HTTPS = 2,\n AUTO = 3,\n}\n\n/**\n * Token for the config of the LazyMapsAPILoader. Please provide an object of type {@link\n * LazyMapsAPILoaderConfig}.\n */\nexport const LAZY_MAPS_API_CONFIG = new InjectionToken<LazyMapsAPILoaderConfigLiteral>('angular-google-maps LAZY_MAPS_API_CONFIG');\n\n/**\n * Configuration for the {@link LazyMapsAPILoader}.\n */\nexport interface LazyMapsAPILoaderConfigLiteral {\n /**\n * The Google Maps API Key (see:\n * https://developers.google.com/maps/documentation/javascript/get-api-key)\n */\n apiKey?: string;\n\n /**\n * The Google Maps client ID (for premium plans).\n * When you have a Google Maps APIs Premium Plan license, you must authenticate\n * your application with either an API key or a client ID.\n * The Google Maps API will fail to load if both a client ID and an API key are included.\n */\n clientId?: string;\n\n /**\n * The Google Maps channel name (for premium plans).\n * A channel parameter is an optional parameter that allows you to track usage under your client\n * ID by assigning a distinct channel to each of your applications.\n */\n channel?: string;\n\n /**\n * Google Maps API version.\n */\n apiVersion?: string;\n\n /**\n * Host and Path used for the `<script>` tag.\n */\n hostAndPath?: string;\n\n /**\n * Protocol used for the `<script>` tag.\n */\n protocol?: GoogleMapsScriptProtocol;\n\n /**\n * Defines which Google Maps libraries should get loaded.\n */\n libraries?: string[];\n\n /**\n * The default bias for the map behavior is US.\n * If you wish to alter your application to serve different map tiles or bias the\n * application, you can overwrite the default behavior (US) by defining a `region`.\n * See https://developers.google.com/maps/documentation/javascript/basics#Region\n */\n region?: string;\n\n /**\n * The Google Maps API uses the browser's preferred language when displaying\n * textual information. If you wish to overwrite this behavior and force the API\n * to use a given language, you can use this setting.\n * See https://developers.google.com/maps/documentation/javascript/basics#Language\n */\n language?: string;\n}\n\n@Injectable()\nexport class LazyMapsAPILoader extends MapsAPILoader {\n protected _scriptLoadingPromise: Promise<void>;\n protected _config: LazyMapsAPILoaderConfigLiteral;\n protected _windowRef: WindowRef;\n protected _documentRef: DocumentRef;\n protected readonly _SCRIPT_ID: string = 'agmGoogleMapsApiScript';\n protected readonly callbackName: string = `agmLazyMapsAPILoader`;\n\n constructor(@Optional() @Inject(LAZY_MAPS_API_CONFIG) config: any = null, w: WindowRef, d: DocumentRef,\n @Inject(LOCALE_ID) private localeId: string) {\n super();\n this._config = config || {};\n this._windowRef = w;\n this._documentRef = d;\n }\n\n load(): Promise<void> {\n const window = this._windowRef.getNativeWindow() as any;\n if (window.google && window.google.maps) {\n // Google maps already loaded on the page.\n return Promise.resolve();\n }\n\n if (this._scriptLoadingPromise) {\n return this._scriptLoadingPromise;\n }\n\n // this can happen in HMR situations or Stackblitz.io editors.\n const scriptOnPage = this._documentRef.getNativeDocument().getElementById(this._SCRIPT_ID);\n if (scriptOnPage) {\n this._assignScriptLoadingPromise(scriptOnPage);\n return this._scriptLoadingPromise;\n }\n\n const script = this._documentRef.getNativeDocument().createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.id = this._SCRIPT_ID;\n script.src = this._getScriptSrc(this.callbackName);\n this._assignScriptLoadingPromise(script);\n this._documentRef.getNativeDocument().body.appendChild(script);\n return this._scriptLoadingPromise;\n }\n\n private _assignScriptLoadingPromise(scriptElem: HTMLElement) {\n this._scriptLoadingPromise = new Promise((resolve, reject) => {\n this._windowRef.getNativeWindow()[this.callbackName] = () => {\n resolve();\n };\n\n scriptElem.onerror = (error: Event) => {\n reject(error);\n };\n });\n }\n\n protected _getScriptSrc(callbackName: string): string {\n const protocolType: GoogleMapsScriptProtocol =\n (this._config && this._config.protocol) || GoogleMapsScriptProtocol.HTTPS;\n let protocol: string;\n\n switch (protocolType) {\n case GoogleMapsScriptProtocol.AUTO:\n protocol = '';\n break;\n case GoogleMapsScriptProtocol.HTTP:\n protocol = 'http:';\n break;\n case GoogleMapsScriptProtocol.HTTPS:\n protocol = 'https:';\n break;\n }\n\n const hostAndPath: string = this._config.hostAndPath || 'maps.googleapis.com/maps/api/js';\n const queryParams: {[key: string]: string | string[]} = {\n v: this._config.apiVersion || 'quarterly',\n callback: callbackName,\n key: this._config.apiKey,\n client: this._config.clientId,\n channel: this._config.channel,\n libraries: this._config.libraries,\n region: this._config.region,\n language: this._config.language || (this.localeId !== 'en-US' ? this.localeId : null),\n };\n const params: string = Object.keys(queryParams)\n .filter((k: string) => queryParams[k] != null)\n .filter((k: string) => {\n // remove empty arrays\n return !Array.isArray(queryParams[k]) ||\n (Array.isArray(queryParams[k]) && queryParams[k].length > 0);\n })\n .map((k: string) => {\n // join arrays as comma seperated strings\n const i = queryParams[k];\n if (Array.isArray(i)) {\n return {key: k, value: i.join(',')};\n }\n return {key: k, value: queryParams[k]};\n })\n .map((entry: {key: string, value: string}) => {\n return `${entry.key}=${entry.value}`;\n })\n .join('&');\n return `${protocol}//${hostAndPath}?${params}`;\n }\n}\n","import { Provider } from '@angular/core';\n\nexport class WindowRef {\n getNativeWindow(): any { return window; }\n}\n\nexport class DocumentRef {\n getNativeDocument(): any { return document; }\n}\n\nexport const BROWSER_GLOBALS_PROVIDERS: Provider[] = [WindowRef, DocumentRef];\n","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { AgmMarker } from './../../directives/marker';\n\nimport { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';\n\n@Injectable()\nexport class MarkerManager {\n protected _markers: Map<AgmMarker, Promise<google.maps.Marker>> =\n new Map<AgmMarker, Promise<google.maps.Marker>>();\n\n constructor(protected _mapsWrapper: GoogleMapsAPIWrapper, protected _zone: NgZone) {}\n\n async convertAnimation(uiAnim: keyof typeof google.maps.Animation | null) {\n if (uiAnim === null) {\n return null;\n } else {\n return this._mapsWrapper.getNativeMap().then(() => google.maps.Animation[uiAnim]);\n }\n }\n\n deleteMarker(markerDirective: AgmMarker): Promise<void> {\n const markerPromise = this._markers.get(markerDirective);\n if (markerPromise == null) {\n // marker already deleted\n return Promise.resolve();\n }\n return markerPromise.then((marker: google.maps.Marker) => {\n return this._zone.run(() => {\n marker.setMap(null);\n this._markers.delete(markerDirective);\n });\n });\n }\n\n updateMarkerPosition(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then(\n (m: google.maps.Marker) => m.setPosition({lat: marker.latitude, lng: marker.longitude}));\n }\n\n updateTitle(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => m.setTitle(marker.title));\n }\n\n updateLabel(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => { m.setLabel(marker.label); });\n }\n\n updateDraggable(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => m.setDraggable(marker.draggable));\n }\n\n updateIcon(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => m.setIcon(marker.iconUrl));\n }\n\n updateOpacity(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => m.setOpacity(marker.opacity));\n }\n\n updateVisible(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => m.setVisible(marker.visible));\n }\n\n updateZIndex(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => m.setZIndex(marker.zIndex));\n }\n\n updateClickable(marker: AgmMarker): Promise<void> {\n return this._markers.get(marker).then((m: google.maps.Marker) => m.setClickable(marker.clickable));\n }\n\n async updateAnimation(marker: AgmMarker) {\n const m = await this._markers.get(marker);\n m.setAnimation(await this.convertAnimation(marker.animation));\n }\n\n addMarker(marker: AgmMarker) {\n const markerPromise = new Promise<google.maps.Marker>(async (resolve) =>\n this._mapsWrapper.createMarker({\n position: {lat: marker.latitude, lng: marker.longitude},\n label: marker.label,\n draggable: marker.draggable,\n icon: marker.iconUrl,\n opacity: marker.opacity,\n visible: marker.visible,\n zIndex: marker.zIndex,\n title: marker.title,\n clickable: marker.clickable,\n animation: await this.convertAnimation(marker.animation),\n }).then(resolve));\n this._markers.set(marker, markerPromise);\n }\n\n getNativeMarker(marker: AgmMarker): Promise<google.maps.Marker> {\n return this._markers.get(marker);\n }\n\n createEventObservable<T extends (google.maps.MouseEvent | void)>(\n eventName: google.maps.MarkerMouseEventNames | google.maps.MarkerChangeOptionEventNames,\n marker: AgmMarker): Observable<T> {\n return new Observable(observer => {\n this._markers.get(marker).then(m =>\n m.addListener(eventName, e => this._zone.run(() => observer.next(e)))\n );\n });\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { Observable, Observer } from 'rxjs';\n\nimport { AgmInfoWindow } from '../../directives/info-window';\n\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\nimport { MarkerManager } from './marker-manager';\n\n@Injectable()\nexport class InfoWindowManager {\n private _infoWindows: Map<AgmInfoWindow, Promise<google.maps.InfoWindow>> =\n new Map<AgmInfoWindow, Promise<google.maps.InfoWindow>>();\n\n constructor(\n private _mapsWrapper: GoogleMapsAPIWrapper, private _zone: NgZone,\n private _markerManager: MarkerManager) {}\n\n deleteInfoWindow(infoWindow: AgmInfoWindow): Promise<void> {\n const iWindow = this._infoWindows.get(infoWindow);\n if (iWindow == null) {\n // info window already deleted\n return Promise.resolve();\n }\n return iWindow.then((i: google.maps.InfoWindow) => {\n return this._zone.run(() => {\n i.close();\n this._infoWindows.delete(infoWindow);\n });\n });\n }\n\n setPosition(infoWindow: AgmInfoWindow): Promise<void> {\n return this._infoWindows.get(infoWindow).then((i: google.maps.InfoWindow) => i.setPosition({\n lat: infoWindow.latitude,\n lng: infoWindow.longitude,\n }));\n }\n\n setZIndex(infoWindow: AgmInfoWindow): Promise<void> {\n return this._infoWindows.get(infoWindow)\n .then((i: google.maps.InfoWindow) => i.setZIndex(infoWindow.zIndex));\n }\n\n open(infoWindow: AgmInfoWindow): Promise<void> {\n return this._infoWindows.get(infoWindow).then((w) => {\n if (infoWindow.hostMarker != null) {\n return this._markerManager.getNativeMarker(infoWindow.hostMarker).then((marker) => {\n return this._mapsWrapper.getNativeMap().then((map) => w.open(map, marker));\n });\n }\n return this._mapsWrapper.getNativeMap().then((map) => w.open(map));\n });\n }\n\n close(infoWindow: AgmInfoWindow): Promise<void> {\n return this._infoWindows.get(infoWindow).then((w) => w.close());\n }\n\n setOptions(infoWindow: AgmInfoWindow, options: google.maps.InfoWindowOptions) {\n return this._infoWindows.get(infoWindow).then((i: google.maps.InfoWindow) => i.setOptions(options));\n }\n\n addInfoWindow(infoWindow: AgmInfoWindow) {\n const options: google.maps.InfoWindowOptions = {\n content: infoWindow.content,\n maxWidth: infoWindow.maxWidth,\n zIndex: infoWindow.zIndex,\n disableAutoPan: infoWindow.disableAutoPan,\n };\n if (typeof infoWindow.latitude === 'number' && typeof infoWindow.longitude === 'number') {\n options.position = {lat: infoWindow.latitude, lng: infoWindow.longitude};\n }\n const infoWindowPromise = this._mapsWrapper.createInfoWindow(options);\n this._infoWindows.set(infoWindow, infoWindowPromise);\n }\n\n /**\n * Creates a Google Maps event listener for the given InfoWindow as an Observable\n */\n createEventObservable<T>(eventName: string, infoWindow: AgmInfoWindow): Observable<T> {\n return new Observable((observer: Observer<T>) => {\n this._infoWindows.get(infoWindow).then((i: google.maps.InfoWindow) => {\n i.addListener(eventName, (e: T) => this._zone.run(() => observer.next(e)));\n });\n });\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { Observable, Observer } from 'rxjs';\n\nimport { AgmKmlLayer } from './../../directives/kml-layer';\nimport { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';\n\n/**\n * Manages all KML Layers for a Google Map instance.\n */\n@Injectable()\nexport class KmlLayerManager {\n private _layers: Map<AgmKmlLayer, Promise<google.maps.KmlLayer>> =\n new Map<AgmKmlLayer, Promise<google.maps.KmlLayer>>();\n\n constructor(private _wrapper: GoogleMapsAPIWrapper, private _zone: NgZone) {}\n\n /**\n * Adds a new KML Layer to the map.\n */\n addKmlLayer(layer: AgmKmlLayer) {\n const newLayer = this._wrapper.getNativeMap().then(m => {\n return new google.maps.KmlLayer({\n clickable: layer.clickable,\n map: m,\n preserveViewport: layer.preserveViewport,\n screenOverlays: layer.screenOverlays,\n suppressInfoWindows: layer.suppressInfoWindows,\n url: layer.url,\n zIndex: layer.zIndex,\n });\n });\n this._layers.set(layer, newLayer);\n }\n\n setOptions(layer: AgmKmlLayer, options: google.maps.KmlLayerOptions) {\n this._layers.get(layer).then(l => l.setOptions(options));\n }\n\n deleteKmlLayer(layer: AgmKmlLayer) {\n this._layers.get(layer).then(l => {\n l.setMap(null);\n this._layers.delete(layer);\n });\n }\n\n /**\n * Creates a Google Maps event listener for the given KmlLayer as an Observable\n */\n createEventObservable<T>(eventName: string, layer: AgmKmlLayer): Observable<T> {\n return new Observable((observer: Observer<T>) => {\n this._layers.get(layer).then((m: google.maps.KmlLayer) => {\n m.addListener(eventName, (e: T) => this._zone.run(() => observer.next(e)));\n });\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AgmBicyclingLayer } from '../../directives/bicycling-layer';\nimport { AgmTransitLayer } from '../../directives/transit-layer';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\n\n/**\n * This class manages Transit and Bicycling Layers for a Google Map instance.\n */\n\n@Injectable()\nexport class LayerManager {\n private _layers: Map<AgmTransitLayer | AgmBicyclingLayer, Promise<google.maps.TransitLayer | google.maps.BicyclingLayer>> =\n new Map<AgmTransitLayer | AgmBicyclingLayer, Promise<google.maps.TransitLayer | google.maps.BicyclingLayer>>();\n\n constructor(private _wrapper: GoogleMapsAPIWrapper) {}\n\n /**\n * Adds a transit layer to a map instance.\n * @param layer - a TransitLayer object\n * @param _options - TransitLayerOptions options\n * @returns void\n */\n addTransitLayer(layer: AgmTransitLayer): void {\n const newLayer = this._wrapper.createTransitLayer();\n this._layers.set(layer, newLayer);\n }\n\n /**\n * Adds a bicycling layer to a map instance.\n * @param layer - a bicycling layer object\n * @param _options - BicyclingLayer options\n * @returns void\n */\n addBicyclingLayer(layer: AgmBicyclingLayer): void {\n const newLayer = this._wrapper.createBicyclingLayer();\n this._layers.set(layer, newLayer);\n }\n\n /**\n * Deletes a map layer\n * @param layer - the layer to delete\n */\n deleteLayer(layer: AgmTransitLayer | AgmBicyclingLayer): Promise<void> {\n return this._layers.get(layer).then(currentLayer => {\n currentLayer.setMap(null);\n this._layers.delete(layer);\n });\n }\n}\n","import { MapsAPILoader } from './maps-api-loader';\n\n/**\n * When using the NoOpMapsAPILoader, the Google Maps API must be added to the page via a `<script>`\n * Tag.\n * It's important that the Google Maps API script gets loaded first on the page.\n */\nexport class NoOpMapsAPILoader implements MapsAPILoader {\n load(): Promise<void> {\n if (!(window as any).google || !(window as any).google.maps) {\n throw new Error(\n 'Google Maps API not loaded on page. Make sure window.google.maps is available!');\n }\n return Promise.resolve();\n }\n}\n","import { fromEventPattern, Observable } from 'rxjs';\n\nexport function createMVCEventObservable<T>(array: google.maps.MVCArray<T>): Observable<MVCEvent<T>>{\n const eventNames = ['insert_at', 'remove_at', 'set_at'];\n return fromEventPattern(\n handler => eventNames.map(eventName => array.addListener(eventName,\n (index: number, previous?: T) => handler.apply(array, [ {newArr: array.getArray(), eventName, index, previous} as MVCEvent<T>]))),\n (_handler, evListeners: google.maps.MapsEventListener[]) => evListeners.forEach(evListener => evListener.remove()));\n}\n\nexport type MvcEventType = 'insert_at' | 'remove_at' | 'set_at';\n\nexport interface MVCEvent<T> {\n newArr: T[];\n eventName: MvcEventType;\n index: number;\n previous?: T;\n}\n\nexport class MvcArrayMock<T> implements google.maps.MVCArray<T> {\n private vals: T[] = [];\n private listeners: {\n 'remove_at': ((i: number, r: T) => void)[];\n 'insert_at': ((i: number) => void)[];\n 'set_at': ((i: number, val: T) => void)[];\n } = {\n remove_at: [],\n insert_at: [],\n set_at: [],\n };\n clear(): void {\n for (let i = this.vals.length - 1; i >= 0; i--) {\n this.removeAt(i);\n }\n }\n getArray(): T[] {\n return [...this.vals];\n }\n getAt(i: number): T {\n return this.vals[i];\n }\n getLength(): number {\n return this.vals.length;\n }\n insertAt(i: number, elem: T): void {\n this.vals.splice(i, 0, elem);\n this.listeners.insert_at.forEach(listener => listener(i));\n }\n pop(): T {\n const deleted = this.vals.pop();\n this.listeners.remove_at.forEach(listener => listener(this.vals.length, deleted));\n return deleted;\n }\n push(elem: T): number {\n this.vals.push(elem);\n this.listeners.insert_at.forEach(listener => listener(this.vals.length - 1));\n return this.vals.length;\n }\n removeAt(i: number): T {\n const deleted = this.vals.splice(i, 1)[0];\n this.listeners.remove_at.forEach(listener => listener(i, deleted));\n return deleted;\n }\n setAt(i: number, elem: T): void {\n const deleted = this.vals[i];\n this.vals[i] = elem;\n this.listeners.set_at.forEach(listener => listener(i, deleted));\n }\n forEach(callback: (elem: T, i: number) => void): void {\n this.vals.forEach(callback);\n }\n addListener(eventName: 'remove_at' | 'insert_at' | 'set_at', handler: (...args: any[]) => void): google.maps.MapsEventListener {\n const listenerArr = this.listeners[eventName];\n listenerArr.push(handler);\n return {\n remove: () => {\n listenerArr.splice(listenerArr.indexOf(handler), 1);\n },\n };\n }\n\n bindTo(): never { throw new Error('Not implemented'); }\n changed(): never { throw new Error('Not implemented'); }\n get(): never { throw new Error('Not implemented'); }\n notify(): never { throw new Error('Not implemented'); }\n set(): never { throw new Error('Not implemented'); }\n setValues(): never { throw new Error('Not implemented'); }\n unbind(): never { throw new Error('Not implemented'); }\n unbindAll(): never { throw new Error('Not implemented'); }\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { merge, Observable, Observer } from 'rxjs';\nimport { map, skip, startWith, switchMap } from 'rxjs/operators';\n\nimport { AgmPolygon } from '../../directives/polygon';\nimport { createMVCEventObservable, MVCEvent } from '../../utils/mvcarray-utils';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\n\n@Injectable()\nexport class PolygonManager {\n private _polygons: Map<AgmPolygon, Promise<google.maps.Polygon>> =\n new Map<AgmPolygon, Promise<google.maps.Polygon>>();\n\n constructor(private _mapsWrapper: GoogleMapsAPIWrapper, private _zone: NgZone) { }\n\n addPolygon(path: AgmPolygon) {\n const polygonPromise = this._mapsWrapper.createPolygon({\n clickable: path.clickable,\n draggable: path.draggable,\n editable: path.editable,\n fillColor: path.fillColor,\n fillOpacity: path.fillOpacity,\n geodesic: path.geodesic,\n paths: path.paths,\n strokeColor: path.strokeColor,\n strokeOpacity: path.strokeOpacity,\n strokeWeight: path.strokeWeight,\n visible: path.visible,\n zIndex: path.zIndex,\n });\n this._polygons.set(path, polygonPromise);\n }\n\n updatePolygon(polygon: AgmPolygon): Promise<void> {\n const m = this._polygons.get(polygon);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then((l: google.maps.Polygon) => this._zone.run(() => { l.setPaths(polygon.paths); }));\n }\n\n setPolygonOptions(path: AgmPolygon, options: { [propName: string]: any }): Promise<void> {\n return this._polygons.get(path).then((l: google.maps.Polygon) => { l.setOptions(options); });\n }\n\n deletePolygon(paths: AgmPolygon): Promise<void> {\n const m = this._polygons.get(paths);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then((l: google.maps.Polygon) => {\n return this._zone.run(() => {\n l.setMap(null);\n this._polygons.delete(paths);\n });\n });\n }\n\n getPath(polygonDirective: AgmPolygon): Promise<google.maps.LatLng[]> {\n return this._polygons.get(polygonDirective)\n .then((polygon) => polygon.getPath().getArray());\n }\n\n getPaths(polygonDirective: AgmPolygon): Promise<google.maps.LatLng[][]> {\n return this._polygons.get(polygonDirective)\n .then((polygon) => polygon.getPaths().getArray().map((p) => p.getArray()));\n }\n\n createEventObservable<T>(eventName: string, path: AgmPolygon): Observable<T> {\n return new Observable((observer: Observer<T>) => {\n this._polygons.get(path).then((l: google.maps.Polygon) => {\n l.addListener(eventName, (e: T) => this._zone.run(() => observer.next(e)));\n });\n });\n }\n\n async createPathEventObservable(agmPolygon: AgmPolygon):\n Promise<Observable<MVCEvent<google.maps.LatLng[] | google.maps.LatLngLiteral[]>>> {\n const polygon = await this._polygons.get(agmPolygon);\n const paths = polygon.getPaths();\n const pathsChanges$ = createMVCEventObservable(paths);\n return pathsChanges$.pipe(\n startWith(({ newArr: paths.getArray() } as MVCEvent<google.maps.MVCArray<google.maps.LatLng>>)), // in order to subscribe to them all\n switchMap(parentMVEvent => merge(...// rest parameter\n parentMVEvent.newArr.map((chMVC, index) =>\n createMVCEventObservable(chMVC)\n .pipe(map(chMVCEvent => ({ parentMVEvent, chMVCEvent, pathIndex: index })))))\n .pipe( // start the merged ob with an event signinifing change to parent\n startWith({ parentMVEvent, chMVCEvent: null, pathIndex: null }))\n ),\n skip(1), // skip the manually added event\n map(({ parentMVEvent, chMVCEvent, pathIndex }) => {\n let retVal;\n if (!chMVCEvent) {\n retVal = {\n newArr: parentMVEvent.newArr.map(subArr => subArr.getArray().map(latLng => latLng.toJSON())),\n eventName: parentMVEvent.eventName,\n index: parentMVEvent.index,\n } as MVCEvent<google.maps.LatLng[] | google.maps.LatLngLiteral[]>;\n if (parentMVEvent.previous) {\n retVal.previous = parentMVEvent.previous.getArray();\n }\n } else {\n retVal = {\n newArr: parentMVEvent.newArr.map(subArr => subArr.getArray().map(latLng => latLng.toJSON())),\n pathIndex,\n eventName: chMVCEvent.eventName,\n index: chMVCEvent.index,\n } as unknown as MVCEvent<google.maps.LatLng[] | google.maps.LatLngLiteral[]>;\n if (chMVCEvent.previous) {\n retVal.previous = chMVCEvent.previous;\n }\n }\n return retVal;\n }));\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { Observable, Observer } from 'rxjs';\n\nimport { AgmPolyline } from '../../directives/polyline';\nimport { AgmPolylinePoint } from '../../directives/polyline-point';\nimport { createMVCEventObservable, MVCEvent } from '../../utils/mvcarray-utils';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\n\n@Injectable()\nexport class PolylineManager {\n private _polylines: Map<AgmPolyline, Promise<google.maps.Polyline>> =\n new Map<AgmPolyline, Promise<google.maps.Polyline>>();\n\n constructor(private _mapsWrapper: GoogleMapsAPIWrapper, private _zone: NgZone) {}\n\n private static _convertPoints(line: AgmPolyline): google.maps.LatLngLiteral[] {\n const path = line._getPoints().map((point: AgmPolylinePoint) => {\n return {lat: point.latitude, lng: point.longitude} as google.maps.LatLngLiteral;\n });\n return path;\n }\n\n private static _convertPath(path: keyof typeof google.maps.SymbolPath | string): google.maps.SymbolPath | string {\n const symbolPath = google.maps.SymbolPath[path as keyof typeof google.maps.SymbolPath];\n if (typeof symbolPath === 'number') {\n return symbolPath;\n } else{\n return path;\n }\n }\n\n private static _convertIcons(line: AgmPolyline): Array<google.maps.IconSequence> {\n const icons = line._getIcons().map(agmIcon => ({\n fixedRotation: agmIcon.fixedRotation,\n offset: agmIcon.offset,\n repeat: agmIcon.repeat,\n icon: {\n anchor: new google.maps.Point(agmIcon.anchorX, agmIcon.anchorY),\n fillColor: agmIcon.fillColor,\n fillOpacity: agmIcon.fillOpacity,\n path: PolylineManager._convertPath(agmIcon.path),\n rotation: agmIcon.rotation,\n scale: agmIcon.scale,\n strokeColor: agmIcon.strokeColor,\n strokeOpacity: agmIcon.strokeOpacity,\n strokeWeight: agmIcon.strokeWeight,\n },\n } as google.maps.IconSequence));\n // prune undefineds;\n icons.forEach(icon => {\n Object.entries(icon).forEach(([key, val]) => {\n if (typeof val === 'undefined') {\n delete (icon as any)[key];\n }\n });\n if (typeof icon.icon.anchor.x === 'undefined' ||\n typeof icon.icon.anchor.y === 'undefined') {\n delete icon.icon.anchor;\n }\n });\n return icons;\n }\n\n addPolyline(line: AgmPolyline) {\n const polylinePromise = this._mapsWrapper.getNativeMap()\n .then(() => [ PolylineManager._convertPoints(line),\n PolylineManager._convertIcons(line)])\n .then(([path, icons]: [google.maps.LatLngLiteral[], google.maps.IconSequence[]]) =>\n this._mapsWrapper.createPolyline({\n clickable: line.clickable,\n draggable: line.draggable,\n editable: line.editable,\n geodesic: line.geodesic,\n strokeColor: line.strokeColor,\n strokeOpacity: line.strokeOpacity,\n strokeWeight: line.strokeWeight,\n visible: line.visible,\n zIndex: line.zIndex,\n path,\n icons,\n }));\n this._polylines.set(line, polylinePromise);\n }\n\n updatePolylinePoints(line: AgmPolyline): Promise<void> {\n const path = PolylineManager._convertPoints(line);\n const m = this._polylines.get(line);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then((l) => this._zone.run(() => l.setPath(path)));\n }\n\n async updateIconSequences(line: AgmPolyline): Promise<void> {\n await this._mapsWrapper.getNativeMap();\n const icons = PolylineManager._convertIcons(line);\n const m = this._polylines.get(line);\n if (m == null) {\n return;\n }\n return m.then(l => this._zone.run(() => l.setOptions({icons}) ) );\n }\n\n setPolylineOptions(line: AgmPolyline, options: {[propName: string]: any}):\n Promise<void> {\n return this._polylines.get(line).then((l: google.maps.Polyline) => { l.setOptions(options); });\n }\n\n deletePolyline(line: AgmPolyline): Promise<void> {\n const m = this._polylines.get(line);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then((l: google.maps.Polyline) => {\n return this._zone.run(() => {\n l.setMap(null);\n this._polylines.delete(line);\n });\n });\n }\n\n private async getMVCPath(agmPolyline: AgmPolyline): Promise<google.maps.MVCArray<google.maps.LatLng>> {\n const polyline = await this._polylines.get(agmPolyline);\n return polyline.getPath();\n }\n\n async getPath(agmPolyline: AgmPolyline): Promise<google.maps.LatLng[]> {\n return (await this.getMVCPath(agmPolyline)).getArray();\n }\n\n createEventObservable<T>(eventName: string, line: AgmPolyline): Observable<T> {\n return new Observable((observer: Observer<T>) => {\n this._polylines.get(line).then((l: google.maps.Polyline) => {\n l.addListener(eventName, (e: T) => this._zone.run(() => observer.next(e)));\n });\n });\n }\n\n async createPathEventObservable(line: AgmPolyline): Promise<Observable<MVCEvent<google.maps.LatLng>>> {\n const mvcPath = await this.getMVCPath(line);\n return createMVCEventObservable(mvcPath);\n }\n}\n","import { Injectable, NgZone } from '@angular/core';\n\nimport { Observable, Subscriber } from 'rxjs';\n\nimport { AgmRectangle } from '../../directives/rectangle';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\n\n@Injectable()\nexport class RectangleManager {\n private _rectangles: Map<AgmRectangle, Promise<google.maps.Rectangle>> =\n new Map<AgmRectangle, Promise<google.maps.Rectangle>>();\n\n constructor(private _apiWrapper: GoogleMapsAPIWrapper, private _zone: NgZone) {}\n\n addRectangle(rectangle: AgmRectangle) {\n this._apiWrapper.getNativeMap().then(() =>\n this._rectangles.set(rectangle, this._apiWrapper.createRectangle({\n bounds: {\n north: rectangle.north,\n east: rectangle.east,\n south: rectangle.south,\n west: rectangle.west,\n },\n clickable: rectangle.clickable,\n draggable: rectangle.draggable,\n editable: rectangle.editable,\n fillColor: rectangle.fillColor,\n fillOpacity: rectangle.fillOpacity,\n strokeColor: rectangle.strokeColor,\n strokeOpacity: rectangle.strokeOpacity,\n strokePosition: google.maps.StrokePosition[rectangle.strokePosition],\n strokeWeight: rectangle.strokeWeight,\n visible: rectangle.visible,\n zIndex: rectangle.zIndex,\n }))\n );\n }\n\n /**\n * Removes the given rectangle from the map.\n */\n removeRectangle(rectangle: AgmRectangle): Promise<void> {\n return this._rectangles.get(rectangle).then((r) => {\n r.setMap(null);\n this._rectangles.delete(rectangle);\n });\n }\n\n setOptions(rectangle: AgmRectangle, options: google.maps.RectangleOptions): Promise<void> {\n return this._rectangles.get(rectangle).then((r) => {\n const actualStrokePosition = options.strokePosition as any as keyof typeof google.maps.StrokePosition;\n options.strokePosition = google.maps.StrokePosition[actualStrokePosition];\n r.setOptions(options);\n });\n }\n\n getBounds(rectangle: AgmRectangle): Promise<google.maps.LatLngBounds> {\n return this._rectangles.get(rectangle).then((r) => r.getBounds());\n }\n\n setBounds(rectangle: AgmRectangle): Promise<void> {\n return this._rectangles.get(rectangle).then((r) => {\n return r.setBounds({\n north: rectangle.north,\n east: rectangle.east,\n south: rectangle.south,\n west: rectangle.west,\n });\n });\n }\n\n setEditable(rectangle: AgmRectangle): Promise<void> {\n return this._rectangles.get(rectangle).then((r) => {\n return r.setEditable(rectangle.editable);\n });\n }\n\n setDraggable(rectangle: AgmRectangle): Promise<void> {\n return this._rectangles.get(rectangle).then((r) => {\n return r.setDraggable(rectangle.draggable);\n });\n }\n\n setVisible(rectangle: AgmRectangle): Promise<void> {\n return this._rectangles.get(rectangle).then((r) => {\n return r.setVisible(rectangle.visible);\n });\n }\n\n createEventObservable<T>(eventName: string, rectangle: AgmRectangle): Observable<T> {\n return new Observable((subsrciber: Subscriber<T>) => {\n let listener: google.maps.MapsEventListener = null;\n this._rectangles.get(rectangle).then((r) => {\n listener = r.addListener(eventName, (e: T) => this._zone.run(() => subsrciber.next(e)));\n });\n\n return () => {\n if (listener !== null) {\n listener.remove();\n }\n };\n });\n }\n}\n","import { Directive, Input, OnDestroy, OnInit } from '@angular/core';\nimport { LayerManager } from '../services/managers/layer-manager';\n\nlet layerId = 0;\n\n/*\n * This directive adds a bicycling layer to a google map instance\n * <agm-bicycling-layer [visible]=\"true|false\"> <agm-bicycling-layer>\n * */\n@Directive({\n selector: 'agm-bicycling-layer',\n})\nexport class AgmBicyclingLayer implements OnInit, OnDestroy{\n private _addedToManager = false;\n private _id: string = (layerId++).toString();\n\n /**\n * Hide/show bicycling layer\n */\n @Input() visible = true;\n\n constructor( private _manager: LayerManager ) {}\n\n ngOnInit() {\n if (this._addedToManager) {\n return;\n }\n this._manager.addBicyclingLayer(this);\n this._addedToManager = true;\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n toString(): string { return `AgmBicyclingLayer-${this._id.toString()}`; }\n\n /** @internal */\n ngOnDestroy() {\n this._manager.deleteLayer(this);\n }\n\n}\n","import { Directive, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChange } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { CircleManager } from '../services/managers/circle-manager';\n\n@Directive({\n selector: 'agm-circle',\n})\nexport class AgmCircle implements OnInit, OnChanges, OnDestroy {\n /**\n * The latitude position of the circle (required).\n */\n @Input() latitude: number;\n\n /**\n * The clickable position of the circle (required).\n */\n @Input() longitude: number;\n\n /**\n * Indicates whether this Circle handles mouse events. Defaults to true.\n */\n @Input() clickable = true;\n\n /**\n * If set to true, the user can drag this circle over the map. Defaults to false.\n */\n // tslint:disable-next-line:no-input-rename\n @Input('circleDraggable') draggable = false;\n\n /**\n * If set to true, the user can edit this circle by dragging the control points shown at\n * the center and around the circumference of the circle. Defaults to false.\n */\n @Input() editable = false;\n\n /**\n * The fill color. All CSS3 colors are supported except for extended named colors.\n */\n @Input() fillColor: string;\n\n /**\n * The fill opacity between 0.0 and 1.0.\n */\n @Input() fillOpacity: number;\n\n /**\n * The radius in meters on the Earth's surface.\n */\n @Input() radius = 0;\n\n /**\n * The stroke color. All CSS3 colors are supported except for extended named colors.\n */\n @Input() strokeColor: string;\n\n /**\n * The stroke opacity between 0.0 and 1.0\n */\n @Input() strokeOpacity: number;\n\n /**\n * The stroke position. Defaults to CENTER.\n * This property is not supported on Internet Explorer 8 and earlier.\n */\n @Input() strokePosition: keyof typeof google.maps.StrokePosition = 'CENTER';\n\n /**\n * The stroke width in pixels.\n */\n @Input() strokeWeight = 0;\n\n /**\n * Whether this circle is visible on the map. Defaults to true.\n */\n @Input() visible = true;\n\n /**\n * The zIndex compared to other polys.\n */\n @Input() zIndex: number;\n\n /**\n * This event is fired when the circle's center is changed.\n */\n @Output() centerChange: EventEmitter<google.maps.LatLngLiteral> = new EventEmitter<google.maps.LatLngLiteral>();\n\n /**\n * This event emitter gets emitted when the user clicks on the circle.\n */\n @Output() circleClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event emitter gets emitted when the user clicks on the circle.\n */\n @Output() circleDblClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is repeatedly fired while the user drags the circle.\n */\n // tslint:disable-next-line: no-output-native\n @Output() drag: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user stops dragging the circle.\n */\n @Output() dragEnd: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user starts dragging the circle.\n */\n @Output() dragStart: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mousedown event is fired on the circle.\n */\n @Output() mouseDown: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mousemove event is fired on the circle.\n */\n @Output() mouseMove: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired on circle mouseout.\n */\n @Output() mouseOut: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired on circle mouseover.\n */\n @Output() mouseOver: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mouseup event is fired on the circle.\n */\n @Output() mouseUp: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the circle's radius is changed.\n */\n @Output() radiusChange: EventEmitter<number> = new EventEmitter<number>();\n\n /**\n * This event is fired when the circle is right-clicked on.\n */\n @Output() rightClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n private _circleAddedToManager = false;\n\n private static _mapOptions: string[] = [\n 'fillColor', 'fillOpacity', 'strokeColor', 'strokeOpacity', 'strokePosition', 'strokeWeight',\n 'visible', 'zIndex', 'clickable',\n ];\n\n private _eventSubscriptions: Subscription[] = [];\n\n constructor(private _manager: CircleManager) {}\n\n /** @internal */\n ngOnInit() {\n this._manager.addCircle(this);\n this._circleAddedToManager = true;\n this._registerEventListeners();\n }\n\n /** @internal */\n ngOnChanges(changes: {[key: string]: SimpleChange}) {\n if (!this._circleAddedToManager) {\n return;\n }\n // tslint:disable: no-string-literal\n if (changes['latitude'] || changes['longitude']) {\n this._manager.setCenter(this);\n }\n if (changes['editable']) {\n this._manager.setEditable(this);\n }\n if (changes['draggable']) {\n this._manager.setDraggable(this);\n }\n if (changes['visible']) {\n this._manager.setVisible(this);\n }\n if (changes['radius']) {\n this._manager.setRadius(this);\n }\n // tslint:enable: no-string-literal\n this._updateCircleOptionsChanges(changes);\n }\n\n private _updateCircleOptionsChanges(changes: {[propName: string]: SimpleChange}) {\n const options: {[propName: string]: any} = {};\n const optionKeys =\n Object.keys(changes).filter(k => AgmCircle._mapOptions.indexOf(k) !== -1);\n optionKeys.forEach((k) => { options[k] = changes[k].currentValue; });\n\n if (optionKeys.length > 0) {\n this._manager.setOptions(this, options);\n }\n }\n\n private _registerEventListeners() {\n const events: Map<string, EventEmitter<any>> = new Map<string, EventEmitter<any>>();\n events.set('center_changed', this.centerChange);\n events.set('click', this.circleClick);\n events.set('dblclick', this.circleDblClick);\n events.set('drag', this.drag);\n events.set('dragend', this.dragEnd);\n events.set('dragstart', this.dragStart);\n events.set('mousedown', this.mouseDown);\n events.set('mousemove', this.mouseMove);\n events.set('mouseout', this.mouseOut);\n events.set('mouseover', this.mouseOver);\n events.set('mouseup', this.mouseUp);\n events.set('radius_changed', this.radiusChange);\n events.set('rightclick', this.rightClick);\n\n events.forEach((eventEmitter, eventName) => {\n this._eventSubscriptions.push(\n this._manager.createEventObservable<google.maps.MouseEvent>(eventName, this).subscribe((value) => {\n switch (eventName) {\n case 'radius_changed':\n this._manager.getRadius(this).then((radius) => eventEmitter.emit(radius));\n break;\n case 'center_changed':\n this._manager.getCenter(this).then(\n (center) =>\n eventEmitter.emit({lat: center.lat(), lng: center.lng()} as google.maps.LatLngLiteral));\n break;\n default:\n eventEmitter.emit(value);\n }\n }));\n });\n }\n\n /** @internal */\n ngOnDestroy() {\n this._eventSubscriptions.forEach(s => s.unsubscribe());\n this._eventSubscriptions = null;\n this._manager.removeCircle(this);\n }\n\n /**\n * Gets the LatLngBounds of this Circle.\n */\n getBounds(): Promise<google.maps.LatLngBounds> { return this._manager.getBounds(this); }\n\n getCenter(): Promise<google.maps.LatLng> { return this._manager.getCenter(this); }\n}\n","import { Directive, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { DataLayerManager } from './../services/managers/data-layer-manager';\n\nlet layerId = 0;\n\n/**\n * AgmDataLayer enables the user to add data layers to the map.\n *\n * ### Example\n * ```typescript\n * import { Component } from 'angular2/core';\n * import { AgmMap, AgmDataLayer } from\n * 'angular-google-maps/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * directives: [AgmMap, AgmDataLayer],\n * styles: [`\n * .agm-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * \t <agm-data-layer [geoJson]=\"geoJsonObject\" (layerClick)=\"clicked($event)\" [style]=\"styleFunc\">\n * \t </agm-data-layer>\n * </agm-map>\n * `\n * })\n * export class MyMapCmp {\n * lat: number = -25.274449;\n * lng: number = 133.775060;\n * zoom: number = 5;\n *\n * clicked(clickEvent) {\n * console.log(clickEvent);\n * }\n *\n * styleFunc(feature) {\n * return ({\n * clickable: false,\n * fillColor: feature.getProperty('color'),\n * strokeWeight: 1\n * });\n * }\n *\n * geoJsonObject: Object = {\n * \"type\": \"FeatureCollection\",\n * \"features\": [\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"G\",\n * \"color\": \"blue\",\n * \"rank\": \"7\",\n * \"ascii\": \"71\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [123.61, -22.14], [122.38, -21.73], [121.06, -21.69], [119.66, -22.22], [119.00, -23.40],\n * [118.65, -24.76], [118.43, -26.07], [118.78, -27.56], [119.22, -28.57], [120.23, -29.49],\n * [121.77, -29.87], [123.57, -29.64], [124.45, -29.03], [124.71, -27.95], [124.80, -26.70],\n * [124.80, -25.60], [123.61, -25.64], [122.56, -25.64], [121.72, -25.72], [121.81, -26.62],\n * [121.86, -26.98], [122.60, -26.90], [123.57, -27.05], [123.57, -27.68], [123.35, -28.18],\n * [122.51, -28.38], [121.77, -28.26], [121.02, -27.91], [120.49, -27.21], [120.14, -26.50],\n * [120.10, -25.64], [120.27, -24.52], [120.67, -23.68], [121.72, -23.32], [122.43, -23.48],\n * [123.04, -24.04], [124.54, -24.28], [124.58, -23.20], [123.61, -22.14]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"o\",\n * \"color\": \"red\",\n * \"rank\": \"15\",\n * \"ascii\": \"111\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [128.84, -25.76], [128.18, -25.60], [127.96, -25.52], [127.88, -25.52], [127.70, -25.60],\n * [127.26, -25.79], [126.60, -26.11], [126.16, -26.78], [126.12, -27.68], [126.21, -28.42],\n * [126.69, -29.49], [127.74, -29.80], [128.80, -29.72], [129.41, -29.03], [129.72, -27.95],\n * [129.68, -27.21], [129.33, -26.23], [128.84, -25.76]\n * ],\n * [\n * [128.45, -27.44], [128.32, -26.94], [127.70, -26.82], [127.35, -27.05], [127.17, -27.80],\n * [127.57, -28.22], [128.10, -28.42], [128.49, -27.80], [128.45, -27.44]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"o\",\n * \"color\": \"yellow\",\n * \"rank\": \"15\",\n * \"ascii\": \"111\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [131.87, -25.76], [131.35, -26.07], [130.95, -26.78], [130.82, -27.64], [130.86, -28.53],\n * [131.26, -29.22], [131.92, -29.76], [132.45, -29.87], [133.06, -29.76], [133.72, -29.34],\n * [134.07, -28.80], [134.20, -27.91], [134.07, -27.21], [133.81, -26.31], [133.37, -25.83],\n * [132.71, -25.64], [131.87, -25.76]\n * ],\n * [\n * [133.15, -27.17], [132.71, -26.86], [132.09, -26.90], [131.74, -27.56], [131.79, -28.26],\n * [132.36, -28.45], [132.93, -28.34], [133.15, -27.76], [133.15, -27.17]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"g\",\n * \"color\": \"blue\",\n * \"rank\": \"7\",\n * \"ascii\": \"103\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [138.12, -25.04], [136.84, -25.16], [135.96, -25.36], [135.26, -25.99], [135, -26.90],\n * [135.04, -27.91], [135.26, -28.88], [136.05, -29.45], [137.02, -29.49], [137.81, -29.49],\n * [137.94, -29.99], [137.90, -31.20], [137.85, -32.24], [136.88, -32.69], [136.45, -32.36],\n * [136.27, -31.80], [134.95, -31.84], [135.17, -32.99], [135.52, -33.43], [136.14, -33.76],\n * [137.06, -33.83], [138.12, -33.65], [138.86, -33.21], [139.30, -32.28], [139.30, -31.24],\n * [139.30, -30.14], [139.21, -28.96], [139.17, -28.22], [139.08, -27.41], [139.08, -26.47],\n * [138.99, -25.40], [138.73, -25.00], [138.12, -25.04]\n * ],\n * [\n * [137.50, -26.54], [136.97, -26.47], [136.49, -26.58], [136.31, -27.13], [136.31, -27.72],\n * [136.58, -27.99], [137.50, -28.03], [137.68, -27.68], [137.59, -26.78], [137.50, -26.54]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"l\",\n * \"color\": \"green\",\n * \"rank\": \"12\",\n * \"ascii\": \"108\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [140.14, -21.04], [140.31, -29.42], [141.67, -29.49], [141.59, -20.92], [140.14, -21.04]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"e\",\n * \"color\": \"red\",\n * \"rank\": \"5\",\n * \"ascii\": \"101\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [144.14, -27.41], [145.67, -27.52], [146.86, -27.09], [146.82, -25.64], [146.25, -25.04],\n * [145.45, -24.68], [144.66, -24.60], [144.09, -24.76], [143.43, -25.08], [142.99, -25.40],\n * [142.64, -26.03], [142.64, -27.05], [142.64, -28.26], [143.30, -29.11], [144.18, -29.57],\n * [145.41, -29.64], [146.46, -29.19], [146.64, -28.72], [146.82, -28.14], [144.84, -28.42],\n * [144.31, -28.26], [144.14, -27.41]\n * ],\n * [\n * [144.18, -26.39], [144.53, -26.58], [145.19, -26.62], [145.72, -26.35], [145.81, -25.91],\n * [145.41, -25.68], [144.97, -25.68], [144.49, -25.64], [144, -25.99], [144.18, -26.39]\n * ]\n * ]\n * }\n * }\n * ]\n * };\n * }\n * ```\n */\n@Directive({\n selector: 'agm-data-layer',\n})\nexport class AgmDataLayer implements OnInit, OnDestroy, OnChanges {\n private static _dataOptionsAttributes = ['style'];\n\n private _addedToManager = false;\n private _id: string = (layerId++).toString();\n private _subscriptions: Subscription[] = [];\n\n /**\n * This event is fired when a feature in the layer is clicked.\n */\n @Output() layerClick: EventEmitter<google.maps.Data.MouseEvent> = new EventEmitter<google.maps.Data.MouseEvent>();\n\n /**\n * The geoJson to be displayed\n */\n @Input() geoJson: object | string | null = null;\n\n /**\n * The layer's style function.\n */\n @Input() style: (param: google.maps.Data.Feature) => google.maps.Data.StyleOptions;\n\n constructor(private _manager: DataLayerManager) { }\n\n ngOnInit() {\n if (this._addedToManager) {\n return;\n }\n this._manager.addDataLayer(this);\n this._addedToManager = true;\n this._addEventListeners();\n }\n\n private _addEventListeners() {\n const listeners = [\n { name: 'click', handler: (ev: google.maps.Data.MouseEvent) => this.layerClick.emit(ev) },\n ];\n listeners.forEach((obj) => {\n const os = this._manager.createEventObservable(obj.name, this).subscribe(obj.handler);\n this._subscriptions.push(os);\n });\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n toString(): string { return `AgmDataLayer-${this._id.toString()}`; }\n\n /** @internal */\n ngOnDestroy() {\n this._manager.deleteDataLayer(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach(s => s.unsubscribe());\n }\n\n /** @internal */\n ngOnChanges(changes: SimpleChanges) {\n if (!this._addedToManager) {\n return;\n }\n\n // tslint:disable-next-line: no-string-literal\n const geoJsonChange = changes['geoJson'];\n if (geoJsonChange) {\n this._manager.updateGeoJson(this, geoJsonChange.currentValue);\n }\n\n const dataOptions = AgmDataLayer._dataOptionsAttributes.reduce<google.maps.Data.DataOptions>((options, k) =>\n options[k] = changes.hasOwnProperty(k) ? changes[k].currentValue : (this as any)[k], {});\n\n this._manager.setDataOptions(this, dataOptions);\n }\n}\n","import { Directive, Input, OnChanges, OnDestroy, OnInit, Self } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { distinctUntilChanged, takeUntil } from 'rxjs/operators';\n\nimport { FitBoundsAccessor, FitBoundsDetails, FitBoundsService } from '../services/fit-bounds';\n\n/**\n * Adds the given directive to the auto fit bounds feature when the value is true.\n * To make it work with you custom AGM component, you also have to implement the {@link FitBoundsAccessor} abstract class.\n * @example\n * <agm-marker [agmFitBounds]=\"true\"></agm-marker>\n */\n@Directive({\n selector: '[agmFitBounds]',\n})\nexport class AgmFitBounds implements OnInit, OnDestroy, OnChanges {\n /**\n * If the value is true, the element gets added to the bounds of the map.\n * Default: true.\n */\n @Input() agmFitBounds = true;\n\n private _destroyed$: Subject<void> = new Subject<void>();\n private _latestFitBoundsDetails: FitBoundsDetails | null = null;\n\n constructor(\n @Self() private readonly _fitBoundsAccessor: FitBoundsAccessor,\n private readonly _fitBoundsService: FitBoundsService,\n ) {}\n\n /**\n * @internal\n */\n ngOnChanges() {\n this._updateBounds();\n }\n\n /**\n * @internal\n */\n ngOnInit() {\n this._fitBoundsAccessor\n .getFitBoundsDetails$()\n .pipe(\n distinctUntilChanged(\n (x: FitBoundsDetails, y: FitBoundsDetails) =>\n x.latLng.lat === y.latLng.lat && x.latLng.lng === y.latLng.lng,\n ),\n takeUntil(this._destroyed$),\n )\n .subscribe(details => this._updateBounds(details));\n }\n\n /*\n Either the location changed, or visible status changed.\n Possible state changes are\n invisible -> visible\n visible -> invisible\n visible -> visible (new location)\n */\n private _updateBounds(newFitBoundsDetails?: FitBoundsDetails) {\n // either visibility will change, or location, so remove the old one anyway\n if (this._latestFitBoundsDetails) {\n this._fitBoundsService.removeFromBounds(this._latestFitBoundsDetails.latLng);\n // don't set latestFitBoundsDetails to null, because we can toggle visibility from\n // true -> false -> true, in which case we still need old value cached here\n }\n\n if (newFitBoundsDetails) {\n this._latestFitBoundsDetails = newFitBoundsDetails;\n }\n if (!this._latestFitBoundsDetails) {\n return;\n }\n if (this.agmFitBounds === true) {\n this._fitBoundsService.addToBounds(this._latestFitBoundsDetails.latLng);\n }\n }\n\n /**\n * @internal\n */\n ngOnDestroy() {\n this._destroyed$.next();\n this._destroyed$.complete();\n if (this._latestFitBoundsDetails !== null) {\n this._fitBoundsService.removeFromBounds(this._latestFitBoundsDetails.latLng);\n }\n }\n}\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChange } from '@angular/core';\n\nimport { InfoWindowManager } from '../services/managers/info-window-manager';\n\nimport { AgmMarker } from './marker';\n\nlet infoWindowId = 0;\n\n/**\n * AgmInfoWindow renders a info window inside a {@link AgmMarker} or standalone.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * .agm-map-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-marker [latitude]=\"lat\" [longitude]=\"lng\" [label]=\"'M'\">\n * <agm-info-window [disableAutoPan]=\"true\">\n * Hi, this is the content of the <strong>info window</strong>\n * </agm-info-window>\n * </agm-marker>\n * </agm-map>\n * `\n * })\n * ```\n */\n@Component({\n selector: 'agm-info-window',\n template: `<div class='agm-info-window-content'>\n <ng-content></ng-content>\n </div>\n `,\n})\nexport class AgmInfoWindow implements OnDestroy, OnChanges, OnInit {\n /**\n * The latitude position of the info window (only usefull if you use it ouside of a {@link\n * AgmMarker}).\n */\n @Input() latitude: number;\n\n /**\n * The longitude position of the info window (only usefull if you use it ouside of a {@link\n * AgmMarker}).\n */\n @Input() longitude: number;\n\n /**\n * Disable auto-pan on open. By default, the info window will pan the map so that it is fully\n * visible when it opens.\n */\n @Input() disableAutoPan: boolean;\n\n /**\n * All InfoWindows are displayed on the map in order of their zIndex, with higher values\n * displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed\n * according to their latitude, with InfoWindows of lower latitudes appearing in front of\n * InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers.\n */\n @Input() zIndex: number;\n\n /**\n * Maximum width of the infowindow, regardless of content's width. This value is only considered\n * if it is set before a call to open. To change the maximum width when changing content, call\n * close, update maxWidth, and then open.\n */\n @Input() maxWidth: number;\n\n /**\n * Holds the marker that is the host of the info window (if available)\n */\n hostMarker: AgmMarker;\n\n /**\n * Holds the native element that is used for the info window content.\n */\n content: Node;\n\n /**\n * Sets the open state for the InfoWindow. You can also call the open() and close() methods.\n */\n @Input() isOpen = false;\n\n /**\n * Emits an event when the info window is closed.\n */\n @Output() infoWindowClose: EventEmitter<void> = new EventEmitter<void>();\n\n private static _infoWindowOptionsInputs: string[] = ['disableAutoPan', 'maxWidth'];\n private _infoWindowAddedToManager = false;\n private _id: string = (infoWindowId++).toString();\n\n constructor(private _infoWindowManager: InfoWindowManager, private _el: ElementRef) {}\n\n ngOnInit() {\n this.content = this._el.nativeElement.querySelector('.agm-info-window-content');\n this._infoWindowManager.addInfoWindow(this);\n this._infoWindowAddedToManager = true;\n this._updateOpenState();\n this._registerEventListeners();\n }\n\n /** @internal */\n ngOnChanges(changes: {[key: string]: SimpleChange}) {\n if (!this._infoWindowAddedToManager) {\n return;\n }\n // tslint:disable: no-string-literal\n if ((changes['latitude'] || changes['longitude']) && typeof this.latitude === 'number' &&\n typeof this.longitude === 'number') {\n this._infoWindowManager.setPosition(this);\n }\n if (changes['zIndex']) {\n this._infoWindowManager.setZIndex(this);\n }\n if (changes['isOpen']) {\n this._updateOpenState();\n }\n this._setInfoWindowOptions(changes);\n }\n // tslint:enable: no-string-literal\n\n private _registerEventListeners() {\n this._infoWindowManager.createEventObservable('closeclick', this).subscribe(() => {\n this.isOpen = false;\n this.infoWindowClose.emit();\n });\n }\n\n private _updateOpenState() {\n this.isOpen ? this.open() : this.close();\n }\n\n private _setInfoWindowOptions(changes: {[key: string]: SimpleChange}) {\n const options: {[propName: string]: any} = {};\n const optionKeys = Object.keys(changes).filter(\n k => AgmInfoWindow._infoWindowOptionsInputs.indexOf(k) !== -1);\n optionKeys.forEach((k) => { options[k] = changes[k].currentValue; });\n this._infoWindowManager.setOptions(this, options);\n }\n\n /**\n * Opens the info window.\n */\n open(): Promise<void> { return this._infoWindowManager.open(this); }\n\n /**\n * Closes the info window.\n */\n close(): Promise<void> {\n return this._infoWindowManager.close(this).then(() => { this.infoWindowClose.emit(); });\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n toString(): string { return 'AgmInfoWindow-' + this._id.toString(); }\n\n /** @internal */\n ngOnDestroy() { this._infoWindowManager.deleteInfoWindow(this); }\n}\n","import { Directive, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { KmlLayerManager } from './../services/managers/kml-layer-manager';\n\nlet layerId = 0;\n\n@Directive({\n selector: 'agm-kml-layer',\n})\nexport class AgmKmlLayer implements OnInit, OnDestroy, OnChanges {\n private _addedToManager = false;\n private _id: string = (layerId++).toString();\n private _subscriptions: Subscription[] = [];\n private static _kmlLayerOptions: string[] =\n ['clickable', 'preserveViewport', 'screenOverlays', 'suppressInfoWindows', 'url', 'zIndex'];\n\n /**\n * If true, the layer receives mouse events. Default value is true.\n */\n @Input() clickable = true;\n\n /**\n * By default, the input map is centered and zoomed to the bounding box of the contents of the\n * layer.\n * If this option is set to true, the viewport is left unchanged, unless the map's center and zoom\n * were never set.\n */\n @Input() preserveViewport = false;\n\n /**\n * Whether to render the screen overlays. Default true.\n */\n @Input() screenOverlays = true;\n\n /**\n * Suppress the rendering of info windows when layer features are clicked.\n */\n @Input() suppressInfoWindows = false;\n\n /**\n * The URL of the KML document to display.\n */\n @Input() url: string = null;\n\n /**\n * The z-index of the layer.\n */\n @Input() zIndex: number | null = null;\n\n /**\n * This event is fired when a feature in the layer is clicked.\n */\n @Output() layerClick: EventEmitter<google.maps.KmlMouseEvent> = new EventEmitter<google.maps.KmlMouseEvent>();\n\n /**\n * This event is fired when the KML layers default viewport has changed.\n */\n @Output() defaultViewportChange: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * This event is fired when the KML layer has finished loading.\n * At this point it is safe to read the status property to determine if the layer loaded\n * successfully.\n */\n @Output() statusChange: EventEmitter<void> = new EventEmitter<void>();\n\n constructor(private _manager: KmlLayerManager) {}\n\n ngOnInit() {\n if (this._addedToManager) {\n return;\n }\n this._manager.addKmlLayer(this);\n this._addedToManager = true;\n this._addEventListeners();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (!this._addedToManager) {\n return;\n }\n this._updatePolygonOptions(changes);\n }\n\n private _updatePolygonOptions(changes: SimpleChanges) {\n const options = Object.keys(changes)\n .filter(k => AgmKmlLayer._kmlLayerOptions.indexOf(k) !== -1)\n .reduce((obj: any, k: string) => {\n obj[k] = changes[k].currentValue;\n return obj;\n }, {});\n if (Object.keys(options).length > 0) {\n this._manager.setOptions(this, options);\n }\n }\n\n private _addEventListeners() {\n const listeners = [\n {name: 'click', handler: (ev: google.maps.KmlMouseEvent) => this.layerClick.emit(ev)},\n {name: 'defaultviewport_changed', handler: () => this.defaultViewportChange.emit()},\n {name: 'status_changed', handler: () => this.statusChange.emit()},\n ];\n listeners.forEach((obj) => {\n const os = this._manager.createEventObservable(obj.name, this).subscribe(obj.handler);\n this._subscriptions.push(os);\n });\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n toString(): string { return `AgmKmlLayer-${this._id.toString()}`; }\n\n /** @internal */\n ngOnDestroy() {\n this._manager.deleteKmlLayer(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach(s => s.unsubscribe());\n }\n}\n","import { isPlatformServer } from '@angular/common';\nimport { AfterContentInit, Component, ContentChildren, Directive, ElementRef, EventEmitter, Inject, Input, NgZone, OnChanges, OnDestroy, Output, PLATFORM_ID, QueryList, SimpleChanges } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { FitBoundsService } from '../services/fit-bounds';\nimport { GoogleMapsAPIWrapper } from '../services/google-maps-api-wrapper';\nimport { CircleManager } from '../services/managers/circle-manager';\nimport { InfoWindowManager } from '../services/managers/info-window-manager';\nimport { LayerManager } from '../services/managers/layer-manager';\nimport { MarkerManager } from '../services/managers/marker-manager';\nimport { PolygonManager } from '../services/managers/polygon-manager';\nimport { PolylineManager } from '../services/managers/polyline-manager';\nimport { RectangleManager } from '../services/managers/rectangle-manager';\nimport { DataLayerManager } from './../services/managers/data-layer-manager';\nimport { KmlLayerManager } from './../services/managers/kml-layer-manager';\n\nexport type ControlPosition = keyof typeof google.maps.ControlPosition;\n\n@Directive()\nexport abstract class AgmMapControl {\n @Input() position: ControlPosition;\n abstract getOptions(): Partial<google.maps.MapOptions>;\n}\n\n@Directive({\n selector: 'agm-map agm-fullscreen-control',\n providers: [{ provide: AgmMapControl, useExisting: AgmFullscreenControl }],\n})\nexport class AgmFullscreenControl extends AgmMapControl {\n getOptions(): Partial<google.maps.MapOptions> {\n return {\n fullscreenControl: true,\n fullscreenControlOptions: {\n position: this.position && google.maps.ControlPosition[this.position],\n },\n };\n }\n}\n@Directive({\n selector: 'agm-map agm-map-type-control',\n providers: [{ provide: AgmMapControl, useExisting: AgmMapTypeControl }],\n})\nexport class AgmMapTypeControl extends AgmMapControl {\n @Input() mapTypeIds: (keyof typeof google.maps.MapTypeId)[];\n @Input() style: keyof typeof google.maps.MapTypeControlStyle;\n\n getOptions(): Partial<google.maps.MapOptions> {\n return {\n mapTypeControl: true,\n mapTypeControlOptions: {\n position: this.position && google.maps.ControlPosition[this.position],\n style: this.style && google.maps.MapTypeControlStyle[this.style],\n mapTypeIds: this.mapTypeIds && this.mapTypeIds.map(mapTypeId => google.maps.MapTypeId[mapTypeId]),\n },\n };\n }\n}\n\n@Directive({\n selector: 'agm-map agm-pan-control',\n providers: [{ provide: AgmMapControl, useExisting: AgmPanControl }],\n})\nexport class AgmPanControl extends AgmMapControl {\n getOptions(): Partial<google.maps.MapOptions> {\n return {\n panControl: true,\n panControlOptions: {\n position: this.position && google.maps.ControlPosition[this.position],\n },\n };\n }\n}\n\n@Directive({\n selector: 'agm-map agm-rotate-control',\n providers: [{ provide: AgmMapControl, useExisting: AgmRotateControl }],\n})\nexport class AgmRotateControl extends AgmMapControl {\n getOptions(): Partial<google.maps.MapOptions> {\n return {\n rotateControl: true,\n rotateControlOptions: {\n position: this.position && google.maps.ControlPosition[this.position],\n },\n };\n }\n}\n\n@Directive({\n selector: 'agm-map agm-scale-control',\n providers: [{ provide: AgmMapControl, useExisting: AgmScaleControl }],\n})\nexport class AgmScaleControl extends AgmMapControl{\n getOptions(): Partial<google.maps.MapOptions> {\n return {\n scaleControl: true,\n };\n }\n}\n\n@Directive({\n selector: 'agm-map agm-street-view-control',\n providers: [{ provide: AgmMapControl, useExisting: AgmStreetViewControl }],\n})\nexport class AgmStreetViewControl extends AgmMapControl {\n getOptions(): Partial<google.maps.MapOptions> {\n return {\n streetViewControl: true,\n streetViewControlOptions: {\n position: this.position && google.maps.ControlPosition[this.position],\n },\n };\n }\n}\n\n@Directive({\n selector: 'agm-map agm-zoom-control',\n providers: [{ provide: AgmMapControl, useExisting: AgmZoomControl }],\n})\nexport class AgmZoomControl extends AgmMapControl{\n @Input() style: keyof typeof google.maps.ZoomControlStyle;\n getOptions(): Partial<google.maps.MapOptions> {\n return {\n zoomControl: true,\n zoomControlOptions: {\n position: this.position && google.maps.ControlPosition[this.position],\n style: this.style && google.maps.ZoomControlStyle[this.style],\n },\n };\n }\n}\n\n/**\n * AgmMap renders a Google Map.\n * **Important note**: To be able see a map in the browser, you have to define a height for the\n * element `agm-map`.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * agm-map {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * </agm-map>\n * `\n * })\n * ```\n */\n@Component({\n selector: 'agm-map',\n providers: [\n CircleManager,\n DataLayerManager,\n DataLayerManager,\n FitBoundsService,\n GoogleMapsAPIWrapper,\n InfoWindowManager,\n KmlLayerManager,\n LayerManager,\n MarkerManager,\n PolygonManager,\n PolylineManager,\n RectangleManager,\n ],\n styles: [`\n .agm-map-container-inner {\n width: inherit;\n height: inherit;\n }\n .agm-map-content {\n display:none;\n }\n `],\n template: `\n <div class='agm-map-container-inner sebm-google-map-container-inner'></div>\n <div class='agm-map-content'>\n <ng-content></ng-content>\n </div>\n `,\n})\nexport class AgmMap implements OnChanges, AfterContentInit, OnDestroy {\n /**\n * The longitude that defines the center of the map.\n */\n @Input() longitude = 0;\n\n /**\n * The latitude that defines the center of the map.\n */\n @Input() latitude = 0;\n\n /**\n * The zoom level of the map. The default zoom level is 8.\n */\n @Input() zoom = 8;\n\n /**\n * The minimal zoom level of the map allowed. When not provided, no restrictions to the zoom level\n * are enforced.\n */\n @Input() minZoom: number;\n\n /**\n * The maximal zoom level of the map allowed. When not provided, no restrictions to the zoom level\n * are enforced.\n */\n @Input() maxZoom: number;\n\n /**\n * The control size for the default map controls. Only governs the controls made by the Maps API itself\n */\n @Input() controlSize: number;\n\n /**\n * Enables/disables if map is draggable.\n */\n // tslint:disable-next-line:no-input-rename\n @Input('mapDraggable') draggable = true;\n\n /**\n * Enables/disables zoom and center on double click. Enabled by default.\n */\n @Input() disableDoubleClickZoom = false;\n\n /**\n * Enables/disables all default UI of the Google map. Please note: When the map is created, this\n * value cannot get updated.\n */\n @Input() disableDefaultUI = false;\n\n /**\n * If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.\n */\n @Input() scrollwheel = true;\n\n /**\n * Color used for the background of the Map div. This color will be visible when tiles have not\n * yet loaded as the user pans. This option can only be set when the map is initialized.\n */\n @Input() backgroundColor: string;\n\n /**\n * The name or url of the cursor to display when mousing over a draggable map. This property uses\n * the css * cursor attribute to change the icon. As with the css property, you must specify at\n * least one fallback cursor that is not a URL. For example:\n * [draggableCursor]=\"'url(http://www.example.com/icon.png), auto;'\"\n */\n @Input() draggableCursor: string;\n\n /**\n * The name or url of the cursor to display when the map is being dragged. This property uses the\n * css cursor attribute to change the icon. As with the css property, you must specify at least\n * one fallback cursor that is not a URL. For example:\n * [draggingCursor]=\"'url(http://www.example.com/icon.png), auto;'\"\n */\n @Input() draggingCursor: string;\n\n /**\n * If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are\n * enabled by default.\n */\n @Input() keyboardShortcuts = true;\n\n /**\n * Styles to apply to each of the default map types. Note that for Satellite/Hybrid and Terrain\n * modes, these styles will only apply to labels and geometry.\n */\n @Input() styles: google.maps.MapTypeStyle[] = [];\n\n /**\n * When true and the latitude and/or longitude values changes, the Google Maps panTo method is\n * used to\n * center the map. See: https://developers.google.com/maps/documentation/javascript/reference#Map\n */\n @Input() usePanning = false;\n\n /**\n * Sets the viewport to contain the given bounds.\n * If this option to `true`, the bounds get automatically computed from all elements that use the {@link AgmFitBounds} directive.\n */\n @Input() fitBounds: google.maps.LatLngBoundsLiteral | google.maps.LatLngBounds | boolean = false;\n\n /**\n * Padding amount for the bounds.\n */\n @Input() fitBoundsPadding: number | google.maps.Padding;\n\n /**\n * The map mapTypeId. Defaults to 'roadmap'.\n */\n @Input() mapTypeId: keyof typeof google.maps.MapTypeId = 'ROADMAP';\n\n /**\n * When false, map icons are not clickable. A map icon represents a point of interest,\n * also known as a POI. By default map icons are clickable.\n */\n @Input() clickableIcons = true;\n\n /**\n * A map icon represents a point of interest, also known as a POI.\n * When map icons are clickable by default, an info window is displayed.\n * When this property is set to false, the info window will not be shown but the click event\n * will still fire\n */\n @Input() showDefaultInfoWindow = true;\n\n /**\n * This setting controls how gestures on the map are handled.\n * Allowed values:\n * - 'cooperative' (Two-finger touch gestures pan and zoom the map. One-finger touch gestures are not handled by the map.)\n * - 'greedy' (All touch gestures pan or zoom the map.)\n * - 'none' (The map cannot be panned or zoomed by user gestures.)\n * - 'auto' [default] (Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or not.\n */\n @Input() gestureHandling: google.maps.GestureHandlingOptions = 'auto';\n\n /**\n * Controls the automatic switching behavior for the angle of incidence of\n * the map. The only allowed values are 0 and 45. The value 0 causes the map\n * to always use a 0° overhead view regardless of the zoom level and\n * viewport. The value 45 causes the tilt angle to automatically switch to\n * 45 whenever 45° imagery is available for the current zoom level and\n * viewport, and switch back to 0 whenever 45° imagery is not available\n * (this is the default behavior). 45° imagery is only available for\n * satellite and hybrid map types, within some locations, and at some zoom\n * levels. Note: getTilt returns the current tilt angle, not the value\n * specified by this option. Because getTilt and this option refer to\n * different things, do not bind() the tilt property; doing so may yield\n * unpredictable effects. (Default of AGM is 0 (disabled). Enable it with value 45.)\n */\n @Input() tilt = 0;\n\n /**\n * Options for restricting the bounds of the map.\n * User cannot pan or zoom away from restricted area.\n */\n @Input() restriction: google.maps.MapRestriction;\n\n /**\n * Map option attributes that can change over time\n */\n private static _mapOptionsAttributes: string[] = [\n 'disableDoubleClickZoom', 'scrollwheel', 'draggable', 'draggableCursor', 'draggingCursor',\n 'keyboardShortcuts', 'styles', 'zoom', 'minZoom', 'maxZoom', 'mapTypeId', 'clickableIcons',\n 'gestureHandling', 'tilt', 'restriction',\n ];\n\n private _observableSubscriptions: Subscription[] = [];\n private _fitBoundsSubscription: Subscription;\n\n /**\n * This event emitter gets emitted when the user clicks on the map (but not when they click on a\n * marker or infoWindow).\n */\n // tslint:disable-next-line: max-line-length\n @Output() mapClick: EventEmitter<google.maps.MouseEvent | google.maps.IconMouseEvent> = new EventEmitter<google.maps.MouseEvent | google.maps.IconMouseEvent>();\n\n /**\n * This event emitter gets emitted when the user right-clicks on the map (but not when they click\n * on a marker or infoWindow).\n */\n @Output() mapRightClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event emitter gets emitted when the user double-clicks on the map (but not when they click\n * on a marker or infoWindow).\n */\n @Output() mapDblClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event emitter is fired when the map center changes.\n */\n @Output() centerChange: EventEmitter<google.maps.LatLngLiteral> = new EventEmitter<google.maps.LatLngLiteral>();\n\n /**\n * This event is fired when the viewport bounds have changed.\n */\n @Output() boundsChange: EventEmitter<google.maps.LatLngBounds> = new EventEmitter<google.maps.LatLngBounds>();\n\n /**\n * This event is fired when the mapTypeId property changes.\n */\n @Output() mapTypeIdChange: EventEmitter<google.maps.MapTypeId> = new EventEmitter<google.maps.MapTypeId>();\n\n /**\n * This event is fired when the map becomes idle after panning or zooming.\n */\n @Output() idle: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * This event is fired when the zoom level has changed.\n */\n @Output() zoomChange: EventEmitter<number> = new EventEmitter<number>();\n\n /**\n * This event is fired when the google map is fully initialized.\n * You get the google.maps.Map instance as a result of this EventEmitter.\n */\n @Output() mapReady: EventEmitter<any> = new EventEmitter<any>();\n\n /**\n * This event is fired when the visible tiles have finished loading.\n */\n @Output() tilesLoaded: EventEmitter<void> = new EventEmitter<void>();\n\n @ContentChildren(AgmMapControl) mapControls: QueryList<AgmMapControl>;\n\n constructor(\n private _elem: ElementRef,\n private _mapsWrapper: GoogleMapsAPIWrapper,\n // tslint:disable-next-line: ban-types\n @Inject(PLATFORM_ID) private _platformId: Object,\n protected _fitBoundsService: FitBoundsService,\n private _zone: NgZone\n ) {}\n\n /** @internal */\n ngAfterContentInit() {\n if (isPlatformServer(this._platformId)) {\n // The code is running on the server, do nothing\n return;\n }\n // todo: this should be solved with a new component and a viewChild decorator\n const container = this._elem.nativeElement.querySelector('.agm-map-container-inner');\n this._initMapInstance(container);\n }\n\n private _initMapInstance(el: HTMLElement) {\n this._mapsWrapper.createMap(el, {\n center: {lat: this.latitude || 0, lng: this.longitude || 0},\n zoom: this.zoom,\n minZoom: this.minZoom,\n maxZoom: this.maxZoom,\n controlSize: this.controlSize,\n disableDefaultUI: this.disableDefaultUI,\n disableDoubleClickZoom: this.disableDoubleClickZoom,\n scrollwheel: this.scrollwheel,\n backgroundColor: this.backgroundColor,\n draggable: this.draggable,\n draggableCursor: this.draggableCursor,\n draggingCursor: this.draggingCursor,\n keyboardShortcuts: this.keyboardShortcuts,\n styles: this.styles,\n mapTypeId: this.mapTypeId.toLocaleLowerCase(),\n clickableIcons: this.clickableIcons,\n gestureHandling: this.gestureHandling,\n tilt: this.tilt,\n restriction: this.restriction,\n })\n .then(() => this._mapsWrapper.getNativeMap())\n .then(map => this.mapReady.emit(map));\n\n // register event listeners\n this._handleMapCenterChange();\n this._handleMapZoomChange();\n this._handleMapMouseEvents();\n this._handleBoundsChange();\n this._handleMapTypeIdChange();\n this._handleTilesLoadedEvent();\n this._handleIdleEvent();\n this._handleControlChange();\n }\n\n /** @internal */\n ngOnDestroy() {\n // unsubscribe all registered observable subscriptions\n this._observableSubscriptions.forEach((s) => s.unsubscribe());\n\n // remove all listeners from the map instance\n this._mapsWrapper.clearInstanceListeners();\n if (this._fitBoundsSubscription) {\n this._fitBoundsSubscription.unsubscribe();\n }\n }\n\n /* @internal */\n ngOnChanges(changes: SimpleChanges) {\n this._updateMapOptionsChanges(changes);\n this._updatePosition(changes);\n }\n\n private _updateMapOptionsChanges(changes: SimpleChanges) {\n const options: {[propName: string]: any} = {};\n const optionKeys =\n Object.keys(changes).filter(k => AgmMap._mapOptionsAttributes.indexOf(k) !== -1);\n optionKeys.forEach((k) => { options[k] = changes[k].currentValue; });\n this._mapsWrapper.setMapOptions(options);\n }\n\n /**\n * Triggers a resize event on the google map instance.\n * When recenter is true, the of the google map gets called with the current lat/lng values or fitBounds value to recenter the map.\n * Returns a promise that gets resolved after the event was triggered.\n */\n triggerResize(recenter: boolean = true): Promise<void> {\n // Note: When we would trigger the resize event and show the map in the same turn (which is a\n // common case for triggering a resize event), then the resize event would not\n // work (to show the map), so we trigger the event in a timeout.\n return new Promise<void>((resolve) => {\n setTimeout(() => {\n return this._mapsWrapper.triggerMapEvent('resize').then(() => {\n if (recenter) {\n this.fitBounds != null ? this._fitBounds() : this._setCenter();\n }\n resolve();\n });\n });\n });\n }\n\n private _updatePosition(changes: SimpleChanges) {\n // tslint:disable: no-string-literal\n if (changes['latitude'] == null && changes['longitude'] == null &&\n !changes['fitBounds']) {\n // no position update needed\n return;\n }\n // tslint:enable: no-string-literal\n\n // we prefer fitBounds in changes\n if ('fitBounds' in changes) {\n this._fitBounds();\n return;\n }\n\n if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {\n return;\n }\n this._setCenter();\n }\n\n private _setCenter() {\n const newCenter = {\n lat: this.latitude,\n lng: this.longitude,\n };\n if (this.usePanning) {\n this._mapsWrapper.panTo(newCenter);\n } else {\n this._mapsWrapper.setCenter(newCenter);\n }\n }\n\n private _fitBounds() {\n switch (this.fitBounds) {\n case true:\n this._subscribeToFitBoundsUpdates();\n break;\n case false:\n if (this._fitBoundsSubscription) {\n this._fitBoundsSubscription.unsubscribe();\n }\n break;\n default:\n if (this._fitBoundsSubscription) {\n this._fitBoundsSubscription.unsubscribe();\n }\n this._updateBounds(this.fitBounds, this.fitBoundsPadding);\n }\n }\n\n private _subscribeToFitBoundsUpdates() {\n this._zone.runOutsideAngular(() => {\n this._fitBoundsSubscription = this._fitBoundsService.getBounds$().subscribe(b => {\n this._zone.run(() => this._updateBounds(b, this.fitBoundsPadding));\n });\n });\n }\n\n protected _updateBounds(bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding) {\n if (!bounds) {\n return;\n }\n if (this._isLatLngBoundsLiteral(bounds) && typeof google !== 'undefined' && google && google.maps && google.maps.LatLngBounds) {\n const newBounds = new google.maps.LatLngBounds();\n newBounds.union(bounds);\n bounds = newBounds;\n }\n if (this.usePanning) {\n this._mapsWrapper.panToBounds(bounds, padding);\n return;\n }\n this._mapsWrapper.fitBounds(bounds, padding);\n }\n\n private _isLatLngBoundsLiteral(bounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral): boolean {\n return bounds != null && (bounds as any).extend === undefined;\n }\n\n private _handleMapCenterChange() {\n const s = this._mapsWrapper.subscribeToMapEvent('center_changed').subscribe(() => {\n this._mapsWrapper.getCenter().then((center: google.maps.LatLng) => {\n this.latitude = center.lat();\n this.longitude = center.lng();\n this.centerChange.emit({lat: this.latitude, lng: this.longitude} as google.maps.LatLngLiteral);\n });\n });\n this._observableSubscriptions.push(s);\n }\n\n private _handleBoundsChange() {\n const s = this._mapsWrapper.subscribeToMapEvent('bounds_changed').subscribe(() => {\n this._mapsWrapper.getBounds().then(\n (bounds: google.maps.LatLngBounds) => { this.boundsChange.emit(bounds); });\n });\n this._observableSubscriptions.push(s);\n }\n\n private _handleMapTypeIdChange() {\n const s = this._mapsWrapper.subscribeToMapEvent('maptypeid_changed').subscribe(() => {\n this._mapsWrapper.getMapTypeId().then(\n (mapTypeId: google.maps.MapTypeId) => { this.mapTypeIdChange.emit(mapTypeId); });\n });\n this._observableSubscriptions.push(s);\n }\n\n private _handleMapZoomChange() {\n const s = this._mapsWrapper.subscribeToMapEvent('zoom_changed').subscribe(() => {\n this._mapsWrapper.getZoom().then((z: number) => {\n this.zoom = z;\n this.zoomChange.emit(z);\n });\n });\n this._observableSubscriptions.push(s);\n }\n\n private _handleIdleEvent() {\n const s = this._mapsWrapper.subscribeToMapEvent('idle').subscribe(\n () => { this.idle.emit(void 0); });\n this._observableSubscriptions.push(s);\n }\n\n private _handleTilesLoadedEvent() {\n const s = this._mapsWrapper.subscribeToMapEvent('tilesloaded').subscribe(\n () => this.tilesLoaded.emit(void 0),\n );\n this._observableSubscriptions.push(s);\n }\n\n private _handleMapMouseEvents() {\n type Event = { name: 'rightclick' | 'click' | 'dblclick', emitter: EventEmitter<google.maps.MouseEvent> };\n\n const events: Event[] = [\n {name: 'click', emitter: this.mapClick},\n {name: 'rightclick', emitter: this.mapRightClick},\n {name: 'dblclick', emitter: this.mapDblClick},\n ];\n\n events.forEach(e => {\n const s = this._mapsWrapper.subscribeToMapEvent(e.name).subscribe(\n ([event]) => {\n // the placeId will be undefined in case the event was not an IconMouseEvent (google types)\n if ( (event as google.maps.IconMouseEvent).placeId && !this.showDefaultInfoWindow) {\n event.stop();\n }\n e.emitter.emit(event);\n });\n this._observableSubscriptions.push(s);\n });\n }\n\n _handleControlChange() {\n this._setControls();\n this.mapControls.changes.subscribe(() => this._setControls());\n }\n\n _setControls() {\n const controlOptions: Partial<google.maps.MapOptions> = {\n fullscreenControl: !this.disableDefaultUI,\n mapTypeControl: false,\n panControl: false,\n rotateControl: false,\n scaleControl: false,\n streetViewControl: !this.disableDefaultUI,\n zoomControl: !this.disableDefaultUI,\n };\n\n this._mapsWrapper.getNativeMap().then(() => {\n this.mapControls.forEach(control => Object.assign(controlOptions, control.getOptions()));\n this._mapsWrapper.setMapOptions(controlOptions);\n });\n }\n}\n","import { AfterContentInit, ContentChildren, Directive, EventEmitter, forwardRef, Input, OnChanges, OnDestroy, Output, QueryList, SimpleChange } from '@angular/core';\nimport { Observable, ReplaySubject, Subscription } from 'rxjs';\nimport { FitBoundsAccessor, FitBoundsDetails } from '../services/fit-bounds';\nimport { MarkerManager } from '../services/managers/marker-manager';\nimport { AgmInfoWindow } from './info-window';\n\nlet markerId = 0;\n\n/**\n * AgmMarker renders a map marker inside a {@link AgmMap}.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * .agm-map-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-marker [latitude]=\"lat\" [longitude]=\"lng\" [label]=\"'M'\">\n * </agm-marker>\n * </agm-map>\n * `\n * })\n * ```\n */\n@Directive({\n selector: 'agm-marker',\n providers: [\n { provide: FitBoundsAccessor, useExisting: forwardRef(() => AgmMarker) },\n ],\n})\nexport class AgmMarker implements OnDestroy, OnChanges, AfterContentInit, FitBoundsAccessor {\n /**\n * The latitude position of the marker.\n */\n @Input() latitude: number;\n\n /**\n * The longitude position of the marker.\n */\n @Input() longitude: number;\n\n /**\n * The title of the marker.\n */\n @Input() title: string;\n\n /**\n * The label (a single uppercase character) for the marker.\n */\n @Input() label: string | google.maps.MarkerLabel;\n\n /**\n * If true, the marker can be dragged. Default value is false.\n */\n // tslint:disable-next-line:no-input-rename\n @Input('markerDraggable') draggable = false;\n\n /**\n * Icon (the URL of the image) for the foreground.\n */\n @Input() iconUrl: string | google.maps.Icon | google.maps.Symbol;\n\n /**\n * If true, the marker is visible\n */\n @Input() visible = true;\n\n /**\n * Whether to automatically open the child info window when the marker is clicked.\n */\n @Input() openInfoWindow = true;\n\n /**\n * The marker's opacity between 0.0 and 1.0.\n */\n @Input() opacity = 1;\n\n /**\n * All markers are displayed on the map in order of their zIndex, with higher values displaying in\n * front of markers with lower values. By default, markers are displayed according to their\n * vertical position on screen, with lower markers appearing in front of markers further up the\n * screen.\n */\n @Input() zIndex = 1;\n\n /**\n * If true, the marker can be clicked. Default value is true.\n */\n // tslint:disable-next-line:no-input-rename\n @Input('markerClickable') clickable = true;\n\n /**\n * Which animation to play when marker is added to a map.\n * This can be 'BOUNCE' or 'DROP'\n */\n @Input() animation: keyof typeof google.maps.Animation;\n\n /**\n * This event is fired when the marker's animation property changes.\n */\n @Output() animationChange = new EventEmitter<keyof typeof google.maps.Animation>();\n\n /**\n * This event emitter gets emitted when the user clicks on the marker.\n */\n @Output() markerClick: EventEmitter<AgmMarker> = new EventEmitter<AgmMarker>();\n\n /**\n * This event emitter gets emitted when the user clicks twice on the marker.\n */\n @Output() markerDblClick: EventEmitter<AgmMarker> = new EventEmitter<AgmMarker>();\n\n /**\n * This event is fired when the user rightclicks on the marker.\n */\n @Output() markerRightClick: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * This event is fired when the user starts dragging the marker.\n */\n @Output() dragStart: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is repeatedly fired while the user drags the marker.\n */\n // tslint:disable-next-line: no-output-native\n @Output() drag: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user stops dragging the marker.\n */\n @Output() dragEnd: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user mouses over the marker.\n */\n @Output() mouseOver: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user mouses outside the marker.\n */\n @Output() mouseOut: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /** @internal */\n @ContentChildren(AgmInfoWindow) infoWindow: QueryList<AgmInfoWindow> = new QueryList<AgmInfoWindow>();\n\n private _markerAddedToManger = false;\n private _id: string;\n private _observableSubscriptions: Subscription[] = [];\n\n protected readonly _fitBoundsDetails$: ReplaySubject<FitBoundsDetails> = new ReplaySubject<FitBoundsDetails>(1);\n\n constructor(private _markerManager: MarkerManager) { this._id = (markerId++).toString(); }\n\n /* @internal */\n ngAfterContentInit() {\n this.handleInfoWindowUpdate();\n this.infoWindow.changes.subscribe(() => this.handleInfoWindowUpdate());\n }\n\n private handleInfoWindowUpdate() {\n if (this.infoWindow.length > 1) {\n throw new Error('Expected no more than one info window.');\n }\n this.infoWindow.forEach(marker => {\n marker.hostMarker = this;\n });\n }\n\n /** @internal */\n ngOnChanges(changes: { [key: string]: SimpleChange }) {\n if (typeof this.latitude === 'string') {\n this.latitude = Number(this.latitude);\n }\n if (typeof this.longitude === 'string') {\n this.longitude = Number(this.longitude);\n }\n if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {\n return;\n }\n if (!this._markerAddedToManger) {\n this._markerManager.addMarker(this);\n this._updateFitBoundsDetails();\n this._markerAddedToManger = true;\n this._addEventListeners();\n return;\n }\n // tslint:disable: no-string-literal\n if (changes['latitude'] || changes['longitude']) {\n this._markerManager.updateMarkerPosition(this);\n this._updateFitBoundsDetails();\n }\n if (changes['title']) {\n this._markerManager.updateTitle(this);\n }\n if (changes['label']) {\n this._markerManager.updateLabel(this);\n }\n if (changes['draggable']) {\n this._markerManager.updateDraggable(this);\n }\n if (changes['iconUrl']) {\n this._markerManager.updateIcon(this);\n }\n if (changes['opacity']) {\n this._markerManager.updateOpacity(this);\n }\n if (changes['visible']) {\n this._markerManager.updateVisible(this);\n }\n if (changes['zIndex']) {\n this._markerManager.updateZIndex(this);\n }\n if (changes['clickable']) {\n this._markerManager.updateClickable(this);\n }\n if (changes['animation']) {\n this._markerManager.updateAnimation(this);\n }\n // tslint:enable: no-string-literal\n\n }\n\n /** @internal */\n getFitBoundsDetails$(): Observable<FitBoundsDetails> {\n return this._fitBoundsDetails$.asObservable();\n }\n\n protected _updateFitBoundsDetails() {\n this._fitBoundsDetails$.next({ latLng: { lat: this.latitude, lng: this.longitude } });\n }\n\n private _addEventListeners() {\n const cs = this._markerManager.createEventObservable('click', this).subscribe(() => {\n if (this.openInfoWindow) {\n this.infoWindow.forEach(infoWindow => infoWindow.open());\n }\n this.markerClick.emit(this);\n });\n this._observableSubscriptions.push(cs);\n\n const dcs = this._markerManager.createEventObservable('dblclick', this).subscribe(() => {\n this.markerDblClick.emit(null);\n });\n this._observableSubscriptions.push(dcs);\n\n const rc = this._markerManager.createEventObservable('rightclick', this).subscribe(() => {\n this.markerRightClick.emit(null);\n });\n this._observableSubscriptions.push(rc);\n\n const ds =\n this._markerManager.createEventObservable<google.maps.MouseEvent>('dragstart', this)\n .subscribe(e => this.dragStart.emit(e));\n this._observableSubscriptions.push(ds);\n\n const d =\n this._markerManager.createEventObservable<google.maps.MouseEvent>('drag', this)\n .subscribe(e => this.drag.emit(e));\n this._observableSubscriptions.push(d);\n\n const de =\n this._markerManager.createEventObservable<google.maps.MouseEvent>('dragend', this)\n .subscribe(e => this.dragEnd.emit(e));\n this._observableSubscriptions.push(de);\n\n const mover =\n this._markerManager.createEventObservable<google.maps.MouseEvent>('mouseover', this)\n .subscribe(e => this.mouseOver.emit(e));\n this._observableSubscriptions.push(mover);\n\n const mout =\n this._markerManager.createEventObservable<google.maps.MouseEvent>('mouseout', this)\n .subscribe(e => this.mouseOut.emit(e));\n this._observableSubscriptions.push(mout);\n\n const anChng =\n this._markerManager.createEventObservable<void>('animation_changed', this)\n .subscribe(() => {\n this.animationChange.emit(this.animation);\n });\n this._observableSubscriptions.push(anChng);\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n toString(): string { return 'AgmMarker-' + this._id.toString(); }\n\n /** @internal */\n ngOnDestroy() {\n this._markerManager.deleteMarker(this);\n // unsubscribe all registered observable subscriptions\n this._observableSubscriptions.forEach((s) => s.unsubscribe());\n }\n}\n","import { AfterContentInit, Directive, EventEmitter, Input, OnChanges, OnDestroy, Output, SimpleChanges } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { PolygonManager } from '../services/managers/polygon-manager';\nimport { MVCEvent } from '../utils/mvcarray-utils';\n\n/**\n * AgmPolygon renders a polygon on a {@link AgmMap}\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * agm-map {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-polygon [paths]=\"paths\">\n * </agm-polygon>\n * </agm-map>\n * `\n * })\n * export class MyMapCmp {\n * lat: number = 0;\n * lng: number = 0;\n * zoom: number = 10;\n * paths: LatLngLiteral[] = [\n * { lat: 0, lng: 10 },\n * { lat: 0, lng: 20 },\n * { lat: 10, lng: 20 },\n * { lat: 10, lng: 10 },\n * { lat: 0, lng: 10 }\n * ]\n * // Nesting paths will create a hole where they overlap;\n * nestedPaths: LatLngLiteral[][] = [[\n * { lat: 0, lng: 10 },\n * { lat: 0, lng: 20 },\n * { lat: 10, lng: 20 },\n * { lat: 10, lng: 10 },\n * { lat: 0, lng: 10 }\n * ], [\n * { lat: 0, lng: 15 },\n * { lat: 0, lng: 20 },\n * { lat: 5, lng: 20 },\n * { lat: 5, lng: 15 },\n * { lat: 0, lng: 15 }\n * ]]\n * }\n * ```\n */\n@Directive({\n selector: 'agm-polygon',\n})\nexport class AgmPolygon implements OnDestroy, OnChanges, AfterContentInit {\n /**\n * Indicates whether this Polygon handles mouse events. Defaults to true.\n */\n @Input() clickable = true;\n\n /**\n * If set to true, the user can drag this shape over the map. The geodesic\n * property defines the mode of dragging. Defaults to false.\n */\n // tslint:disable-next-line:no-input-rename\n @Input('polyDraggable') draggable = false;\n\n /**\n * If set to true, the user can edit this shape by dragging the control\n * points shown at the vertices and on each segment. Defaults to false.\n */\n @Input() editable = false;\n\n /**\n * The fill color. All CSS3 colors are supported except for extended\n * named colors.\n */\n @Input() fillColor: string;\n\n /**\n * The fill opacity between 0.0 and 1.0\n */\n @Input() fillOpacity: number;\n\n /**\n * When true, edges of the polygon are interpreted as geodesic and will\n * follow the curvature of the Earth. When false, edges of the polygon are\n * rendered as straight lines in screen space. Note that the shape of a\n * geodesic polygon may appear to change when dragged, as the dimensions\n * are maintained relative to the surface of the earth. Defaults to false.\n */\n @Input() geodesic = false;\n\n /**\n * The ordered sequence of coordinates that designates a closed loop.\n * Unlike polylines, a polygon may consist of one or more paths.\n * As a result, the paths property may specify one or more arrays of\n * LatLng coordinates. Paths are closed automatically; do not repeat the\n * first vertex of the path as the last vertex. Simple polygons may be\n * defined using a single array of LatLngs. More complex polygons may\n * specify an array of arrays. Any simple arrays are converted into Arrays.\n * Inserting or removing LatLngs from the Array will automatically update\n * the polygon on the map.\n */\n @Input() paths: google.maps.LatLng[] | google.maps.LatLng[][] |\n google.maps.MVCArray<google.maps.LatLng> | google.maps.MVCArray<google.maps.MVCArray<google.maps.LatLng>> |\n google.maps.LatLngLiteral[] | google.maps.LatLngLiteral[][] = [];\n\n /**\n * The stroke color. All CSS3 colors are supported except for extended\n * named colors.\n */\n @Input() strokeColor: string;\n\n /**\n * The stroke opacity between 0.0 and 1.0\n */\n @Input() strokeOpacity: number;\n\n /**\n * The stroke width in pixels.\n */\n @Input() strokeWeight: number;\n\n /**\n * Whether this polygon is visible on the map. Defaults to true.\n */\n @Input() visible: boolean;\n\n /**\n * The zIndex compared to other polys.\n */\n @Input() zIndex: number;\n\n /**\n * This event is fired when the DOM click event is fired on the Polygon.\n */\n @Output() polyClick: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired when the DOM dblclick event is fired on the Polygon.\n */\n @Output() polyDblClick: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is repeatedly fired while the user drags the polygon.\n */\n @Output() polyDrag: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user stops dragging the polygon.\n */\n @Output() polyDragEnd: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user starts dragging the polygon.\n */\n @Output() polyDragStart: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mousedown event is fired on the Polygon.\n */\n @Output() polyMouseDown: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired when the DOM mousemove event is fired on the Polygon.\n */\n @Output() polyMouseMove: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired on Polygon mouseout.\n */\n @Output() polyMouseOut: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired on Polygon mouseover.\n */\n @Output() polyMouseOver: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired whe the DOM mouseup event is fired on the Polygon\n */\n @Output() polyMouseUp: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired when the Polygon is right-clicked on.\n */\n @Output() polyRightClick: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired after Polygon first path changes.\n */\n @Output() polyPathsChange = new EventEmitter<MVCEvent<google.maps.LatLng[] | google.maps.LatLngLiteral[]>>();\n\n private static _polygonOptionsAttributes: string[] = [\n 'clickable', 'draggable', 'editable', 'fillColor', 'fillOpacity', 'geodesic', 'icon', 'map',\n 'paths', 'strokeColor', 'strokeOpacity', 'strokeWeight', 'visible', 'zIndex', 'draggable',\n 'editable', 'visible',\n ];\n\n private _id: string;\n private _polygonAddedToManager = false;\n private _subscriptions: Subscription[] = [];\n\n constructor(private _polygonManager: PolygonManager) { }\n\n /** @internal */\n ngAfterContentInit() {\n if (!this._polygonAddedToManager) {\n this._init();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): any {\n if (!this._polygonAddedToManager) {\n this._init();\n return;\n }\n\n this._polygonManager.setPolygonOptions(this, this._updatePolygonOptions(changes));\n }\n\n private _init() {\n this._polygonManager.addPolygon(this);\n this._polygonAddedToManager = true;\n this._addEventListeners();\n }\n\n private _addEventListeners() {\n const handlers = [\n { name: 'click', handler: (ev: google.maps.PolyMouseEvent) => this.polyClick.emit(ev) },\n { name: 'dblclick', handler: (ev: google.maps.PolyMouseEvent) => this.polyDblClick.emit(ev) },\n { name: 'drag', handler: (ev: google.maps.MouseEvent) => this.polyDrag.emit(ev) },\n { name: 'dragend', handler: (ev: google.maps.MouseEvent) => this.polyDragEnd.emit(ev) },\n { name: 'dragstart', handler: (ev: google.maps.MouseEvent) => this.polyDragStart.emit(ev) },\n { name: 'mousedown', handler: (ev: google.maps.PolyMouseEvent) => this.polyMouseDown.emit(ev) },\n { name: 'mousemove', handler: (ev: google.maps.PolyMouseEvent) => this.polyMouseMove.emit(ev) },\n { name: 'mouseout', handler: (ev: google.maps.PolyMouseEvent) => this.polyMouseOut.emit(ev) },\n { name: 'mouseover', handler: (ev: google.maps.PolyMouseEvent) => this.polyMouseOver.emit(ev) },\n { name: 'mouseup', handler: (ev: google.maps.PolyMouseEvent) => this.polyMouseUp.emit(ev) },\n { name: 'rightclick', handler: (ev: google.maps.PolyMouseEvent) => this.polyRightClick.emit(ev) },\n ];\n handlers.forEach((obj) => {\n const os = this._polygonManager.createEventObservable(obj.name, this).subscribe(obj.handler);\n this._subscriptions.push(os);\n });\n\n this._polygonManager.createPathEventObservable(this)\n .then(paths$ => {\n const os = paths$.subscribe(pathEvent => this.polyPathsChange.emit(pathEvent));\n this._subscriptions.push(os);\n });\n }\n\n private _updatePolygonOptions(changes: SimpleChanges): google.maps.PolygonOptions {\n return Object.keys(changes)\n .filter(k => AgmPolygon._polygonOptionsAttributes.indexOf(k) !== -1)\n .reduce((obj: any, k: string) => {\n obj[k] = changes[k].currentValue;\n return obj;\n }, {});\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n ngOnDestroy() {\n this._polygonManager.deletePolygon(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach((s) => s.unsubscribe());\n }\n\n getPath(): Promise<google.maps.LatLng[]> {\n return this._polygonManager.getPath(this);\n }\n\n getPaths(): Promise<google.maps.LatLng[][]> {\n return this._polygonManager.getPaths(this);\n }\n}\n","import { Directive, Input, OnInit } from '@angular/core';\n\n/**\n * AgmPolylineIcon enables to add polyline sequences to add arrows, circle,\n * or custom icons either along the entire line, or in a specific part of it.\n * See https://developers.google.com/maps/documentation/javascript/shapes#polyline_customize\n *\n * ### Example\n * ```html\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-polyline>\n * <agm-icon-sequence [fixedRotation]=\"true\" [path]=\"'FORWARD_OPEN_ARROW'\">\n * </agm-icon-sequence>\n * </agm-polyline>\n * </agm-map>\n * ```\n */\n@Directive({selector: 'agm-polyline agm-icon-sequence'})\nexport class AgmPolylineIcon implements OnInit{\n\n /**\n * If `true`, each icon in the sequence has the same fixed rotation regardless of the\n * angle of the edge on which it lies. Defaults to `false`, in which case each icon\n * in the sequence is rotated to align with its edge.\n */\n @Input() fixedRotation: boolean;\n\n /**\n * The distance from the start of the line at which an icon is to be rendered. This\n * distance may be expressed as a percentage of line's length (e.g. '50%') or in pixels\n * (e.g. '50px'). Defaults to '100%'.\n */\n @Input() offset: string;\n\n /**\n * The distance between consecutive icons on the line. This distance may be expressed as\n * a percentage of the line's length (e.g. '50%') or in pixels (e.g. '50px'). To disable\n * repeating of the icon, specify '0'. Defaults to '0'.\n */\n @Input() repeat: string;\n\n /**\n * The x coordinate of the position of the symbol relative to the polyline. The coordinate\n * of the symbol's path is translated _left_ by the anchor's x coordinate. By default, a\n * symbol is anchored at (0, 0). The position is expressed in the same coordinate system as the\n * symbol's path.\n */\n @Input() anchorX: number;\n\n /**\n * The y coordinate of the position of the symbol relative to the polyline. The coordinate\n * of the symbol's path is translated _up_ by the anchor's y coordinate. By default, a\n * symbol is anchored at (0, 0). The position is expressed in the same coordinate system as the\n * symbol's path.\n */\n @Input() anchorY: number;\n\n /**\n * The symbol's fill color. All CSS3 colors are supported except for extended named\n * colors. Defaults to the stroke color of the corresponding polyline.\n */\n @Input() fillColor: string;\n\n /**\n * The symbol's fill opacity. Defaults to 0.\n */\n @Input() fillOpacity: number;\n\n /**\n * The symbol's path, which is a built-in symbol path, or a custom path expressed using\n * SVG path notation. Required.\n */\n @Input() path: keyof typeof google.maps.SymbolPath | string;\n\n /**\n * The angle by which to rotate the symbol, expressed clockwise in degrees.\n * Defaults to 0. A symbol where `fixedRotation` is `false` is rotated relative to\n * the angle of the edge on which it lies.\n */\n @Input() rotation: number;\n\n /**\n * The amount by which the symbol is scaled in size. Defaults to the stroke weight\n * of the polyline; after scaling, the symbol must lie inside a square 22 pixels in\n * size centered at the symbol's anchor.\n */\n @Input() scale: number;\n\n /**\n * The symbol's stroke color. All CSS3 colors are supported except for extended named\n * colors. Defaults to the stroke color of the polyline.\n */\n @Input() strokeColor: string;\n\n /**\n * The symbol's stroke opacity. Defaults to the stroke opacity of the polyline.\n */\n @Input() strokeOpacity: number;\n\n /**\n * The symbol's stroke weight. Defaults to the scale of the symbol.\n */\n @Input() strokeWeight: number;\n\n ngOnInit(): void {\n if (this.path == null) {\n throw new Error('Icon Sequence path is required');\n }\n }\n}\n","import { Directive, EventEmitter, forwardRef, Input, OnChanges, Output, SimpleChanges } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { FitBoundsAccessor, FitBoundsDetails } from '../services/fit-bounds';\n\n/**\n * AgmPolylinePoint represents one element of a polyline within a {@link\n * AgmPolyline}\n */\n@Directive({\n selector: 'agm-polyline-point',\n providers: [\n {provide: FitBoundsAccessor, useExisting: forwardRef(() => AgmPolylinePoint)},\n ],\n})\nexport class AgmPolylinePoint implements OnChanges, FitBoundsAccessor {\n /**\n * The latitude position of the point.\n */\n @Input() public latitude: number;\n\n /**\n * The longitude position of the point;\n */\n @Input() public longitude: number;\n\n /**\n * This event emitter gets emitted when the position of the point changed.\n */\n @Output() positionChanged: EventEmitter<google.maps.LatLngLiteral> = new EventEmitter<google.maps.LatLngLiteral>();\n\n constructor() {}\n\n ngOnChanges(changes: SimpleChanges): any {\n // tslint:disable: no-string-literal\n if (changes['latitude'] || changes['longitude']) {\n this.positionChanged.emit({\n lat: changes['latitude'] ? changes['latitude'].currentValue : this.latitude,\n lng: changes['longitude'] ? changes['longitude'].currentValue : this.longitude,\n });\n }\n // tslint:enable: no-string-literal\n }\n\n /** @internal */\n getFitBoundsDetails$(): Observable<FitBoundsDetails> {\n return this.positionChanged.pipe(\n startWith({lat: this.latitude, lng: this.longitude}),\n map(position => ({latLng: position}))\n );\n }\n}\n","import { AfterContentInit, ContentChildren, Directive, EventEmitter, Input, OnChanges, OnDestroy, Output, QueryList, SimpleChanges } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { PolylineManager } from '../services/managers/polyline-manager';\nimport { MVCEvent } from '../utils/mvcarray-utils';\nimport { AgmPolylineIcon } from './polyline-icon';\nimport { AgmPolylinePoint } from './polyline-point';\n\nlet polylineId = 0;\n/**\n * AgmPolyline renders a polyline on a {@link AgmMap}\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * .agm-map-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-polyline>\n * <agm-polyline-point [latitude]=\"latA\" [longitude]=\"lngA\">\n * </agm-polyline-point>\n * <agm-polyline-point [latitude]=\"latB\" [longitude]=\"lngB\">\n * </agm-polyline-point>\n * </agm-polyline>\n * </agm-map>\n * `\n * })\n * ```\n */\n@Directive({\n selector: 'agm-polyline',\n})\nexport class AgmPolyline implements OnDestroy, OnChanges, AfterContentInit {\n /**\n * Indicates whether this Polyline handles mouse events. Defaults to true.\n */\n @Input() clickable = true;\n\n /**\n * If set to true, the user can drag this shape over the map. The geodesic property defines the\n * mode of dragging. Defaults to false.\n */\n // tslint:disable-next-line:no-input-rename\n @Input('polylineDraggable') draggable = false;\n\n /**\n * If set to true, the user can edit this shape by dragging the control points shown at the\n * vertices and on each segment. Defaults to false.\n */\n @Input() editable = false;\n\n /**\n * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of\n * the Earth. When false, edges of the polygon are rendered as straight lines in screen space.\n * Note that the shape of a geodesic polygon may appear to change when dragged, as the dimensions\n * are maintained relative to the surface of the earth. Defaults to false.\n */\n @Input() geodesic = false;\n\n /**\n * The stroke color. All CSS3 colors are supported except for extended named colors.\n */\n @Input() strokeColor: string;\n\n /**\n * The stroke opacity between 0.0 and 1.0.\n */\n @Input() strokeOpacity: number;\n\n /**\n * The stroke width in pixels.\n */\n @Input() strokeWeight: number;\n\n /**\n * Whether this polyline is visible on the map. Defaults to true.\n */\n @Input() visible = true;\n\n /**\n * The zIndex compared to other polys.\n */\n @Input() zIndex: number;\n\n /**\n * This event is fired when the DOM click event is fired on the Polyline.\n */\n @Output() lineClick: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired when the DOM dblclick event is fired on the Polyline.\n */\n @Output() lineDblClick: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is repeatedly fired while the user drags the polyline.\n */\n @Output() lineDrag: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user stops dragging the polyline.\n */\n @Output() lineDragEnd: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user starts dragging the polyline.\n */\n @Output() lineDragStart: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mousedown event is fired on the Polyline.\n */\n @Output() lineMouseDown: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired when the DOM mousemove event is fired on the Polyline.\n */\n @Output() lineMouseMove: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired on Polyline mouseout.\n */\n @Output() lineMouseOut: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired on Polyline mouseover.\n */\n @Output() lineMouseOver: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired whe the DOM mouseup event is fired on the Polyline\n */\n @Output() lineMouseUp: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired when the Polyline is right-clicked on.\n */\n @Output() lineRightClick: EventEmitter<google.maps.PolyMouseEvent> = new EventEmitter<google.maps.PolyMouseEvent>();\n\n /**\n * This event is fired after Polyline's path changes.\n */\n @Output() polyPathChange = new EventEmitter<MVCEvent<google.maps.LatLng>>();\n\n /**\n * @internal\n */\n @ContentChildren(AgmPolylinePoint) points: QueryList<AgmPolylinePoint>;\n\n @ContentChildren(AgmPolylineIcon) iconSequences: QueryList<AgmPolylineIcon>;\n\n private static _polylineOptionsAttributes: string[] = [\n 'draggable', 'editable', 'visible', 'geodesic', 'strokeColor', 'strokeOpacity', 'strokeWeight',\n 'zIndex',\n ];\n\n private _id: string;\n private _polylineAddedToManager = false;\n private _subscriptions: Subscription[] = [];\n\n constructor(private _polylineManager: PolylineManager) { this._id = (polylineId++).toString(); }\n\n /** @internal */\n ngAfterContentInit() {\n if (this.points.length) {\n this.points.forEach((point: AgmPolylinePoint) => {\n const s = point.positionChanged.subscribe(\n () => { this._polylineManager.updatePolylinePoints(this); });\n this._subscriptions.push(s);\n });\n }\n if (!this._polylineAddedToManager) {\n this._init();\n }\n const pointSub = this.points.changes.subscribe(() => this._polylineManager.updatePolylinePoints(this));\n this._subscriptions.push(pointSub);\n this._polylineManager.updatePolylinePoints(this);\n\n const iconSub = this.iconSequences.changes.subscribe(() => this._polylineManager.updateIconSequences(this));\n this._subscriptions.push(iconSub);\n }\n\n ngOnChanges(changes: SimpleChanges): any {\n if (!this._polylineAddedToManager) {\n this._init();\n return;\n }\n\n const options: {[propName: string]: any} = {};\n const optionKeys = Object.keys(changes).filter(\n k => AgmPolyline._polylineOptionsAttributes.indexOf(k) !== -1);\n optionKeys.forEach(k => options[k] = changes[k].currentValue);\n this._polylineManager.setPolylineOptions(this, options);\n }\n\n getPath(): Promise<google.maps.LatLng[]> {\n return this._polylineManager.getPath(this);\n }\n\n private _init() {\n this._polylineManager.addPolyline(this);\n this._polylineAddedToManager = true;\n this._addEventListeners();\n }\n\n private _addEventListeners() {\n const handlers = [\n {name: 'click', handler: (ev: google.maps.PolyMouseEvent) => this.lineClick.emit(ev)},\n {name: 'dblclick', handler: (ev: google.maps.PolyMouseEvent) => this.lineDblClick.emit(ev)},\n {name: 'drag', handler: (ev: google.maps.MouseEvent) => this.lineDrag.emit(ev)},\n {name: 'dragend', handler: (ev: google.maps.MouseEvent) => this.lineDragEnd.emit(ev)},\n {name: 'dragstart', handler: (ev: google.maps.MouseEvent) => this.lineDragStart.emit(ev)},\n {name: 'mousedown', handler: (ev: google.maps.PolyMouseEvent) => this.lineMouseDown.emit(ev)},\n {name: 'mousemove', handler: (ev: google.maps.PolyMouseEvent) => this.lineMouseMove.emit(ev)},\n {name: 'mouseout', handler: (ev: google.maps.PolyMouseEvent) => this.lineMouseOut.emit(ev)},\n {name: 'mouseover', handler: (ev: google.maps.PolyMouseEvent) => this.lineMouseOver.emit(ev)},\n {name: 'mouseup', handler: (ev: google.maps.PolyMouseEvent) => this.lineMouseUp.emit(ev)},\n {name: 'rightclick', handler: (ev: google.maps.PolyMouseEvent) => this.lineRightClick.emit(ev)},\n ];\n handlers.forEach((obj) => {\n const os = this._polylineManager.createEventObservable(obj.name, this).subscribe(obj.handler);\n this._subscriptions.push(os);\n });\n\n this._polylineManager.createPathEventObservable(this).then((ob$) => {\n const os = ob$.subscribe(pathEvent => this.polyPathChange.emit(pathEvent));\n this._subscriptions.push(os);\n });\n }\n\n /** @internal */\n _getPoints(): AgmPolylinePoint[] {\n if (this.points) {\n return this.points.toArray();\n }\n return [];\n }\n\n _getIcons(): Array<AgmPolylineIcon> {\n if (this.iconSequences) {\n return this.iconSequences.toArray();\n }\n return [];\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n ngOnDestroy() {\n this._polylineManager.deletePolyline(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach((s) => s.unsubscribe());\n }\n}\n","import {\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n SimpleChange,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { RectangleManager } from '../services/managers/rectangle-manager';\n\n@Directive({\n selector: 'agm-rectangle',\n})\nexport class AgmRectangle implements OnInit, OnChanges, OnDestroy {\n /**\n * The north position of the rectangle (required).\n */\n @Input() north: number;\n\n /**\n * The east position of the rectangle (required).\n */\n @Input() east: number;\n\n /**\n * The south position of the rectangle (required).\n */\n @Input() south: number;\n\n /**\n * The west position of the rectangle (required).\n */\n @Input() west: number;\n\n /**\n * Indicates whether this Rectangle handles mouse events. Defaults to true.\n */\n @Input() clickable = true;\n\n /**\n * If set to true, the user can drag this rectangle over the map. Defaults to false.\n */\n // tslint:disable-next-line:no-input-rename\n @Input('rectangleDraggable') draggable = false;\n\n /**\n * If set to true, the user can edit this rectangle by dragging the control points shown at\n * the center and around the circumference of the rectangle. Defaults to false.\n */\n @Input() editable = false;\n\n /**\n * The fill color. All CSS3 colors are supported except for extended named colors.\n */\n @Input() fillColor: string;\n\n /**\n * The fill opacity between 0.0 and 1.0.\n */\n @Input() fillOpacity: number;\n\n /**\n * The stroke color. All CSS3 colors are supported except for extended named colors.\n */\n @Input() strokeColor: string;\n\n /**\n * The stroke opacity between 0.0 and 1.0\n */\n @Input() strokeOpacity: number;\n\n /**\n * The stroke position. Defaults to CENTER.\n * This property is not supported on Internet Explorer 8 and earlier.\n */\n @Input() strokePosition: keyof typeof google.maps.StrokePosition = 'CENTER';\n\n /**\n * The stroke width in pixels.\n */\n @Input() strokeWeight = 0;\n\n /**\n * Whether this rectangle is visible on the map. Defaults to true.\n */\n @Input() visible = true;\n\n /**\n * The zIndex compared to other polys.\n */\n @Input() zIndex: number;\n\n /**\n * This event is fired when the rectangle's is changed.\n */\n @Output()\n boundsChange: EventEmitter<google.maps.LatLngBoundsLiteral> = new EventEmitter<\n google.maps.LatLngBoundsLiteral\n >();\n\n /**\n * This event emitter gets emitted when the user clicks on the rectangle.\n */\n @Output()\n rectangleClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event emitter gets emitted when the user clicks on the rectangle.\n */\n @Output()\n rectangleDblClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is repeatedly fired while the user drags the rectangle.\n */\n // tslint:disable-next-line: no-output-native\n @Output() drag: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user stops dragging the rectangle.\n */\n @Output() dragEnd: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the user starts dragging the rectangle.\n */\n @Output()\n dragStart: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mousedown event is fired on the rectangle.\n */\n @Output()\n mouseDown: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mousemove event is fired on the rectangle.\n */\n @Output()\n mouseMove: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired on rectangle mouseout.\n */\n @Output() mouseOut: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired on rectangle mouseover.\n */\n @Output()\n mouseOver: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the DOM mouseup event is fired on the rectangle.\n */\n @Output() mouseUp: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n /**\n * This event is fired when the rectangle is right-clicked on.\n */\n @Output()\n rightClick: EventEmitter<google.maps.MouseEvent> = new EventEmitter<google.maps.MouseEvent>();\n\n private _rectangleAddedToManager = false;\n\n private static _mapOptions: string[] = [\n 'fillColor',\n 'fillOpacity',\n 'strokeColor',\n 'strokeOpacity',\n 'strokePosition',\n 'strokeWeight',\n 'visible',\n 'zIndex',\n 'clickable',\n ];\n\n private _eventSubscriptions: Subscription[] = [];\n\n constructor(private _manager: RectangleManager) {}\n\n /** @internal */\n ngOnInit() {\n this._manager.addRectangle(this);\n this._rectangleAddedToManager = true;\n this._registerEventListeners();\n }\n\n /** @internal */\n ngOnChanges(changes: { [key: string]: SimpleChange }) {\n if (!this._rectangleAddedToManager) {\n return;\n }\n // tslint:disable: no-string-literal\n if (\n changes['north'] ||\n changes['east'] ||\n changes['south'] ||\n changes['west']\n ) {\n this._manager.setBounds(this);\n }\n if (changes['editable']) {\n this._manager.setEditable(this);\n }\n if (changes['draggable']) {\n this._manager.setDraggable(this);\n }\n if (changes['visible']) {\n this._manager.setVisible(this);\n }\n // tslint:enable: no-string-literal\n this._updateRectangleOptionsChanges(changes);\n }\n\n private _updateRectangleOptionsChanges(changes: {\n [propName: string]: SimpleChange;\n }) {\n const options: google.maps.RectangleOptions = {};\n const optionKeys = Object.keys(changes).filter(\n k => AgmRectangle._mapOptions.indexOf(k) !== -1,\n );\n optionKeys.forEach(k => {\n options[k] = changes[k].currentValue;\n });\n\n if (optionKeys.length > 0) {\n this._manager.setOptions(this, options);\n }\n }\n\n private _registerEventListeners() {\n const events: Map<string, EventEmitter<any>> = new Map<\n string,\n EventEmitter<any>\n >();\n events.set('bounds_changed', this.boundsChange);\n events.set('click', this.rectangleClick);\n events.set('dblclick', this.rectangleDblClick);\n events.set('drag', this.drag);\n events.set('dragend', this.dragEnd);\n events.set('dragStart', this.dragStart);\n events.set('mousedown', this.mouseDown);\n events.set('mousemove', this.mouseMove);\n events.set('mouseout', this.mouseOut);\n events.set('mouseover', this.mouseOver);\n events.set('mouseup', this.mouseUp);\n events.set('rightclick', this.rightClick);\n\n events.forEach((eventEmitter, eventName) => {\n this._eventSubscriptions.push(\n this._manager\n .createEventObservable<google.maps.MouseEvent>(eventName, this)\n .subscribe(value => {\n switch (eventName) {\n case 'bounds_changed':\n this._manager.getBounds(this).then(bounds =>\n eventEmitter.emit({\n north: bounds.getNorthEast().lat(),\n east: bounds.getNorthEast().lng(),\n south: bounds.getSouthWest().lat(),\n west: bounds.getSouthWest().lng(),\n } as google.maps.LatLngBoundsLiteral),\n );\n break;\n default:\n eventEmitter.emit(value);\n }\n }),\n );\n });\n }\n\n /** @internal */\n ngOnDestroy() {\n this._eventSubscriptions.forEach(s => s.unsubscribe());\n this._eventSubscriptions = null;\n this._manager.removeRectangle(this);\n }\n\n /**\n * Gets the LatLngBounds of this Rectangle.\n */\n getBounds(): Promise<google.maps.LatLngBounds> {\n return this._manager.getBounds(this);\n }\n}\n","import { Directive, Input, OnDestroy, OnInit } from '@angular/core';\nimport { LayerManager } from '../services/managers/layer-manager';\n\nlet layerId = 0;\n\n/*\n * This directive adds a transit layer to a google map instance\n * <agm-transit-layer [visible]=\"true|false\"> <agm-transit-layer>\n * */\n@Directive({\n selector: 'agm-transit-layer',\n})\nexport class AgmTransitLayer implements OnInit, OnDestroy{\n private _addedToManager = false;\n private _id: string = (layerId++).toString();\n\n /**\n * Hide/show transit layer\n */\n @Input() visible = true;\n\n constructor( private _manager: LayerManager ) {}\n\n ngOnInit() {\n if (this._addedToManager) {\n return;\n }\n this._manager.addTransitLayer(this);\n this._addedToManager = true;\n }\n\n /** @internal */\n id(): string { return this._id; }\n\n /** @internal */\n toString(): string { return `AgmTransitLayer-${this._id.toString()}`; }\n\n /** @internal */\n ngOnDestroy() {\n this._manager.deleteLayer(this);\n }\n\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { AgmBicyclingLayer } from './directives/bicycling-layer';\nimport { AgmCircle } from './directives/circle';\nimport { AgmDataLayer } from './directives/data-layer';\nimport { AgmFitBounds } from './directives/fit-bounds';\nimport { AgmInfoWindow } from './directives/info-window';\nimport { AgmKmlLayer } from './directives/kml-layer';\nimport { AgmFullscreenControl, AgmMap, AgmMapTypeControl, AgmPanControl, AgmRotateControl, AgmScaleControl, AgmStreetViewControl, AgmZoomControl } from './directives/map';\nimport { AgmMarker } from './directives/marker';\nimport { AgmPolygon } from './directives/polygon';\nimport { AgmPolyline } from './directives/polyline';\nimport { AgmPolylineIcon } from './directives/polyline-icon';\nimport { AgmPolylinePoint } from './directives/polyline-point';\nimport { AgmRectangle } from './directives/rectangle';\nimport { AgmTransitLayer } from './directives/transit-layer';\n\nimport { LazyMapsAPILoader, LazyMapsAPILoaderConfigLiteral, LAZY_MAPS_API_CONFIG } from './services/maps-api-loader/lazy-maps-api-loader';\nimport { MapsAPILoader } from './services/maps-api-loader/maps-api-loader';\n\nimport { BROWSER_GLOBALS_PROVIDERS } from './utils/browser-globals';\n\n/**\n * @internal\n */\nexport function coreDirectives() {\n return [\n AgmBicyclingLayer,\n AgmCircle,\n AgmDataLayer,\n AgmFitBounds,\n AgmFullscreenControl,\n AgmInfoWindow,\n AgmKmlLayer,\n AgmMap,\n AgmMapTypeControl,\n AgmMarker,\n AgmPanControl,\n AgmPolygon,\n AgmPolyline,\n AgmPolylineIcon,\n AgmPolylinePoint,\n AgmRectangle,\n AgmRotateControl,\n AgmScaleControl,\n AgmStreetViewControl,\n AgmTransitLayer,\n AgmZoomControl,\n ];\n}\n\n/**\n * The angular-google-maps core module. Contains all Directives/Services/Pipes\n * of the core module. Please use `AgmCoreModule.forRoot()` in your app module.\n */\n@NgModule({declarations: coreDirectives(), exports: coreDirectives()})\nexport class AgmCoreModule {\n /**\n * Please use this method when you register the module at the root level.\n */\n static forRoot(lazyMapsAPILoaderConfig?: LazyMapsAPILoaderConfigLiteral): ModuleWithProviders<AgmCoreModule> {\n return {\n ngModule: AgmCoreModule,\n providers: [\n ...BROWSER_GLOBALS_PROVIDERS, {provide: MapsAPILoader, useClass: LazyMapsAPILoader},\n {provide: LAZY_MAPS_API_CONFIG, useValue: lazyMapsAPILoaderConfig},\n ],\n };\n }\n}\n"]}
\No newline at end of file