This commit is contained in:
Xiaoji Chen 2020-06-28 15:05:12 -07:00
parent b4f57e32f8
commit 6c852e20aa
145 changed files with 1153 additions and 2688 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"app":["/app-8de1e9f42913c7370890.js"],"component---examples-clusters-src-app-js":["/component---examples-clusters-src-app-js-c5f2cf797f91936c45dd.js"],"component---examples-controls-src-app-js":["/component---examples-controls-src-app-js-30dcbe73f2f848b6de03.js"],"component---examples-custom-cursor-src-app-js":["/component---examples-custom-cursor-src-app-js-f86884ab73a1ff19df0f.js"],"component---examples-draggable-markers-src-app-js":["/component---examples-draggable-markers-src-app-js-7d55061135d44b841bb7.js"],"component---examples-draw-polygon-src-app-js":["/component---examples-draw-polygon-src-app-js-0f75aa2f53287d1e675d.js"],"component---examples-filter-src-app-js":["/component---examples-filter-src-app-js-2fb526d33a91fd35db56.js"],"component---examples-geojson-animation-src-app-js":["/component---examples-geojson-animation-src-app-js-3485a097759b789df18b.js"],"component---examples-geojson-src-app-js":["/component---examples-geojson-src-app-js-d13935bd0dfa430e2b66.js"],"component---examples-heatmap-src-app-js":["/component---examples-heatmap-src-app-js-8aec7f17eb0b6c6778ce.js"],"component---examples-interaction-src-app-js":["/component---examples-interaction-src-app-js-3f5d65931d86fe2f5906.js"],"component---examples-layers-src-app-js":["/component---examples-layers-src-app-js-3ee46a88cbd243948aa3.js"],"component---examples-locate-user-src-app-js":["/component---examples-locate-user-src-app-js-c33b8dc7804176d58f28.js"],"component---examples-viewport-animation-src-app-js":["/component---examples-viewport-animation-src-app-js-b20a4d3c7034b5901630.js"],"component---examples-zoom-to-bounds-src-app-js":["/component---examples-zoom-to-bounds-src-app-js-02f8ec90cccd70af698b.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx-655d6bb9a253703c6479.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-examples-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-examples-jsx-1da58f114696ef3f2e8d.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-search-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-search-jsx-51d7708d40ff08f564da.js"],"component---src-home-js":["/component---src-home-js-a29533c9f20477918ebf.js"]}
{"app":["/app-757c6c37f3d391c3609c.js"],"component---examples-clusters-src-app-js":["/component---examples-clusters-src-app-js-4b4feb872881c1ef8955.js"],"component---examples-controls-src-app-js":["/component---examples-controls-src-app-js-aec44a1b45f26de31e94.js"],"component---examples-custom-cursor-src-app-js":["/component---examples-custom-cursor-src-app-js-904a309f784453765482.js"],"component---examples-draggable-markers-src-app-js":["/component---examples-draggable-markers-src-app-js-21e2d603cb3ac232d2e4.js"],"component---examples-draw-polygon-src-app-js":["/component---examples-draw-polygon-src-app-js-f6ede049c83a0e67f4e1.js"],"component---examples-filter-src-app-js":["/component---examples-filter-src-app-js-d7dfb0e8c7be529ce6e1.js"],"component---examples-geojson-animation-src-app-js":["/component---examples-geojson-animation-src-app-js-26285cc46325a76396ab.js"],"component---examples-geojson-src-app-js":["/component---examples-geojson-src-app-js-8e8bac2d6a94cd038588.js"],"component---examples-heatmap-src-app-js":["/component---examples-heatmap-src-app-js-92f63669fa0f739c2d31.js"],"component---examples-interaction-src-app-js":["/component---examples-interaction-src-app-js-055bced5fc37b8a59966.js"],"component---examples-layers-src-app-js":["/component---examples-layers-src-app-js-1cc072142257f61158d1.js"],"component---examples-locate-user-src-app-js":["/component---examples-locate-user-src-app-js-af658bb355c0ccf18035.js"],"component---examples-viewport-animation-src-app-js":["/component---examples-viewport-animation-src-app-js-e5fc15a914f28d3d8c4b.js"],"component---examples-zoom-to-bounds-src-app-js":["/component---examples-zoom-to-bounds-src-app-js-b7767b3d39a2b681e0ae.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-documentation-jsx-1d254b52cdcb78d97270.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-examples-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-examples-jsx-1e161f9befa7a5e93282.js"],"component---node-modules-gatsby-theme-ocular-src-react-templates-search-jsx":["/component---node-modules-gatsby-theme-ocular-src-react-templates-search-jsx-d8782acebb3a2dec74ab.js"],"component---src-home-js":["/component---src-home-js-485c146aced5983b2e71.js"]}

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{YLK4:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return d})),r.d(t,"renderToDom",(function(){return m}));r("xtjI"),r("4DPX"),r("rzGZ"),r("Dq+y"),r("8npG"),r("Ggvi"),r("E5k/");var o=r("q1tI"),n=r("i8i4"),c=r("+qjn");var i=function(e){var t,r;function n(){return e.apply(this,arguments)||this}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.render=function(){return o.createElement("div",{className:"control-panel"},o.createElement("h3",null,"Create and Style Clusters"),o.createElement("p",null,"Use Mapbox GL JS' built-in functions to visualize points as clusters."),o.createElement("div",{className:"source-link"},o.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/clusters",target:"_new"},"View Code ↗")))},n}(o.PureComponent),a={id:"clusters",type:"circle",source:"earthquakes",filter:["has","point_count"],paint:{"circle-color":["step",["get","point_count"],"#51bbd6",100,"#f1f075",750,"#f28cb1"],"circle-radius":["step",["get","point_count"],20,100,30,750,40]}},s={id:"cluster-count",type:"symbol",source:"earthquakes",filter:["has","point_count"],layout:{"text-field":"{point_count_abbreviated}","text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":12}},u={id:"unclustered-point",type:"circle",source:"earthquakes",filter:["!",["has","point_count"]],paint:{"circle-color":"#11b4da","circle-radius":4,"circle-stroke-width":1,"circle-stroke-color":"#fff"}};function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=function(e){var t,r;function n(){for(var t,r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return(t=e.call.apply(e,[this].concat(n))||this).state={viewport:{latitude:40.67,longitude:-103.59,zoom:3,bearing:0,pitch:0}},t._sourceRef=o.createRef(),t._onViewportChange=function(e){return t.setState({viewport:e})},t._onClick=function(e){var r=e.features[0],o=r.properties.cluster_id;t._sourceRef.current.getSource().getClusterExpansionZoom(o,(function(e,o){e||t._onViewportChange(l(l({},t.state.viewport),{},{longitude:r.geometry.coordinates[0],latitude:r.geometry.coordinates[1],zoom:o,transitionDuration:500}))}))},t}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.render=function(){var e=this.state.viewport;return o.createElement(c.default,Object.assign({},e,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:"",interactiveLayerIds:[a.id],onClick:this._onClick}),o.createElement(c.Source,{type:"geojson",data:"https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson",cluster:!0,clusterMaxZoom:14,clusterRadius:50,ref:this._sourceRef},o.createElement(c.Layer,a),o.createElement(c.Layer,s),o.createElement(c.Layer,u)),o.createElement(i,{containerComponent:this.props.containerComponent}))},n}(o.Component);function m(e){Object(n.render)(o.createElement(d,null),e)}}}]);

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{YLK4:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return l})),r.d(t,"renderToDom",(function(){return p}));r("E5k/");var o=r("mXGw"),n=r("xARA"),c=r("+qjn");var a=function(e){var t,r;function n(){return e.apply(this,arguments)||this}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.render=function(){return o.createElement("div",{className:"control-panel"},o.createElement("h3",null,"Create and Style Clusters"),o.createElement("p",null,"Use Mapbox GL JS' built-in functions to visualize points as clusters."),o.createElement("div",{className:"source-link"},o.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/clusters",target:"_new"},"View Code ↗")))},n}(o.PureComponent),i={id:"clusters",type:"circle",source:"earthquakes",filter:["has","point_count"],paint:{"circle-color":["step",["get","point_count"],"#51bbd6",100,"#f1f075",750,"#f28cb1"],"circle-radius":["step",["get","point_count"],20,100,30,750,40]}},s={id:"cluster-count",type:"symbol",source:"earthquakes",filter:["has","point_count"],layout:{"text-field":"{point_count_abbreviated}","text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":12}},u={id:"unclustered-point",type:"circle",source:"earthquakes",filter:["!",["has","point_count"]],paint:{"circle-color":"#11b4da","circle-radius":4,"circle-stroke-width":1,"circle-stroke-color":"#fff"}};var l=function(e){var t,r;function n(){for(var t,r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return(t=e.call.apply(e,[this].concat(n))||this).state={viewport:{latitude:40.67,longitude:-103.59,zoom:3,bearing:0,pitch:0}},t._sourceRef=o.createRef(),t._onViewportChange=function(e){return t.setState({viewport:e})},t._onClick=function(e){var r=e.features[0],o=r.properties.cluster_id;t._sourceRef.current.getSource().getClusterExpansionZoom(o,(function(e,o){e||t._onViewportChange(Object.assign({},t.state.viewport,{longitude:r.geometry.coordinates[0],latitude:r.geometry.coordinates[1],zoom:o,transitionDuration:500}))}))},t}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.render=function(){var e=this.state.viewport;return o.createElement(c.default,Object.assign({},e,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:"",interactiveLayerIds:[i.id],onClick:this._onClick}),o.createElement(c.Source,{type:"geojson",data:"https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson",cluster:!0,clusterMaxZoom:14,clusterRadius:50,ref:this._sourceRef},o.createElement(c.Layer,i),o.createElement(c.Layer,s),o.createElement(c.Layer,u)),o.createElement(a,{containerComponent:this.props.containerComponent}))},n}(o.Component);function p(e){Object(n.render)(o.createElement(l,null),e)}}}]);

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{cmq9:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return h})),r.d(t,"renderToDom",(function(){return f}));r("E5k/");var n=r("q1tI"),o=r("i8i4"),a=r("+qjn");r("xtjI"),r("4DPX"),r("rzGZ"),r("Dq+y"),r("8npG"),r("Ggvi");function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l={parks:/park/,buildings:/building/,roads:/bridge|road|tunnel/,labels:/label|place|poi/};function u(e,t){for(var r in e)if(e[r]&&l[r].test(t))return!0;return!1}var p=function(e){var t,r;function o(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={categories:{parks:!0,buildings:!0,roads:!0,labels:!0}},t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var a=o.prototype;return a.componentDidMount=function(){var e=u.bind(null,this.state.categories);this.props.onChange(e)},a._onToggleLayer=function(e,t){var r,n=c(c({},this.state.categories),{},((r={})[e]=t.target.checked,r));this.setState({categories:n});var o=u.bind(null,n);this.props.onChange(o)},a._renderLayerControl=function(e){var t=this.state.categories;return n.createElement("div",{key:e,className:"input"},n.createElement("label",null,e),n.createElement("input",{type:"checkbox",checked:t[e],onChange:this._onToggleLayer.bind(this,e)}))},a.render=function(){var e=this;return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Custom Cursor"),n.createElement("p",null,"Customize the cursor based on interactivity."),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/custom-cursor",target:"_new"},"View Code ↗")),n.createElement("hr",null),n.createElement("p",null,"Clickable layers"),Object.keys(l).map((function(t){return e._renderLayerControl(t)})))},o}(n.PureComponent),g=r("fjjH");var h=function(e){var t,r;function o(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={mapStyle:"",viewport:{latitude:37.773,longitude:-122.481,zoom:15.5,bearing:0,pitch:0},interactiveLayerIds:[]},t._onViewportChange=function(e){return t.setState({viewport:e})},t._onInteractiveLayersChange=function(e){t.setState({interactiveLayerIds:g.layers.map((function(e){return e.id})).filter(e)})},t._onClick=function(e){var t=e.features&&e.features[0];t&&window.alert("Clicked layer "+t.layer.id)},t._getCursor=function(e){var t=e.isHovering;e.isDragging;return t?"pointer":"default"},t}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o.prototype.render=function(){var e=this.state,t=e.viewport,r=e.interactiveLayerIds;return n.createElement(a.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:g,clickRadius:2,onClick:this._onClick,getCursor:this._getCursor,interactiveLayerIds:r,onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),n.createElement(p,{containerComponent:this.props.containerComponent,onChange:this._onInteractiveLayersChange}))},o}(n.Component);function f(e){Object(o.render)(n.createElement(h,null),e)}}}]);

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{cmq9:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return u})),r.d(t,"renderToDom",(function(){return p}));r("E5k/");var n=r("mXGw"),a=r("xARA"),o=r("+qjn");r("rzGZ"),r("Dq+y"),r("8npG"),r("Ggvi");var i={parks:/park/,buildings:/building/,roads:/bridge|road|tunnel/,labels:/label|place|poi/};function c(e,t){for(var r in e)if(e[r]&&i[r].test(t))return!0;return!1}var s=function(e){var t,r;function a(){for(var t,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return(t=e.call.apply(e,[this].concat(n))||this).state={categories:{parks:!0,buildings:!0,roads:!0,labels:!0}},t}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=a.prototype;return o.componentDidMount=function(){var e=c.bind(null,this.state.categories);this.props.onChange(e)},o._onToggleLayer=function(e,t){var r,n=Object.assign({},this.state.categories,((r={})[e]=t.target.checked,r));this.setState({categories:n});var a=c.bind(null,n);this.props.onChange(a)},o._renderLayerControl=function(e){var t=this.state.categories;return n.createElement("div",{key:e,className:"input"},n.createElement("label",null,e),n.createElement("input",{type:"checkbox",checked:t[e],onChange:this._onToggleLayer.bind(this,e)}))},o.render=function(){var e=this;return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Custom Cursor"),n.createElement("p",null,"Customize the cursor based on interactivity."),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/custom-cursor",target:"_new"},"View Code ↗")),n.createElement("hr",null),n.createElement("p",null,"Clickable layers"),Object.keys(i).map((function(t){return e._renderLayerControl(t)})))},a}(n.PureComponent),l=r("fjjH");var u=function(e){var t,r;function a(){for(var t,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return(t=e.call.apply(e,[this].concat(n))||this).state={mapStyle:"",viewport:{latitude:37.773,longitude:-122.481,zoom:15.5,bearing:0,pitch:0},interactiveLayerIds:[]},t._onViewportChange=function(e){return t.setState({viewport:e})},t._onInteractiveLayersChange=function(e){t.setState({interactiveLayerIds:l.layers.map((function(e){return e.id})).filter(e)})},t._onClick=function(e){var t=e.features&&e.features[0];t&&window.alert("Clicked layer "+t.layer.id)},t._getCursor=function(e){var t=e.isHovering;e.isDragging;return t?"pointer":"default"},t}return r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,a.prototype.render=function(){var e=this.state,t=e.viewport,r=e.interactiveLayerIds;return n.createElement(o.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:l,clickRadius:2,onClick:this._onClick,getCursor:this._getCursor,interactiveLayerIds:r,onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),n.createElement(s,{containerComponent:this.props.containerComponent,onChange:this._onInteractiveLayersChange}))},a}(n.Component);function p(e){Object(a.render)(n.createElement(u,null),e)}}}]);

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{oByp:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return m})),r.d(t,"renderToDom",(function(){return f}));r("xtjI"),r("4DPX"),r("rzGZ"),r("Dq+y"),r("8npG"),r("Ggvi"),r("E5k/");var n=r("q1tI"),o=r("i8i4"),a=r("+qjn");var i=["onDragStart","onDrag","onDragEnd"];function c(e){return(Math.round(1e5*e)/1e5).toFixed(5)}var p=function(e){var t,r;function o(){for(var t,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))||this).renderEvent=function(e){var r=t.props.events,o=(void 0===r?{}:r)[e];return n.createElement("div",{key:e},n.createElement("strong",null,e,":")," ",o?o.map(c).join(", "):n.createElement("em",null,"null"))},t}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o.prototype.render=function(){return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Draggable Marker"),n.createElement("p",null,"Try dragging the marker to another location."),n.createElement("div",null,i.map(this.renderEvent)),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/draggable-markers",target:"_new"},"View Code ↗")))},o}(n.PureComponent);var l={fill:"#d00",stroke:"none"},s=function(e){var t,r;function o(){return e.apply(this,arguments)||this}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o.prototype.render=function(){var e=this.props.size,t=void 0===e?20:e;return n.createElement("svg",{height:t,viewBox:"0 0 24 24",style:l},n.createElement("path",{d:"M20.2,15.7L20.2,15.7c1.1-1.6,1.8-3.6,1.8-5.7c0-5.6-4.5-10-10-10S2,4.5,2,10c0,2,0.6,3.9,1.6,5.4c0,0.1,0.1,0.2,0.2,0.3\n c0,0,0.1,0.1,0.1,0.2c0.2,0.3,0.4,0.6,0.7,0.9c2.6,3.1,7.4,7.6,7.4,7.6s4.8-4.5,7.4-7.5c0.2-0.3,0.5-0.6,0.7-0.9\n C20.1,15.8,20.2,15.8,20.2,15.7z"}))},o}(n.PureComponent);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var v={position:"absolute",top:0,left:0,padding:"10px"},m=function(e){var t,r;function o(t){var r;return(r=e.call(this,t)||this)._updateViewport=function(e){r.setState({viewport:e})},r._onMarkerDragStart=function(e){r._logDragEvent("onDragStart",e)},r._onMarkerDrag=function(e){r._logDragEvent("onDrag",e)},r._onMarkerDragEnd=function(e){r._logDragEvent("onDragEnd",e),r.setState({marker:{longitude:e.lngLat[0],latitude:e.lngLat[1]}})},r.state={viewport:{latitude:37.785164,longitude:-100,zoom:3.5,bearing:0,pitch:0},marker:{latitude:37.785164,longitude:-100},events:{}},r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=o.prototype;return i._logDragEvent=function(e,t){var r;this.setState({events:g(g({},this.state.events),{},(r={},r[e]=t.lngLat,r))})},i.render=function(){var e=this.state,t=e.viewport,r=e.marker;return n.createElement(a.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._updateViewport,mapboxApiAccessToken:""}),n.createElement(a.Marker,{longitude:r.longitude,latitude:r.latitude,offsetTop:-20,offsetLeft:-10,draggable:!0,onDragStart:this._onMarkerDragStart,onDrag:this._onMarkerDrag,onDragEnd:this._onMarkerDragEnd},n.createElement(s,{size:20})),n.createElement("div",{className:"nav",style:v},n.createElement(a.NavigationControl,{onViewportChange:this._updateViewport})),n.createElement(p,{containerComponent:this.props.containerComponent,events:this.state.events}))},o}(n.Component);function f(e){Object(o.render)(n.createElement(m,null),e)}}}]);

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{oByp:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return g})),r.d(t,"renderToDom",(function(){return d}));r("E5k/");var n=r("mXGw"),o=r("xARA"),a=r("+qjn");var i=["onDragStart","onDrag","onDragEnd"];function c(e){return(Math.round(1e5*e)/1e5).toFixed(5)}var l=function(e){var t,r;function o(){for(var t,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))||this).renderEvent=function(e){var r=t.props.events,o=(void 0===r?{}:r)[e];return n.createElement("div",{key:e},n.createElement("strong",null,e,":")," ",o?o.map(c).join(", "):n.createElement("em",null,"null"))},t}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o.prototype.render=function(){return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Draggable Marker"),n.createElement("p",null,"Try dragging the marker to another location."),n.createElement("div",null,i.map(this.renderEvent)),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/draggable-markers",target:"_new"},"View Code ↗")))},o}(n.PureComponent);var p={fill:"#d00",stroke:"none"},s=function(e){var t,r;function o(){return e.apply(this,arguments)||this}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o.prototype.render=function(){var e=this.props.size,t=void 0===e?20:e;return n.createElement("svg",{height:t,viewBox:"0 0 24 24",style:p},n.createElement("path",{d:"M20.2,15.7L20.2,15.7c1.1-1.6,1.8-3.6,1.8-5.7c0-5.6-4.5-10-10-10S2,4.5,2,10c0,2,0.6,3.9,1.6,5.4c0,0.1,0.1,0.2,0.2,0.3\n c0,0,0.1,0.1,0.1,0.2c0.2,0.3,0.4,0.6,0.7,0.9c2.6,3.1,7.4,7.6,7.4,7.6s4.8-4.5,7.4-7.5c0.2-0.3,0.5-0.6,0.7-0.9\n C20.1,15.8,20.2,15.8,20.2,15.7z"}))},o}(n.PureComponent);var u={position:"absolute",top:0,left:0,padding:"10px"},g=function(e){var t,r;function o(t){var r;return(r=e.call(this,t)||this)._updateViewport=function(e){r.setState({viewport:e})},r._onMarkerDragStart=function(e){r._logDragEvent("onDragStart",e)},r._onMarkerDrag=function(e){r._logDragEvent("onDrag",e)},r._onMarkerDragEnd=function(e){r._logDragEvent("onDragEnd",e),r.setState({marker:{longitude:e.lngLat[0],latitude:e.lngLat[1]}})},r.state={viewport:{latitude:37.785164,longitude:-100,zoom:3.5,bearing:0,pitch:0},marker:{latitude:37.785164,longitude:-100},events:{}},r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i=o.prototype;return i._logDragEvent=function(e,t){var r;this.setState({events:Object.assign({},this.state.events,(r={},r[e]=t.lngLat,r))})},i.render=function(){var e=this.state,t=e.viewport,r=e.marker;return n.createElement(a.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._updateViewport,mapboxApiAccessToken:""}),n.createElement(a.Marker,{longitude:r.longitude,latitude:r.latitude,offsetTop:-20,offsetLeft:-10,draggable:!0,onDragStart:this._onMarkerDragStart,onDrag:this._onMarkerDrag,onDragEnd:this._onMarkerDragEnd},n.createElement(s,{size:20})),n.createElement("div",{className:"nav",style:u},n.createElement(a.NavigationControl,{onViewportChange:this._updateViewport})),n.createElement(l,{containerComponent:this.props.containerComponent,events:this.state.events}))},o}(n.Component);function d(e){Object(o.render)(n.createElement(g,null),e)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{NmCX:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return p})),r.d(t,"renderToDom",(function(){return u}));r("E5k/");var n=r("mXGw"),o=r("xARA"),a=r("+qjn");var i=function(e){var t,r;function o(){return e.apply(this,arguments)||this}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o.prototype.render=function(){return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Highlight Features Containing Similar Data"),n.createElement("p",null,"Hover over counties to highlight counties that share the same name."),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/filter",target:"_new"},"View Code ↗")))},o}(n.PureComponent),l={id:"counties",type:"fill","source-layer":"original",paint:{"fill-outline-color":"rgba(0,0,0,0.1)","fill-color":"rgba(0,0,0,0.1)"}},c={id:"counties-highlighted",type:"fill",source:"counties","source-layer":"original",paint:{"fill-outline-color":"#484896","fill-color":"#6e599f","fill-opacity":.75}};var p=function(e){var t,r;function o(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={filter:["in","COUNTY",""],viewport:{latitude:38.88,longitude:-98,zoom:3,minZoom:2,bearing:0,pitch:0},hoverInfo:null},t._onViewportChange=function(e){return t.setState({viewport:e})},t._onHover=function(e){var r="",n=null,o=e.features[0];o&&(n={lngLat:e.lngLat,county:o.properties},r=o.properties.COUNTY),t.setState({filter:["in","COUNTY",r],hoverInfo:n})},t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var p=o.prototype;return p._renderPopup=function(){var e=this.state.hoverInfo;return e?n.createElement(a.Popup,{longitude:e.lngLat[0],latitude:e.lngLat[1],closeButton:!1},n.createElement("div",{className:"county-info"},e.county.COUNTY)):null},p.render=function(){var e=this.state,t=e.viewport,r=e.filter;return n.createElement(a.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/light-v9",mapboxApiAccessToken:"",onViewportChange:this._onViewportChange,onHover:this._onHover,interactiveLayerIds:["counties"]}),n.createElement(a.Source,{type:"vector",url:"mapbox://mapbox.82pkq93d"},n.createElement(a.Layer,Object.assign({beforeId:"waterway-label"},l)),n.createElement(a.Layer,Object.assign({beforeId:"waterway-label"},c,{filter:r}))),this._renderPopup(),n.createElement(i,{containerComponent:this.props.containerComponent}))},o}(n.Component);function u(e){Object(o.render)(n.createElement(p,null),e)}}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{NmCX:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return p})),r.d(t,"renderToDom",(function(){return u}));r("E5k/");var n=r("q1tI"),o=r("i8i4"),i=r("+qjn");var a=function(e){var t,r;function o(){return e.apply(this,arguments)||this}return r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,o.prototype.render=function(){return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Highlight Features Containing Similar Data"),n.createElement("p",null,"Hover over counties to highlight counties that share the same name."),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/filter",target:"_new"},"View Code ↗")))},o}(n.PureComponent),l={id:"counties",type:"fill","source-layer":"original",paint:{"fill-outline-color":"rgba(0,0,0,0.1)","fill-color":"rgba(0,0,0,0.1)"}},c={id:"counties-highlighted",type:"fill",source:"counties","source-layer":"original",paint:{"fill-outline-color":"#484896","fill-color":"#6e599f","fill-opacity":.75}};var p=function(e){var t,r;function o(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={filter:["in","COUNTY",""],viewport:{latitude:38.88,longitude:-98,zoom:3,minZoom:2,bearing:0,pitch:0},hoverInfo:null},t._onViewportChange=function(e){return t.setState({viewport:e})},t._onHover=function(e){var r="",n=null,o=e.features[0];o&&(n={lngLat:e.lngLat,county:o.properties},r=o.properties.COUNTY),t.setState({filter:["in","COUNTY",r],hoverInfo:n})},t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var p=o.prototype;return p._renderPopup=function(){var e=this.state.hoverInfo;return e?n.createElement(i.Popup,{longitude:e.lngLat[0],latitude:e.lngLat[1],closeButton:!1},n.createElement("div",{className:"county-info"},e.county.COUNTY)):null},p.render=function(){var e=this.state,t=e.viewport,r=e.filter;return n.createElement(i.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/light-v9",mapboxApiAccessToken:"",onViewportChange:this._onViewportChange,onHover:this._onHover,interactiveLayerIds:["counties"]}),n.createElement(i.Source,{type:"vector",url:"mapbox://mapbox.82pkq93d"},n.createElement(i.Layer,Object.assign({beforeId:"waterway-label"},l)),n.createElement(i.Layer,Object.assign({beforeId:"waterway-label"},c,{filter:r}))),this._renderPopup(),n.createElement(a,{containerComponent:this.props.containerComponent}))},o}(n.Component);function u(e){Object(o.render)(n.createElement(p,null),e)}}}]);

View File

@ -1 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{PHfw:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return l})),n.d(e,"renderToDom",(function(){return u}));n("E5k/");var o=n("mXGw"),r=n("xARA"),a=n("+qjn");var i=function(t){var e,n;function r(){return t.apply(this,arguments)||this}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.render=function(){return o.createElement("div",{className:"control-panel"},o.createElement("h3",null,"Animated GeoJSON"),o.createElement("p",null,"Render animation by updating GeoJSON data source."),o.createElement("div",{className:"source-link"},o.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/geojson-animation",target:"_new"},"View Code ↗")))},r}(o.PureComponent);function c(t){var e=t.center,n=t.angle,o=t.radius;return{type:"Point",coordinates:[e[0]+Math.cos(n)*o,e[1]+Math.sin(n)*o]}}var p={type:"circle",paint:{"circle-radius":10,"circle-color":"#007cbf"}},l=function(t){var e,n;function r(){for(var e,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=t.call.apply(t,[this].concat(o))||this).state={pointData:null,viewport:{latitude:0,longitude:-100,zoom:3,bearing:0,pitch:0}},e.animation=null,e._animatePoint=function(){e.setState({pointData:c({center:[-100,0],angle:Date.now()/1e3,radius:20})}),e.animation=window.requestAnimationFrame(e._animatePoint)},e._onViewportChange=function(t){return e.setState({viewport:t})},e}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var l=r.prototype;return l.componentDidMount=function(){this._animatePoint()},l.componentWillUnmount=function(){window.cancelAnimationFrame(this.animation)},l.render=function(){var t=this.state,e=t.viewport,n=t.pointData;return o.createElement(a.default,Object.assign({},e,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/light-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),n&&o.createElement(a.Source,{type:"geojson",data:n},o.createElement(a.Layer,p)),o.createElement(i,{containerComponent:this.props.containerComponent}))},r}(o.Component);function u(t){Object(r.render)(o.createElement(l,null),t)}}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{PHfw:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return l})),n.d(e,"renderToDom",(function(){return u}));n("E5k/");var o=n("q1tI"),r=n("i8i4"),a=n("+qjn");var i=function(t){var e,n;function r(){return t.apply(this,arguments)||this}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.render=function(){return o.createElement("div",{className:"control-panel"},o.createElement("h3",null,"Animated GeoJSON"),o.createElement("p",null,"Render animation by updating GeoJSON data source."),o.createElement("div",{className:"source-link"},o.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/geojson-animation",target:"_new"},"View Code ↗")))},r}(o.PureComponent);function c(t){var e=t.center,n=t.angle,o=t.radius;return{type:"Point",coordinates:[e[0]+Math.cos(n)*o,e[1]+Math.sin(n)*o]}}var p={type:"circle",paint:{"circle-radius":10,"circle-color":"#007cbf"}},l=function(t){var e,n;function r(){for(var e,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return(e=t.call.apply(t,[this].concat(o))||this).state={pointData:null,viewport:{latitude:0,longitude:-100,zoom:3,bearing:0,pitch:0}},e.animation=null,e._animatePoint=function(){e.setState({pointData:c({center:[-100,0],angle:Date.now()/1e3,radius:20})}),e.animation=window.requestAnimationFrame(e._animatePoint)},e._onViewportChange=function(t){return e.setState({viewport:t})},e}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var l=r.prototype;return l.componentDidMount=function(){this._animatePoint()},l.componentWillUnmount=function(){window.cancelAnimationFrame(this.animation)},l.render=function(){var t=this.state,e=t.viewport,n=t.pointData;return o.createElement(a.default,Object.assign({},e,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/light-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),n&&o.createElement(a.Source,{type:"geojson",data:n},o.createElement(a.Layer,p)),o.createElement(i,{containerComponent:this.props.containerComponent}))},r}(o.Component);function u(t){Object(r.render)(o.createElement(l,null),t)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{"+Ht4":function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return m})),a.d(t,"renderToDom",(function(){return u}));a("E5k/");var n=a("mXGw"),r=a("xARA"),o=a("+qjn");var l=function(e){var t,a;function r(){return e.apply(this,arguments)||this}return a=e,(t=r).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,r.prototype.render=function(){var e=this.props,t=e.startTime,a=e.endTime,r=e.onChangeDay,o=e.allDay,l=e.onChangeAllDay,i=e.selectedTime,s=Math.round((a-t)/864e5),c=function(e){var t=new Date(e);return t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear()};return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Heatmap"),n.createElement("p",null,"Map showing earthquakes",n.createElement("br",null),"from ",n.createElement("b",null,c(t))," to ",n.createElement("b",null,c(a)),"."),n.createElement("hr",null),n.createElement("div",{className:"input"},n.createElement("label",null,"All Days"),n.createElement("input",{type:"checkbox",name:"allday",checked:o,onChange:function(e){return l(e.target.checked)}})),n.createElement("div",{className:"input "+(o?"disabled":"")},n.createElement("label",null,"Each Day: ",c(i)),n.createElement("input",{type:"range",disabled:o,min:1,max:s,step:1,onChange:function(e){var a=e.target.value;r(t+864e5*a)}})),n.createElement("hr",null),n.createElement("p",null,"Data source:"," ",n.createElement("a",{href:"https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson"},"earthquakes.geojson")),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/heatmap",target:"_new"},"View Code ↗")))},r}(n.PureComponent),i=a("DRYM"),s={maxzoom:9,type:"heatmap",paint:{"heatmap-weight":["interpolate",["linear"],["get","mag"],0,0,6,1],"heatmap-intensity":["interpolate",["linear"],["zoom"],0,1,9,3],"heatmap-color":["interpolate",["linear"],["heatmap-density"],0,"rgba(33,102,172,0)",.2,"rgb(103,169,207)",.4,"rgb(209,229,240)",.6,"rgb(253,219,199)",.8,"rgb(239,138,98)",.9,"rgb(255,201,101)"],"heatmap-radius":["interpolate",["linear"],["zoom"],0,2,9,20],"heatmap-opacity":["interpolate",["linear"],["zoom"],7,1,9,0]}};function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){var a=new Date(t),n=a.getFullYear(),r=a.getMonth(),o=a.getDate();return{type:"FeatureCollection",features:e.features.filter((function(e){var t=new Date(e.properties.time);return t.getFullYear()===n&&t.getMonth()===r&&t.getDate()===o}))}}var m=function(e){var t,a;function r(t){var a;(a=e.call(this,t)||this)._onViewportChange=function(e){return a.setState({viewport:e})},a._handleChangeDay=function(e){a.setState({selectedTime:e}),a.state.earthquakes&&a.setState({data:p(a.state.earthquakes,e)})},a._handleChangeAllDay=function(e){a.setState({allDay:e}),a.state.earthquakes&&a.setState({data:e?a.state.earthquakes:p(a.state.earthquakes,a.state.selectedTime)})};var n=(new Date).getTime();return a.state={viewport:{latitude:40,longitude:-100,zoom:3,bearing:0,pitch:0},allDay:!0,startTime:n,endTime:n,selectedTime:n,earthquakes:null},a._handleChangeDay=a._handleChangeDay.bind(c(a)),a._handleChangeAllDay=a._handleChangeAllDay.bind(c(a)),a}a=e,(t=r).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a;var m=r.prototype;return m.componentDidMount=function(){var e=this;Object(i.a)("https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson",(function(t,a){if(!t){var n=a.features,r=n[0].properties.time,o=n[n.length-1].properties.time;e.setState({data:a,earthquakes:a,endTime:r,startTime:o,selectedTime:r})}}))},m.render=function(){var e=this.state,t=e.viewport,a=e.data,r=e.allDay,i=e.selectedTime,c=e.startTime,p=e.endTime;return n.createElement("div",{style:{height:"100%",position:"relative"}},n.createElement(o.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),a&&n.createElement(o.Source,{type:"geojson",data:a},n.createElement(o.Layer,s))),n.createElement(l,{containerComponent:this.props.containerComponent,startTime:c,endTime:p,selectedTime:i,allDay:r,onChangeDay:this._handleChangeDay,onChangeAllDay:this._handleChangeAllDay}))},r}(n.Component);function u(e){Object(r.render)(n.createElement(m,null),e)}}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{"+Ht4":function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return m})),a.d(t,"renderToDom",(function(){return u}));a("E5k/");var n=a("q1tI"),r=a("i8i4"),o=a("+qjn");var l=function(e){var t,a;function r(){return e.apply(this,arguments)||this}return a=e,(t=r).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,r.prototype.render=function(){var e=this.props,t=e.startTime,a=e.endTime,r=e.onChangeDay,o=e.allDay,l=e.onChangeAllDay,i=e.selectedTime,s=Math.round((a-t)/864e5),c=function(e){var t=new Date(e);return t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear()};return n.createElement("div",{className:"control-panel"},n.createElement("h3",null,"Heatmap"),n.createElement("p",null,"Map showing earthquakes",n.createElement("br",null),"from ",n.createElement("b",null,c(t))," to ",n.createElement("b",null,c(a)),"."),n.createElement("hr",null),n.createElement("div",{className:"input"},n.createElement("label",null,"All Days"),n.createElement("input",{type:"checkbox",name:"allday",checked:o,onChange:function(e){return l(e.target.checked)}})),n.createElement("div",{className:"input "+(o?"disabled":"")},n.createElement("label",null,"Each Day: ",c(i)),n.createElement("input",{type:"range",disabled:o,min:1,max:s,step:1,onChange:function(e){var a=e.target.value;r(t+864e5*a)}})),n.createElement("hr",null),n.createElement("p",null,"Data source:"," ",n.createElement("a",{href:"https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson"},"earthquakes.geojson")),n.createElement("div",{className:"source-link"},n.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/heatmap",target:"_new"},"View Code ↗")))},r}(n.PureComponent),i=a("DRYM"),s={maxzoom:9,type:"heatmap",paint:{"heatmap-weight":["interpolate",["linear"],["get","mag"],0,0,6,1],"heatmap-intensity":["interpolate",["linear"],["zoom"],0,1,9,3],"heatmap-color":["interpolate",["linear"],["heatmap-density"],0,"rgba(33,102,172,0)",.2,"rgb(103,169,207)",.4,"rgb(209,229,240)",.6,"rgb(253,219,199)",.8,"rgb(239,138,98)",.9,"rgb(255,201,101)"],"heatmap-radius":["interpolate",["linear"],["zoom"],0,2,9,20],"heatmap-opacity":["interpolate",["linear"],["zoom"],7,1,9,0]}};function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){var a=new Date(t),n=a.getFullYear(),r=a.getMonth(),o=a.getDate();return{type:"FeatureCollection",features:e.features.filter((function(e){var t=new Date(e.properties.time);return t.getFullYear()===n&&t.getMonth()===r&&t.getDate()===o}))}}var m=function(e){var t,a;function r(t){var a;(a=e.call(this,t)||this)._onViewportChange=function(e){return a.setState({viewport:e})},a._handleChangeDay=function(e){a.setState({selectedTime:e}),a.state.earthquakes&&a.setState({data:p(a.state.earthquakes,e)})},a._handleChangeAllDay=function(e){a.setState({allDay:e}),a.state.earthquakes&&a.setState({data:e?a.state.earthquakes:p(a.state.earthquakes,a.state.selectedTime)})};var n=(new Date).getTime();return a.state={viewport:{latitude:40,longitude:-100,zoom:3,bearing:0,pitch:0},allDay:!0,startTime:n,endTime:n,selectedTime:n,earthquakes:null},a._handleChangeDay=a._handleChangeDay.bind(c(a)),a._handleChangeAllDay=a._handleChangeAllDay.bind(c(a)),a}a=e,(t=r).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a;var m=r.prototype;return m.componentDidMount=function(){var e=this;Object(i.a)("https://docs.mapbox.com/mapbox-gl-js/assets/earthquakes.geojson",(function(t,a){if(!t){var n=a.features,r=n[0].properties.time,o=n[n.length-1].properties.time;e.setState({data:a,earthquakes:a,endTime:r,startTime:o,selectedTime:r})}}))},m.render=function(){var e=this.state,t=e.viewport,a=e.data,r=e.allDay,i=e.selectedTime,c=e.startTime,p=e.endTime;return n.createElement("div",{style:{height:"100%",position:"relative"}},n.createElement(o.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),a&&n.createElement(o.Source,{type:"geojson",data:a},n.createElement(o.Layer,s))),n.createElement(l,{containerComponent:this.props.containerComponent,startTime:c,endTime:p,selectedTime:i,allDay:r,onChangeDay:this._handleChangeDay,onChangeAllDay:this._handleChangeAllDay}))},r}(n.Component);function u(e){Object(r.render)(n.createElement(m,null),e)}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{NqXV:function(t,e,o){"use strict";o.r(e),o.d(e,"default",(function(){return p})),o.d(e,"renderToDom",(function(){return c}));o("E5k/");var n=o("mXGw"),r=o("xARA"),a=o("+qjn");var i={position:"absolute",top:0,left:0,margin:10},p=function(t){var e,o;function r(){for(var e,o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).state={viewport:{latitude:37.8,longitude:96,zoom:3,bearing:0,pitch:0}},e._onViewportChange=function(t){return e.setState({viewport:t})},e}return o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o,r.prototype.render=function(){var t=this.state.viewport;return n.createElement(a.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),n.createElement(a.GeolocateControl,{style:i,positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}))},r}(n.Component);function c(t){Object(r.render)(n.createElement(p,null),t)}}}]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{NqXV:function(t,e,o){"use strict";o.r(e),o.d(e,"default",(function(){return p})),o.d(e,"renderToDom",(function(){return c}));o("E5k/");var n=o("q1tI"),r=o("i8i4"),i=o("+qjn");var a={position:"absolute",top:0,left:0,margin:10},p=function(t){var e,o;function r(){for(var e,o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).state={viewport:{latitude:37.8,longitude:96,zoom:3,bearing:0,pitch:0}},e._onViewportChange=function(t){return e.setState({viewport:t})},e}return o=t,(e=r).prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o,r.prototype.render=function(){var t=this.state.viewport;return n.createElement(i.default,Object.assign({},t,{width:"100%",height:"100%",mapStyle:"mapbox://styles/mapbox/dark-v9",onViewportChange:this._onViewportChange,mapboxApiAccessToken:""}),n.createElement(i.GeolocateControl,{style:a,positionOptions:{enableHighAccuracy:!0},trackUserLocation:!0}))},r}(n.Component);function c(t){Object(r.render)(n.createElement(p,null),t)}}}]);

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{"1jwa":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return g})),r.d(t,"renderToDom",(function(){return O}));r("xtjI"),r("4DPX"),r("rzGZ"),r("Dq+y"),r("8npG"),r("Ggvi"),r("E5k/");var o=r("q1tI"),n=r("i8i4"),i=r("+qjn"),c=r("QJ+7"),a=r.n(c);var p=function(e){var t,r;function n(){return e.apply(this,arguments)||this}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.render=function(){return o.createElement("div",{className:"control-panel"},o.createElement("h3",null,"Zoom to Bounding Box"),o.createElement("p",null,"Click on a San Fransisco Neighborhood to zoom in."),o.createElement("div",{className:"source-link"},o.createElement("a",{href:"https://github.com/visgl/react-map-gl/tree/5.2-release/examples/zoom-to-bounds",target:"_new"},"View Code ↗")))},n}(o.PureComponent),s=r("fjjH");function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var b=u(u({},s),{},{sources:u({},s.sources),layers:s.layers.slice()});b.sources["sf-neighborhoods"]={type:"geojson",data:"https://raw.githubusercontent.com/uber/react-map-gl/master/examples/.data/feature-example-sf.json"},b.layers.push({id:"sf-neighborhoods-fill",source:"sf-neighborhoods",type:"fill",paint:{"fill-outline-color":"#0040c8","fill-color":"#fff","fill-opacity":0}},{id:"sf-neighborhoods-outline",source:"sf-neighborhoods",type:"line",paint:{"line-width":2,"line-color":"#0080ef"}});var d=b;function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var g=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this)._updateViewport=function(e){r.setState({viewport:e})},r._onClick=function(e){var t=e.features[0];if(t){var o=a()(t),n=o[0],c=o[1],p=o[2],s=o[3],l=new i.WebMercatorViewport(r.state.viewport).fitBounds([[n,c],[p,s]],{padding:40}),u=l.longitude,f=l.latitude,b=l.zoom;r.setState({viewport:y(y({},r.state.viewport),{},{longitude:u,latitude:f,zoom:b,transitionInterpolator:new i.LinearInterpolator({around:[e.offsetCenter.x,e.offsetCenter.y]}),transitionDuration:1e3})})}},r.state={viewport:{latitude:37.785164,longitude:-122.4,zoom:11,bearing:0,pitch:0},popupInfo:null},r._map=o.createRef(),r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.render=function(){var e=this.state.viewport;return o.createElement(i.default,Object.assign({ref:this._map,mapStyle:d,interactiveLayerIds:["sf-neighborhoods-fill"]},e,{width:"100%",height:"100%",onClick:this._onClick,onViewportChange:this._updateViewport,mapboxApiAccessToken:""}),o.createElement(p,{containerComponent:this.props.containerComponent}))},n}(o.Component);function O(e){Object(n.render)(o.createElement(g,null),e)}}}]);

View File

@ -0,0 +1 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{bzNg:function(t,e,n){"use strict";n.r(e),n.d(e,"query",(function(){return i})),n.d(e,"default",(function(){return c}));var o=n("q1tI"),r=n.n(o),a=n("8mkv"),p=n("7yFj");var i="2196287876",c=function(t){var e,n;function o(){return t.apply(this,arguments)||this}return n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,o.prototype.render=function(){var t=this.props.data.docBySlug.body,e=this.props.pageContext.relativeLinks;return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement(p.o,null,r.a.createElement(a.a,{path:this.props.location.pathname,relativeLinks:e,body:t})))},o}(r.a.Component)}}]);

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{bzNg:function(t,e,n){"use strict";n.r(e),n.d(e,"query",(function(){return i})),n.d(e,"default",(function(){return s}));var r=n("q1tI"),o=n.n(r),p=n("8mkv"),a=n("7yFj");var i="312603768",s=function(t){var e,n;function r(){return t.apply(this,arguments)||this}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.render=function(){var t=this.props.data.docBySlug.htmlAst,e=this.props.pageContext.relativeLinks;return o.a.createElement(a.n,null,o.a.createElement(p.a,{path:this.props.location.pathname,relativeLinks:e,htmlAst:t}))},r}(o.a.Component)}}]);

View File

@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[22],{"2flm":function(n,t,e){"use strict";e.r(t),e.d(t,"default",(function(){return c}));var i=e("q1tI"),o=e.n(i),r=e("Wbzz"),a=e("NKOs");var c=function(n){var t,e;function i(){return n.apply(this,arguments)||this}return e=n,(t=i).prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,i.prototype.render=function(){var n=this.props.pageContext.examples;return o.a.createElement(a.c,null,n.map((function(n){return o.a.createElement(a.a,{key:n.title,to:"/"+n.path},n.imageSrc?o.a.createElement("img",{width:"100%",src:Object(r.c)(n.imageSrc),alt:n.title}):null,o.a.createElement(a.b,null,n.title))})))},i}(i.Component)},NKOs:function(n,t,e){"use strict";e.d(t,"c",(function(){return r})),e.d(t,"a",(function(){return a})),e.d(t,"b",(function(){return c})),e.d(t,"d",(function(){return u})),e.d(t,"f",(function(){return l})),e.d(t,"e",(function(){return m})),e.d(t,"g",(function(){return h}));var i=e("vOnD"),o=e("Wbzz"),r=(i.c.main.withConfig({displayName:"example__MainExample",componentId:"h9izwc-0"})(["width:100%;height:100%;position:relative;"]),i.c.main.withConfig({displayName:"example__MainExamples",componentId:"h9izwc-1"})(["display:flex;flex-wrap:wrap;@media screen and (max-width:","){padding-top:96px;}"],(function(n){return n.theme.breakpoints.medium}))),a=Object(i.c)(o.a).withConfig({displayName:"example__ExampleCard",componentId:"h9izwc-2"})(["border:",";cursor:pointer;text-decoration:none;width:200px;outline:none;margin:",";padding:"," "," "," ",";transition-property:background,border-color,box-shadow;transition-duration:",";transition-timing-function:",";&:hover{box-shadow:",";background:",";border-color:transparent;}"],(function(n){return n.theme.borders.border300}),(function(n){return n.theme.sizing.scale400}),(function(n){return n.theme.sizing.scale700}),(function(n){return n.theme.sizing.scale600}),(function(n){return n.theme.sizing.scale700}),(function(n){return n.theme.sizing.scale600}),(function(n){return n.theme.animation.timing400}),(function(n){return n.theme.animation.easeInOutCurve}),(function(n){return n.theme.lighting.shadow600}),(function(n){return n.theme.colors.mono200})),c=i.c.div.withConfig({displayName:"example__ExampleTitle",componentId:"h9izwc-3"})(["color:",";font:",";margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:150px;"],(function(n){return n.theme.colors.mono1000}),(function(n){return n.theme.typography.font300})),u=i.c.div.withConfig({displayName:"example__PanelContainer",componentId:"h9izwc-4"})(["font:",";position:absolute;top:0;right:0;width:344px;background:",";box-shadow:",";margin:",";padding:"," ",";max-height:96%;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;outline:none;z-index:1;"],(function(n){return n.theme.typography.font300}),(function(n){return n.theme.colors.white}),(function(n){return n.theme.lighting.shadow400}),(function(n){return n.theme.sizing.scale800}),(function(n){return n.theme.sizing.scale400}),(function(n){return n.theme.sizing.scale800})),l=i.c.h3.withConfig({displayName:"example__PanelTitle",componentId:"h9izwc-5"})(["font:",";margin:"," 0;"],(function(n){return n.theme.typography.font450}),(function(n){return n.theme.sizing.scale300})),m=i.c.div.withConfig({displayName:"example__PanelContent",componentId:"h9izwc-6"})(["div >*{vertical-align:middle;white-space:nowrap;}div >label{display:inline-block;width:40%;margin-right:10%;color:",";margin-top:2px;margin-bottom:2px;}div >input,div >a,div >button,div >select{background:",";font:",";line-height:",";text-transform:none;text-overflow:ellipsis;overflow:hidden;display:inline-block;padding:0 ",";width:50%;height:",";text-align:left;}div >button{color:initial;}div >button:disabled{color:",";cursor:default;background:",";}div >input{border:",";&:disabled{background:",';}&[type="checkbox"]{height:auto;}}p{margin-bottom:',";white-space:initial;}"],(function(n){return n.theme.colors.momo800}),(function(n){return n.theme.colors.white}),(function(n){return n.theme.typography.font100}),(function(n){return n.theme.sizing.scale700}),(function(n){return n.theme.sizing.scale100}),(function(n){return n.theme.sizing.scale700}),(function(n){return n.theme.colors.mono300}),(function(n){return n.theme.colors.mono300}),(function(n){return n.theme.borders.border300}),(function(n){return n.theme.colors.white}),(function(n){return n.theme.sizing.scale600})),h=i.c.a.withConfig({displayName:"example__SourceLink",componentId:"h9izwc-7"})(["display:block;text-align:right;margin-top:",";font:",";color:",";"],(function(n){return n.theme.sizing.scale300}),(function(n){return n.theme.typography.font250}),(function(n){return n.theme.colors.mono800}))}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

BIN
images/visgl-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"webpackCompilationHash":"a9f844e9eb0d9773f469"}
{"webpackCompilationHash":"b5be9d297d31fece669d"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More