UNPKG

ng2-bingmaps

Version:
2 lines 24.8 kB
System.registerDynamic("angular2-google-maps/directives/bing-map.js",["@angular/core","../services/bing-maps-api-wrapper","../services/marker-manager","../services/info-window-manager"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=a("../services/bing-maps-api-wrapper"),h=a("../services/marker-manager"),i=a("../services/info-window-manager"),j=function(){function a(a,b){this._elem=a,this._mapsWrapper=b,this._longitude=0,this._latitude=0,this._zoom=8,this.disableDoubleClickZoom=!1,this.scrollwheel=!0,this.keyboardShortcuts=!0,this.zoomControl=!0,this.mapClick=new f.EventEmitter,this.mapRightClick=new f.EventEmitter,this.mapDblClick=new f.EventEmitter,this.centerChange=new f.EventEmitter,this.nativeMap=null,this.nativeMapChange=new f.EventEmitter}return a.prototype.ngOnInit=function(){var a=this._elem.nativeElement.querySelector(".bing-map-container-inner");this._initMapInstance(a)},a.prototype._initMapInstance=function(a){var b=this;this._mapsWrapper.createMap(a,{center:{lat:this._latitude,lng:this._longitude},zoom:this._zoom}).then(function(a){b.nativeMap=a,b.nativeMapChange.emit(a)})},a.prototype.ngOnChanges=function(a){this._updateMapOptionsChanges(a)},a.prototype._updateMapOptionsChanges=function(b){var c={},d=Object.keys(b).filter(function(b){return a._mapOptionsAttributes.indexOf(b)!==-1});d.forEach(function(a){c[a]=b[a].currentValue})},a.prototype.triggerResize=function(){var a=this;return new Promise(function(b){setTimeout(function(){return a._mapsWrapper.triggerMapEvent("resize").then(function(){return b()})})})},Object.defineProperty(a.prototype,"zoom",{set:function(a){this._zoom=this._convertToDecimal(a,8),"number"==typeof this._zoom&&this._mapsWrapper.setZoom(this._zoom)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"longitude",{set:function(a){this._longitude=this._convertToDecimal(a),this._updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"latitude",{set:function(a){this._latitude=this._convertToDecimal(a),this._updateCenter()},enumerable:!0,configurable:!0}),a.prototype._convertToDecimal=function(a,b){return void 0===b&&(b=null),"string"==typeof a?parseFloat(a):"number"==typeof a?a:b},a.prototype._updateCenter=function(){"number"==typeof this._latitude&&"number"==typeof this._longitude&&this._mapsWrapper.setCenter({lat:this._latitude,lng:this._longitude})},a._mapOptionsAttributes=[],a=d([f.Component({selector:"bing-map",providers:[g.BingMapsAPIWrapper,h.MarkerManager,i.InfoWindowManager],inputs:["longitude","latitude","zoom","disableDoubleClickZoom","disableDefaultUI","scrollwheel","backgroundColor","draggableCursor","draggingCursor","keyboardShortcuts","zoomControl","nativeMap"],outputs:["mapClick","mapRightClick","mapDblClick","centerChange","nativeMapChange"],host:{"[class.bing-map-container]":"true"},styles:["\n .bing-map-container-inner {\n width: inherit;\n height: inherit;\n }\n .bing-map-content {\n display:none;\n }\n "],template:"\n <div class='bing-map-container-inner'></div>\n <div class='bing-map-content'>\n <ng-content></ng-content>\n </div>\n "}),e("design:paramtypes",[f.ElementRef,g.BingMapsAPIWrapper])],a)}();return b.BingMap=j,c.exports}),System.registerDynamic("angular2-google-maps/directives/bing-map-marker.js",["@angular/core","../services/marker-manager","./bing-map-info-window"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=a("../services/marker-manager"),h=a("./bing-map-info-window"),i=0,j=function(){function a(a){this._markerManager=a,this.draggable=!1,this.markerClick=new f.EventEmitter,this.dragEnd=new f.EventEmitter,this._markerAddedToManger=!1,this._id=(i++).toString()}return a.prototype.ngAfterContentInit=function(){null!=this._infoWindow&&(this._infoWindow.hostMarker=this,"number"==typeof this._infoWindow.latitude&&"number"==typeof this._infoWindow.longitude||(this._infoWindow.latitude=this.latitude,this._infoWindow.longitude=this.longitude))},a.prototype.ngOnChanges=function(a){if("number"==typeof this.latitude&&"number"==typeof this.longitude){if(!this._markerAddedToManger)return this._markerManager.addMarker(this),this._markerAddedToManger=!0,void this._addEventListeners();(a.latitude||a.longitude)&&(this._markerManager.updateMarkerPosition(this),"undefined"!=typeof this._infoWindow&&(this._infoWindow.latitude=this.latitude,this._infoWindow.longitude=this.longitude)),a.title&&this._markerManager.updateTitle(this),a.label&&this._markerManager.updateLabel(this),a.draggable&&this._markerManager.updateDraggable(this),a.iconUrl&&this._markerManager.updateIcon(this)}},a.prototype._addEventListeners=function(){var a=this;this._markerManager.createEventObservable("click",this).subscribe(function(){null!=a._infoWindow&&a._infoWindow.open(),a.markerClick.next(null)})},a.prototype.id=function(){return this._id},a.prototype.toString=function(){return"BingMapMarker-"+this._id.toString()},a.prototype.ngOnDestroy=function(){this._markerManager.deleteMarker(this)},d([f.ContentChild(h.BingMapInfoWindow),e("design:type",h.BingMapInfoWindow)],a.prototype,"_infoWindow",void 0),a=d([f.Directive({selector:"bing-map-marker",inputs:["latitude","longitude","title","label","draggable: markerDraggable","iconUrl"],outputs:["markerClick","dragEnd"]}),e("design:paramtypes",[g.MarkerManager])],a)}();return b.BingMapMarker=j,c.exports}),System.registerDynamic("angular2-google-maps/directives/bing-map-info-window.js",["@angular/core","../services/info-window-manager","./bing-map-info-window-action"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=a("../services/info-window-manager"),h=a("./bing-map-info-window-action"),i=0,j=function(){function a(a){this._infoWindowManager=a,this.infoWindowClose=new f.EventEmitter,this._id=(i++).toString()}return a.prototype.ngOnChanges=function(a){},a.prototype.open=function(){return this._infoWindowManager.open(this)},a.prototype.close=function(){var a=this;return this._infoWindowManager.close().then(function(){a.infoWindowClose.emit(void 0)})},a.prototype.id=function(){return this._id},a.prototype.toString=function(){return"BingMapInfoWindow-"+this._id.toString()},a._infoWindowOptionsInputs=["disableAutoPan","maxWidth","title","description"],d([f.ContentChildren(h.BingMapInfoWindowAction),e("design:type",f.QueryList)],a.prototype,"infoWindowActions",void 0),a=d([f.Component({selector:"bing-map-info-window",inputs:["latitude","longitude","disableAutoPan","title","description","height","width"],template:"",outputs:["infoWindowClose"]}),e("design:paramtypes",[g.InfoWindowManager])],a)}();return b.BingMapInfoWindow=j,c.exports}),System.registerDynamic("angular2-google-maps/directives/bing-map-info-window-action.js",["@angular/core"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=function(){function a(){this.actionClicked=new f.EventEmitter}return d([f.Input(),e("design:type",String)],a.prototype,"label",void 0),d([f.Output(),e("design:type",f.EventEmitter)],a.prototype,"actionClicked",void 0),a=d([f.Directive({selector:"bing-map-info-window-action"}),e("design:paramtypes",[])],a)}();return b.BingMapInfoWindowAction=g,c.exports}),System.registerDynamic("angular2-google-maps/directives.js",["./directives/bing-map","./directives/bing-map-marker","./directives/bing-map-info-window","./directives/bing-map-info-window-action"],!0,function(a,b,c){"use strict";var d=(this||self,a("./directives/bing-map")),e=a("./directives/bing-map-marker"),f=a("./directives/bing-map-info-window"),g=a("./directives/bing-map-info-window-action"),h=a("./directives/bing-map");b.BingMap=h.BingMap;var i=a("./directives/bing-map-marker");b.BingMapMarker=i.BingMapMarker;var j=a("./directives/bing-map-info-window");return b.BingMapInfoWindow=j.BingMapInfoWindow,b.NG2_BINGMAPS_DIRECTIVES=[d.BingMap,e.BingMapMarker,f.BingMapInfoWindow,g.BingMapInfoWindowAction],c.exports}),System.registerDynamic("angular2-google-maps/services/maps-api-loader/noop-maps-api-loader.js",[],!0,function(a,b,c){"use strict";var d=(this||self,function(){function a(){}return a.prototype.load=function(){throw new Error("todo")},a}());return b.NoOpMapsAPILoader=d,c.exports}),System.registerDynamic("angular2-google-maps/services/marker-manager.js",["@angular/core","rxjs/Observable","./bing-maps-api-wrapper"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=a("rxjs/Observable"),h=a("./bing-maps-api-wrapper"),i=function(){function a(a,b){this._mapsWrapper=a,this._zone=b,this._markers=new Map}return a.prototype.deleteMarker=function(a){var b=this,c=this._markers.get(a);return null==c?Promise.resolve():c.then(function(c){return b._zone.run(function(){c.deleteMarker(),b._markers.delete(a)})})},a.prototype.updateMarkerPosition=function(a){return this._markers.get(a).then(function(b){return b.setPosition({lat:a.latitude,lng:a.longitude})})},a.prototype.updateTitle=function(a){return this._markers.get(a).then(function(b){return b.setTitle(a.title)})},a.prototype.updateLabel=function(a){return this._markers.get(a).then(function(b){b.setLabel(a.label)})},a.prototype.updateDraggable=function(a){return this._markers.get(a).then(function(b){return b.setDraggable(a.draggable)})},a.prototype.updateIcon=function(a){return this._markers.get(a).then(function(b){return b.setIcon(a.iconUrl)})},a.prototype.addMarker=function(a){var b=this._mapsWrapper.createMarker({position:{lat:a.latitude,lng:a.longitude},label:a.label,draggable:a.draggable,icon:a.iconUrl});this._markers.set(a,b)},a.prototype.getNativeMarker=function(a){return this._markers.get(a)},a.prototype.createEventObservable=function(a,b){var c=this;return g.Observable.create(function(d){c._markers.get(b).then(function(b){b.addListener(a,function(a){return c._zone.run(function(){return d.next(a)})})})})},a=d([f.Injectable(),e("design:paramtypes",[h.BingMapsAPIWrapper,f.NgZone])],a)}();return b.MarkerManager=i,c.exports}),System.registerDynamic("angular2-google-maps/services/bing-maps-types.js",[],!0,function(a,b,c){"use strict";var d=(this||self,function(){function a(a,b){this.map=a,this.pushpin=b}return a.prototype.setPosition=function(a){this.pushpin.setLocation(new Microsoft.Maps.Location(a.lat,a.lng))},a.prototype.deleteMarker=function(){this.pushpin.setOptions({visible:!1})},a.prototype.setTitle=function(a){console.log("set title"),this.pushpin.setOptions({text:a})},a.prototype.setLabel=function(a){this.pushpin.setOptions({title:a})},a.prototype.setDraggable=function(a){this.pushpin.setOptions({draggable:a})},a.prototype.setIcon=function(a){this.pushpin.setOptions({icon:a})},a.prototype.getLabel=function(){return null},a.prototype.addListener=function(a,b){Microsoft.Maps.Events.addHandler(this.pushpin,a,function(a){b(a)})},a}());b.Marker=d,function(a){a[a.aerial=0]="aerial",a[a.auto=1]="auto",a[a.birdseye=2]="birdseye",a[a.collinsBart=3]="collinsBart",a[a.mercator=4]="mercator",a[a.ordnanceSurvey=5]="ordnanceSurvey",a[a.road=6]="road"}(b.MapTypeId||(b.MapTypeId={}));var e=(b.MapTypeId,function(){function a(a,b){this.map=a,this.infoBox=b}return a.prototype.close=function(){this.infoBox.setMap(null),this.infoBox.setOptions({visible:!1})},a.prototype.getPosition=function(){return{lat:this.infoBox.getLocation().latitude,lng:this.infoBox.getLocation().longitude}},a.prototype.open=function(){this.infoBox.setMap(this.map),this.infoBox.setOptions({visible:!0})},a.prototype.setOptions=function(a){this.infoBox.setOptions({title:a.title,description:a.title})},a.prototype.setPosition=function(a){this.infoBox.setLocation(new Microsoft.Maps.Location(a.lat,a.lng))},a}());return b.InfoWindow=e,c.exports}),System.registerDynamic("angular2-google-maps/services/bing-maps-api-wrapper.js",["@angular/core","rxjs/Observable","./maps-api-loader/maps-api-loader","./bing-maps-types","./maps-api-loader/lazy-maps-api-loader"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=a("rxjs/Observable"),h=a("./maps-api-loader/maps-api-loader"),i=a("./bing-maps-types"),j=a("./maps-api-loader/lazy-maps-api-loader"),k=function(){function a(a,b,c){var d=this;this._loader=a,this._zone=b,this._config=c,this.infoBox=null,this._mapResolver=null,this.nativeMap=new Promise(function(a){d._mapResolver=a})}return a.prototype.createMap=function(a,b){var c=this;return this._loader.load().then(function(){var d=new Microsoft.Maps.Map(a,{credentials:c._config.apiKey,center:new Microsoft.Maps.Location(b.center.lat,b.center.lng),zoom:b.zoom,mapTypeId:b.mapTypeId});c._mapResolver(d),c.infoBox=new Promise(function(a){c._infoBoxResolver=a});var e=new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0,0),{});return c._infoBoxResolver(e),d})},a.prototype.setMapOptions=function(a){this.nativeMap.then(function(b){b.setOptions({center:new Microsoft.Maps.Location(a.center.lat,a.center.lng),zoom:a.zoom,mapTypeId:a.mapTypeId})})},a.prototype.createMarker=function(a){return void 0===a&&(a={}),this.nativeMap.then(function(b){var c=new Microsoft.Maps.Location(a.position.lat,a.position.lng),d=new Microsoft.Maps.Pushpin(c);return b.entities.push(d),new i.Marker(b,d)})},a.prototype.getInfoWindow=function(a){var b=this;return this.nativeMap.then(function(c){return b.infoBox.then(function(b){if("undefined"==typeof a||null==a)return new i.InfoWindow(c,b);var d={visible:!1,title:a.title,location:new Microsoft.Maps.Location(a.position.lat,a.position.lng),description:a.description,actions:a.actions};return a.height>0&&(d.maxHeight=a.height),a.width>0&&(d.maxWidth=a.width),b.setOptions(d),new i.InfoWindow(c,b)})})},a.prototype.subscribeToMapEvent=function(a){var b=this;return g.Observable.create(function(c){b.nativeMap.then(function(d){Microsoft.Maps.Events.addHandler(d,a,function(a){b._zone.run(function(){return c.next(a)})})})})},a.prototype.setCenter=function(a){return this.nativeMap.then(function(b){return b.setView({center:new Microsoft.Maps.Location(a.lat,a.lng)})})},a.prototype.getZoom=function(){return this.nativeMap.then(function(a){return a.getZoom()})},a.prototype.setZoom=function(a){return this.nativeMap.then(function(b){return b.setView({zoom:a})})},a.prototype.getCenter=function(){return this.nativeMap.then(function(a){var b=a.getCenter();return{lat:b.latitude,lng:b.longitude}})},a.prototype.triggerMapEvent=function(a){return this.nativeMap.then(function(b){return Microsoft.Maps.Events.invoke(b,a,null)})},a=d([f.Injectable(),e("design:paramtypes",[h.MapsAPILoader,f.NgZone,j.LazyMapsAPILoaderConfig])],a)}();return b.BingMapsAPIWrapper=k,c.exports}),System.registerDynamic("angular2-google-maps/services/info-window-manager.js",["@angular/core","./bing-maps-api-wrapper"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=a("./bing-maps-api-wrapper"),h=function(){function a(a,b){this._mapsWrapper=a,this._zone=b}return a.prototype.setPosition=function(a){return this._mapsWrapper.getInfoWindow().then(function(b){return b.setPosition({lat:a.latitude,lng:a.longitude})})},a.prototype.close=function(){return this._mapsWrapper.getInfoWindow().then(function(a){return a.close()})},a.prototype.setOptions=function(a){return this._mapsWrapper.getInfoWindow().then(function(b){return b.setOptions(a)})},a.prototype.open=function(a){var b={title:a.title,description:a.description,height:+a.height,width:+a.width};return"number"==typeof a.latitude&&"number"==typeof a.longitude&&(b.position={lat:a.latitude,lng:a.longitude}),"undefined"!=typeof a.infoWindowActions&&a.infoWindowActions.length>0&&(b.actions=[],a.infoWindowActions.forEach(function(a){b.actions.push({label:a.label,eventHandler:function(){a.actionClicked.emit(null)}})})),this._mapsWrapper.getInfoWindow(b).then(function(a){a.open()})},a=d([f.Injectable(),e("design:paramtypes",[g.BingMapsAPIWrapper,f.NgZone])],a)}();return b.InfoWindowManager=h,c.exports}),System.registerDynamic("angular2-google-maps/services/maps-api-loader/maps-api-loader.js",["@angular/core"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),e=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},f=a("@angular/core"),g=function(){function a(){}return a=d([f.Injectable(),e("design:paramtypes",[])],a)}();return b.MapsAPILoader=g,c.exports}),System.registerDynamic("angular2-google-maps/services/maps-api-loader/lazy-maps-api-loader.js",["@angular/core","./maps-api-loader"],!0,function(a,b,c){"use strict";var d=(this||self,this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)}),e=this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g},f=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},g=this&&this.__param||function(a,b){return function(c,d){b(c,d,a)}},h=a("@angular/core"),i=a("./maps-api-loader");!function(a){a[a.HTTP=0]="HTTP",a[a.HTTPS=1]="HTTPS",a[a.AUTO=2]="AUTO"}(b.ScriptProtocol||(b.ScriptProtocol={}));var j=b.ScriptProtocol,k=function(){function a(){this.apiKey=null,this.clientId=null,this.channel=null,this.apiVersion="3",this.hostAndPath="www.bing.com/api/maps/mapcontrol",this.protocol=j.HTTPS,this.branch="release"}return a}();b.LazyMapsAPILoaderConfig=k;var l=new k,m=function(a){function b(b){a.call(this),this._config=b,null!==this._config&&void 0!==this._config||(this._config=l)}return d(b,a),b.prototype.load=function(){if(this._scriptLoadingPromise)return this._scriptLoadingPromise;var a=document.createElement("script");a.type="text/javascript",a.async=!0,a.defer=!0;var b="angular2bingmaps"+(new Date).getMilliseconds();return a.src=this._getScriptSrc(b),this._scriptLoadingPromise=new Promise(function(c,d){window[b]=function(){c()},a.onerror=function(a){d(a)}}),document.body.appendChild(a),this._scriptLoadingPromise},b.prototype._getScriptSrc=function(a){var b,c=this._config&&this._config.protocol||l.protocol;switch(c){case j.AUTO:b="";break;case j.HTTP:b="http:";break;case j.HTTPS:b="https:"}var d=this._config.hostAndPath||l.hostAndPath,e=this._config.branch||l.branch,f={callback:a};e&&(f.branch=e);var g=Object.keys(f).map(function(a,b){var c=0===b?"?":"&";return c+=a+"="+f[a]}).join("");return b+"//"+d+g},b=e([h.Injectable(),g(0,h.Optional()),f("design:paramtypes",[k])],b)}(i.MapsAPILoader);return b.LazyMapsAPILoader=m,c.exports}),System.registerDynamic("angular2-google-maps/services.js",["./services/maps-api-loader/maps-api-loader","./services/maps-api-loader/noop-maps-api-loader","./services/bing-maps-api-wrapper","./services/marker-manager","./services/info-window-manager","./services/maps-api-loader/lazy-maps-api-loader"],!0,function(a,b,c){"use strict";var d=(this||self,a("./services/maps-api-loader/maps-api-loader"));b.MapsAPILoader=d.MapsAPILoader;var e=a("./services/maps-api-loader/noop-maps-api-loader");b.NoOpMapsAPILoader=e.NoOpMapsAPILoader;var f=a("./services/bing-maps-api-wrapper");b.BingMapsAPIWrapper=f.BingMapsAPIWrapper;var g=a("./services/marker-manager");b.MarkerManager=g.MarkerManager;var h=a("./services/info-window-manager");b.InfoWindowManager=h.InfoWindowManager;var i=a("./services/maps-api-loader/lazy-maps-api-loader");return b.LazyMapsAPILoader=i.LazyMapsAPILoader,b.LazyMapsAPILoaderConfig=i.LazyMapsAPILoaderConfig,b.ScriptProtocol=i.ScriptProtocol,c.exports}),System.registerDynamic("angular2-google-maps/core.js",["@angular/core","./directives","./services/maps-api-loader/maps-api-loader","./services/maps-api-loader/lazy-maps-api-loader","./services"],!0,function(a,b,c){"use strict";function d(a){for(var c in a)b.hasOwnProperty(c)||(b[c]=a[c])}var e=(this||self,this&&this.__decorate||function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}),f=this&&this.__metadata||function(a,b){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(a,b)},g=a("@angular/core"),h=a("./directives"),i=a("./services/maps-api-loader/maps-api-loader"),j=a("./services/maps-api-loader/lazy-maps-api-loader");d(a("./directives")),d(a("./services")),b.NG2_BINGMAPS_PROVIDERS=[{provide:i.MapsAPILoader,useClass:j.LazyMapsAPILoader}];var k=function(){function a(){}return a.forRoot=function(c){return{ngModule:a,providers:[b.NG2_BINGMAPS_PROVIDERS,{provide:j.LazyMapsAPILoaderConfig,useValue:c}]}},a=e([g.NgModule({declarations:h.NG2_BINGMAPS_DIRECTIVES,exports:h.NG2_BINGMAPS_DIRECTIVES}),f("design:paramtypes",[])],a)}();return b.BingMapsModule=k,c.exports}); //# sourceMappingURL=angular2-google-maps.min.js.map