diff --git a/dist/react-leaflet-google.js b/dist/react-leaflet-google.js index cd50b76..1c1f722 100644 --- a/dist/react-leaflet-google.js +++ b/dist/react-leaflet-google.js @@ -107,13 +107,13 @@ return /******/ (function(modules) { // webpackBootstrap function GoogleLayer() { _classCallCheck(this, GoogleLayer); - return _possibleConstructorReturn(this, (GoogleLayer.__proto__ || Object.getPrototypeOf(GoogleLayer)).apply(this, arguments)); + return _possibleConstructorReturn(this, Object.getPrototypeOf(GoogleLayer).apply(this, arguments)); } _createClass(GoogleLayer, [{ key: 'componentWillMount', value: function componentWillMount() { - _get(GoogleLayer.prototype.__proto__ || Object.getPrototypeOf(GoogleLayer.prototype), 'componentWillMount', this).call(this); + _get(Object.getPrototypeOf(GoogleLayer.prototype), 'componentWillMount', this).call(this); var _props = this.props; var _map = _props.map; var _lc = _props.layerContainer; diff --git a/dist/react-leaflet-google.min.js b/dist/react-leaflet-google.min.js index c88d371..20f6361 100644 --- a/dist/react-leaflet-google.min.js +++ b/dist/react-leaflet-google.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-leaflet")):"function"==typeof define&&define.amd?define(["react","react-leaflet"],t):"object"==typeof exports?exports.ReactLeaflet=t(require("react"),require("react-leaflet")):e.ReactLeaflet=t(e.React,e[void 0])}(this,function(e,t){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleLayer=void 0;var i=o(1),r=n(i);t.GoogleLayer=r["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var o={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var o=0;o0&&(e+="&libraries="+l.LIBRARIES.join(",")),l.CLIENT&&(e+="&client="+l.CLIENT+"&v="+l.VERSION),l.CHANNEL&&(e+="&channel="+l.CHANNEL),l.LANGUAGE&&(e+="&language="+l.LANGUAGE),l.REGION&&(e+="®ion="+l.REGION),e},l.release=function(s){var c=function(){l.KEY=null,l.LIBRARIES=[],l.CLIENT=null,l.CHANNEL=null,l.LANGUAGE=null,l.REGION=null,l.VERSION=e,o=null,n=!1,i=[],r=[],"undefined"!=typeof window.google&&delete window.google,"undefined"!=typeof window[l.WINDOW_CALLBACK_NAME]&&delete window[l.WINDOW_CALLBACK_NAME],null!==a&&(l.createLoader=a,a=null),null!==t&&(t.parentElement.removeChild(t),t=null),s&&s()};n?l.load(function(){c()}):c()},l.onLoad=function(e){r.push(e)},l.makeMock=function(){a=l.createLoader,l.createLoader=function(){window.google=l._googleMockApiObject,window[l.WINDOW_CALLBACK_NAME]()}};var s=function(e){var t;for(n=!1,null===o&&(o=window.google),t=0;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var o=0;oe&&L.DomUtil.setOpacity(this._container,e)},setElementSize:function(e,t){e.style.width=t.x+"px",e.style.height=t.y+"px"},_initContainer:function(){var e=this._map._container,t=e.firstChild;this._container||(this._container=L.DomUtil.create("div","leaflet-google-layer leaflet-top leaflet-left"),this._container.id="_GMapContainer_"+L.Util.stamp(this),this._container.style.zIndex="auto"),e.insertBefore(this._container,t),this.setOpacity(this.options.opacity),this.setElementSize(this._container,this._map.getSize())},_initMapObject:function(){if(this._ready){this._google_center=new i.maps.LatLng(0,0);var e=new i.maps.Map(this._container,{center:this._google_center,zoom:0,tilt:0,mapTypeId:i.maps.MapTypeId[this._type],disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.mapOptions.styles,backgroundColor:this.options.mapOptions.backgroundColor}),t=this;this._reposition=i.maps.event.addListenerOnce(e,"center_changed",function(){t.onReposition()}),this._google=e,i.maps.event.addListenerOnce(e,"idle",function(){t._checkZoomLevels()}),i.maps.event.addListenerOnce(e,"tilesloaded",function(){t.fire("load")}),this.fire("MapObjectInitialized",{mapObject:e})}},_checkZoomLevels:function(){void 0!==this._map.getZoom()&&this._google.getZoom()!==this._map.getZoom()&&this._map.setZoom(this._google.getZoom())},_reset:function(){this._initContainer()},_update:function(){if(this._google){this._resize();var e=this._map.getCenter(),t=new i.maps.LatLng(e.lat,e.lng);this._google.setCenter(t),void 0!==this._map.getZoom()&&this._google.setZoom(Math.round(this._map.getZoom())),this._checkZoomLevels()}},_resize:function(){var e=this._map.getSize();this._container.style.width===e.x&&this._container.style.height===e.y||(this.setElementSize(this._container,e),this.onReposition())},_handleZoomAnim:function(e){var t=e.center,o=new i.maps.LatLng(t.lat,t.lng);this._google.setCenter(o),this._google.setZoom(Math.round(e.zoom))},onReposition:function(){this._google&&i.maps.event.trigger(this._google,"resize")}}),L.Google.asyncWait=[],L.Google.asyncInitialize=function(){var e;for(e=0;e0&&(e+="&libraries="+l.LIBRARIES.join(",")),l.CLIENT&&(e+="&client="+l.CLIENT+"&v="+l.VERSION),l.CHANNEL&&(e+="&channel="+l.CHANNEL),l.LANGUAGE&&(e+="&language="+l.LANGUAGE),l.REGION&&(e+="®ion="+l.REGION),e},l.release=function(s){var c=function(){l.KEY=null,l.LIBRARIES=[],l.CLIENT=null,l.CHANNEL=null,l.LANGUAGE=null,l.REGION=null,l.VERSION=e,o=null,n=!1,i=[],r=[],"undefined"!=typeof window.google&&delete window.google,"undefined"!=typeof window[l.WINDOW_CALLBACK_NAME]&&delete window[l.WINDOW_CALLBACK_NAME],null!==a&&(l.createLoader=a,a=null),null!==t&&(t.parentElement.removeChild(t),t=null),s&&s()};n?l.load(function(){c()}):c()},l.onLoad=function(e){r.push(e)},l.makeMock=function(){a=l.createLoader,l.createLoader=function(){window.google=l._googleMockApiObject,window[l.WINDOW_CALLBACK_NAME]()}};var s=function(e){var t;for(n=!1,null===o&&(o=window.google),t=0;t