Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@deck.gl/google-maps

Package Overview
Dependencies
Maintainers
10
Versions
400
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deck.gl/google-maps - npm Package Compare versions

Comparing version 8.0.0-alpha.2 to 8.0.0-beta.1

2

dist.min.js

@@ -1,1 +0,1 @@

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("deck"));else if("function"==typeof define&&define.amd)define(["deck"],t);else{var n="object"==typeof exports?t(require("deck")):t(e.deck);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(t,n){t.exports=e},function(e,t,n){(function(t){const o=n(5),i=("undefined"==typeof window?t:window).deck||{};if(!i.Layer)throw new Error("@deck.gl/core is not found");e.exports=Object.assign(i,o)}).call(this,n(4))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var o=n(0),i=n.n(o),r=n(1),a=n.n(r),s=n(2);function u(e){var t=e.getPanes().overlayLayer,n=document.createElement("canvas");return Object.assign(n.style,{position:"absolute"}),t.appendChild(n),n}function c(e){var t=e.props.userData._eventListeners;for(var n in t)t[n].remove();e.finalize(),e.canvas.parentNode.removeChild(e.canvas)}var l=function(){return!1},f=function(){function e(t){i()(this,e),this.props={},this._map=null;var n=new google.maps.OverlayView;n.onAdd=this._onAdd.bind(this),n.onRemove=this._onRemove.bind(this),n.draw=this._draw.bind(this),this._overlay=n,this.setProps(t)}return a()(e,[{key:"setMap",value:function(e){e!==this._map&&(this._map&&(this._overlay.setMap(null),this._map=null),e&&(this._map=e,this._overlay.setMap(e)))}},{key:"setProps",value:function(e){Object.assign(this.props,e),this._deck&&this._deck.setProps(this.props)}},{key:"pickObject",value:function(e){return this._deck&&this._deck.pickObject(e)}},{key:"pickMultipleObjects",value:function(e){return this._deck&&this._deck.pickMultipleObjects(e)}},{key:"pickObjects",value:function(e){return this._deck&&this._deck.pickObjects(e)}},{key:"finalize",value:function(){this.setMap(null),this._deck&&(c(this._deck),this._deck=null)}},{key:"_onAdd",value:function(){this._deck=function(e,t,n){if(n){if(n.props.userData._googleMap===e)return n;c(n)}var o={click:null,mousemove:null,mouseout:null};n=new s.Deck({canvas:u(t),initialViewState:{longitude:0,latitude:0,zoom:1},controller:!1,userData:{_googleMap:e,_eventListeners:o}});var i=function(t){o[t]=e.addListener(t,(function(e){return function(e,t,n){var o;switch(t){case"click":e._lastPointerDownInfo=e.pickObject({x:n.pixel.x,y:n.pixel.y}),o=e._onEvent;break;case"mousemove":t="pointermove",o=e._onPointerMove;break;case"mouseout":t="pointerleave",o=e._onPointerMove;break;default:return}o({type:t,offsetCenter:n.pixel,srcEvent:n})}(n,t,e)}))};for(var r in o)i(r);return n}(this._map,this._overlay,this._deck),this._deck.setProps(this.props)}},{key:"_onRemove",value:function(){this._deck.setProps({layerFilter:l})}},{key:"_draw",value:function(){var e=this._deck,t=function(e,t){var n=e.getDiv().firstChild,o=n.offsetWidth,i=n.offsetHeight,r=t.getProjection(),a=e.getBounds(),s=a.getNorthEast(),u=a.getSouthWest(),c=r.fromLatLngToDivPixel(s),l=r.fromLatLngToDivPixel(u),f=new google.maps.Point(0,0),p=r.fromContainerPixelToLatLng(f),d=r.fromLatLngToDivPixel(p),h=(c.x-l.x)/o,v=Math.log2(h)+e.getZoom()-1,y=new google.maps.Point(o/2,i/2),_=r.fromContainerPixelToLatLng(y),g=_.lat(),k=_.lng();return{width:o,height:i,left:d.x,top:d.y,zoom:v,pitch:e.getTilt(),latitude:g,longitude:k}}(this._map,this._overlay),n=t.width,o=t.height,i=t.left,r=t.top,a=t.zoom,s=t.pitch,u=t.latitude,c=t.longitude,f=a>=0&&0===s;e.canvas.style.left="".concat(i,"px"),e.canvas.style.top="".concat(r,"px"),e.setProps({width:n,height:o,viewState:{latitude:u,longitude:c,zoom:a},layerFilter:f?this.props.layerFilter:l}),e.redraw()}}]),e}();n.d(t,"GoogleMapsOverlay",(function(){return f}))}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("deck")):"function"==typeof define&&define.amd?define(["deck"],t):"object"==typeof exports?exports.deck=t(require("deck")):e.deck=t(e.deck)}(window,(function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(t,n){t.exports=e},function(e,t,n){(function(t){const o=n(5),i=("undefined"==typeof window?t:window).deck||{};if(!i.Layer)throw new Error("@deck.gl/core is not found");e.exports=Object.assign(i,o)}).call(this,n(4))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var o=n(0),i=n.n(o),r=n(1),a=n.n(r),s=n(2);function c(e){var t=e.getPanes().overlayLayer,n=document.createElement("canvas");return Object.assign(n.style,{position:"absolute"}),t.appendChild(n),n}function u(e){var t=e.props.userData._eventListeners;for(var n in t)t[n].remove();e.finalize(),e.canvas.parentNode.removeChild(e.canvas)}var l=function(){return!1},f=function(){function e(t){i()(this,e),this.props={},this._map=null;var n=new google.maps.OverlayView;n.onAdd=this._onAdd.bind(this),n.onRemove=this._onRemove.bind(this),n.draw=this._draw.bind(this),this._overlay=n,this.setProps(t)}return a()(e,[{key:"setMap",value:function(e){e!==this._map&&(this._map&&(this._overlay.setMap(null),this._map=null),e&&(this._map=e,this._overlay.setMap(e)))}},{key:"setProps",value:function(e){Object.assign(this.props,e),this._deck&&this._deck.setProps(this.props)}},{key:"pickObject",value:function(e){return this._deck&&this._deck.pickObject(e)}},{key:"pickMultipleObjects",value:function(e){return this._deck&&this._deck.pickMultipleObjects(e)}},{key:"pickObjects",value:function(e){return this._deck&&this._deck.pickObjects(e)}},{key:"finalize",value:function(){this.setMap(null),this._deck&&(u(this._deck),this._deck=null)}},{key:"_onAdd",value:function(){this._deck=function(e,t,n){if(n){if(n.props.userData._googleMap===e)return n;u(n)}var o={click:null,mousemove:null,mouseout:null};n=new s.Deck({canvas:c(t),initialViewState:{longitude:0,latitude:0,zoom:1},controller:!1,userData:{_googleMap:e,_eventListeners:o}});var i=function(t){o[t]=e.addListener(t,(function(e){return function(e,t,n){var o;switch(t){case"click":e._lastPointerDownInfo=e.pickObject({x:n.pixel.x,y:n.pixel.y}),o=e._onEvent;break;case"mousemove":t="pointermove",o=e._onPointerMove;break;case"mouseout":t="pointerleave",o=e._onPointerMove;break;default:return}o({type:t,offsetCenter:n.pixel,srcEvent:n})}(n,t,e)}))};for(var r in o)i(r);return n}(this._map,this._overlay,this._deck),this._deck.setProps(this.props)}},{key:"_onRemove",value:function(){this._deck.setProps({layerFilter:l})}},{key:"_draw",value:function(){var e=this._deck,t=function(e,t){var n=e.getDiv().firstChild,o=n.offsetWidth,i=n.offsetHeight,r=t.getProjection(),a=e.getBounds(),s=a.getNorthEast(),c=a.getSouthWest(),u=r.fromLatLngToDivPixel(s),l=r.fromLatLngToDivPixel(c),f=new google.maps.Point(0,0),p=r.fromContainerPixelToLatLng(f),d=r.fromLatLngToDivPixel(p),h=(u.x-l.x)/o,v=Math.log2(h)+e.getZoom()-1,y=new google.maps.Point(o/2,i/2),_=r.fromContainerPixelToLatLng(y),k=_.lat(),g=_.lng();return{width:o,height:i,left:d.x,top:d.y,zoom:v,pitch:e.getTilt(),latitude:k,longitude:g}}(this._map,this._overlay),n=t.width,o=t.height,i=t.left,r=t.top,a=t.zoom,s=t.pitch,c=t.latitude,u=t.longitude,f=a>=0&&0===s;e.canvas.style.left="".concat(i,"px"),e.canvas.style.top="".concat(r,"px"),e.setProps({width:n,height:o,viewState:{latitude:c,longitude:u,zoom:a},layerFilter:f?this.props.layerFilter:l}),e.redraw()}}]),e}();n.d(t,"GoogleMapsOverlay",(function(){return f}))}])}));

@@ -6,6 +6,6 @@ (function webpackUniversalModuleDefinition(root, factory) {

define(["deck"], factory);
else {
var a = typeof exports === 'object' ? factory(require("deck")) : factory(root["deck"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
else if(typeof exports === 'object')
exports["deck"] = factory(require("deck"));
else
root["deck"] = factory(root["deck"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE__deck_gl_core__) {

@@ -12,0 +12,0 @@ return /******/ (function(modules) { // webpackBootstrap

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "8.0.0-alpha.2",
"version": "8.0.0-beta.1",
"publishConfig": {

@@ -36,3 +36,3 @@ "access": "public"

},
"gitHead": "287cc5d42206e776e6141a43c8bbc3d3cab05b52"
"gitHead": "c44bf9a88eeedd3fd9bc5d267534f41f08269be6"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc