react-arcgis
Advanced tools
Comparing version 3.1.3 to 3.2.0
@@ -30,2 +30,3 @@ /// <reference types="arcgis-js-api" /> | ||
failElement?: any; | ||
loaderOptions?: Object; | ||
} | ||
@@ -32,0 +33,0 @@ export interface ArcProps extends BaseProps { |
@@ -70,3 +70,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var _this = this; | ||
loadModules(this.props.scriptUri) | ||
loadModules(this.props.scriptUri, this.props.loaderOptions) | ||
.then(function (modules) { return (_this.props.loadMap(modules, _this.state.mapContainerId) | ||
@@ -73,0 +73,0 @@ .then(function (_a) { |
@@ -39,3 +39,3 @@ var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
}); | ||
view_1.then(function () { | ||
view_1.when(function () { | ||
resolve({ map: map_1, view: view_1 }); | ||
@@ -42,0 +42,0 @@ }, function (err) { |
@@ -5,3 +5,3 @@ /// <reference types="arcgis-js-api" /> | ||
import * as WebViews from './components/WebComposites'; | ||
import { loadModules, ILoadScriptOptions } from 'esri-loader'; | ||
import { loadModules } from 'esri-loader'; | ||
declare const ReactArcGIS: { | ||
@@ -12,3 +12,3 @@ Map: (props: MapViews.MapProps) => JSX.Element; | ||
WebScene: (props: WebViews.SceneProps) => JSX.Element; | ||
esriPromise: (modules: string[], loadScriptOptions?: ILoadScriptOptions | undefined) => Promise<any[]>; | ||
esriPromise: typeof loadModules; | ||
}; | ||
@@ -15,0 +15,0 @@ export default ReactArcGIS; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("react-arcgis",["react"],t):"object"==typeof exports?exports["react-arcgis"]=t(require("react")):e["react-arcgis"]=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.d(t,"a",function(){return s}),r.d(t,"b",function(){return c});var n=r(0),o=(r.n(n),r(6)),i=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},a={onClick:"click",onDoubleClick:"double-click",onDrag:"drag",onHold:"hold",onKeyDown:"key-down",onKeyUp:"key-up",onLayerViewCreate:"layerview-create",onLayerViewDestroy:"layerview-destroy",onMouseWheel:"mouse-wheel",onPointerDown:"pointer-down",onPointerMove:"pointer-move",onPointerUp:"pointer-up",onResize:"resize"},s=function(e){return n.createElement(o.a,i({},e,{loadMap:function(t,r){var n=t[0],o=t[1];return new Promise(function(t,s){try{var c=new n(e.mapProperties),u=i({map:c,container:r},e.viewProperties),p=new o(u),l=p;Object.keys(a).forEach(function(t){e[t]&&l.on(a[t],e[t])}),p.then(function(){t({map:c,view:p})},function(e){s(e)})}catch(e){s(e)}})}}))},c=function(e){return n.createElement(o.a,i({},e,{loadMap:function(t,r){var n=t[0],o=t[1],s=t[2];return new Promise(function(t,c){try{var u=new n({portalItem:{id:e.id}});u.load().then(function(){return u.basemap.load()}).then(function(){var e=u.allLayers,t=e.map(function(e){return e.load()});return s(t.toArray())}).then(function(n){var s=new o(i({container:r,map:u},e.viewProperties));Object.keys(a).forEach(function(t){e[t]&&s.on(a[t],e[t])}),t({map:u,view:s})}).otherwise(function(e){c(e)})}catch(e){c(e)}})}}))}},function(e,t,r){!function(e,r){r(t)}(0,function(e){"use strict";function t(e){var t=document.createElement("script");return t.type="text/javascript",t.src=e,t.setAttribute("data-esri-loader","loading"),t}function r(e,t,r){var o;r&&(o=n(e,r));var i=function(){t(e),e.removeEventListener("load",i,!1),o&&e.removeEventListener("error",o,!1)};e.addEventListener("load",i,!1)}function n(e,t){var r=function(n){t(n.error||new Error("There was an error attempting to load "+e.src)),e.removeEventListener("error",r,!1)};return e.addEventListener("error",r,!1),r}function o(){return document.querySelector("script[data-esri-loader]")}function i(){var e=window.require;return e&&e.on}function a(e){return void 0===e&&(e={}),e.url||(e.url=l),new d.Promise(function(n,a){var s=o();if(s){var c=s.getAttribute("src");c!==e.url?a(new Error("The ArcGIS API for JavaScript is already loaded ("+c+").")):i()?n(s):r(s,n,a)}else i()?a(new Error("The ArcGIS API for JavaScript is already loaded.")):(e.dojoConfig&&(window.dojoConfig=e.dojoConfig),s=t(e.url),u=e.url,r(s,function(){s.setAttribute("data-esri-loader","loaded"),n(s)},a),document.body.appendChild(s))})}function s(e){return new d.Promise(function(t,r){var n=window.require.on("error",r);window.require(e,function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];n.remove(),t(e)})})}function c(e,t){return void 0===t&&(t={}),i()?s(e):(!t.url&&u&&(t.url=u),a(t).then(function(){return s(e)}))}var u,p="undefined"!=typeof window,l="https://js.arcgis.com/4.6/",d={Promise:p?window.Promise:void 0},f={getScript:o,isLoaded:i,loadModules:c,loadScript:a,utils:d};e.utils=d,e.getScript=o,e.isLoaded=i,e.loadScript=a,e.loadModules=c,e.default=f,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,r){e.exports=r(4)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"WebMap",function(){return s}),r.d(t,"WebScene",function(){return c}),r.d(t,"Map",function(){return u}),r.d(t,"Scene",function(){return p}),r.d(t,"esriPromise",function(){return l});var n=r(5),o=r(8),i=r(2),a=(r.n(i),{Map:n.a,Scene:n.b,WebMap:o.a,WebScene:o.b,esriPromise:i.loadModules});t.default=a;var s=a.WebMap,c=a.WebScene,u=a.Map,p=a.Scene,l=i.loadModules},function(e,t,r){"use strict";r.d(t,"a",function(){return a}),r.d(t,"b",function(){return s});var n=r(0),o=(r.n(n),r(1)),i=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},a=function(e){return n.createElement(o.a,i({scriptUri:["esri/Map","esri/views/MapView"]},e,{mapProperties:i({basemap:"streets-vector"},e.mapProperties),viewProperties:i({center:[-122.4443,47.2529],zoom:6},e.viewProperties)}))},s=function(e){return n.createElement(o.a,i({scriptUri:["esri/Map","esri/views/SceneView"]},e,{mapProperties:i({basemap:"satellite",ground:"world-elevation"},e.mapProperties),viewProperties:i({center:[-122.4443,47.2529],scale:5e5},e.viewProperties)}))}},function(e,t,r){"use strict";r.d(t,"a",function(){return c});var n=r(2),o=(r.n(n),r(0)),i=(r.n(o),r(7)),a=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},c=function(e){function t(t){var r=e.call(this,t)||this;return r.state={mapContainerId:Math.random().toString(36).substring(0,14),status:"loading"},r}return a(t,e),t.prototype.render=function(){var e=this,t={left:"50%",marginRight:"-50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"},r=this.props.className?this.props.style:s({height:"100%",position:"relative",width:"100%"},this.props.style),n=this.props.loadElement?this.props.loadElement:o.createElement("h3",{id:"react-arcgis-loading-text"},"Loading.."),a=this.props.failElement?this.props.failElement:o.createElement("h3",{id:"react-arcgis-fail-text"},"The ArcGIS API failed to load.");if("loaded"===this.state.status){var c=o.Children.map(this.props.children,function(t){var r=t;return o.cloneElement(r,{map:e.state.map,view:e.state.view})});return o.createElement("div",{id:"base-container",style:r,className:this.props.className},o.createElement(i.a,{id:this.state.mapContainerId,style:{width:"100%",height:"100%"}}),c)}return"loading"===this.state.status?o.createElement("div",{id:"base-container",style:r,className:this.props.className},o.createElement(i.a,{id:this.state.mapContainerId,style:{width:"100%",height:"100%"}}),o.createElement("div",{style:t},n)):o.createElement("div",{id:"base-container",style:r,className:this.props.className},o.createElement(i.a,{id:this.state.mapContainerId,style:{width:"100%",height:"100%"}}),o.createElement("div",{style:t},a))},t.prototype.componentDidMount=function(){var e=this;Object(n.loadModules)(this.props.scriptUri).then(function(t){return e.props.loadMap(t,e.state.mapContainerId).then(function(t){var r=t.map,n=t.view;e.setState({map:r,view:n,status:"loaded"}),e.props.onLoad&&e.props.onLoad(r,n)}).catch(function(e){throw e})}).catch(function(t){e.setState({status:"failed"}),e.props.onFail&&e.props.onFail(t)})},t}(o.Component)},function(e,t,r){"use strict";var n=r(0),o=(r.n(n),this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}()),i=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.render=function(){return n.createElement("div",{id:this.props.id,style:this.props.style})},t.prototype.shouldComponentUpdate=function(){return!1},t}(n.Component);t.a=i},function(e,t,r){"use strict";r.d(t,"a",function(){return a}),r.d(t,"b",function(){return s});var n=r(0),o=(r.n(n),r(1)),i=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},a=function(e){return n.createElement(o.b,i({scriptUri:["esri/WebMap","esri/views/MapView","dojo/promise/all"]},e,{viewProperties:e.viewProperties,mapProperties:e.mapProperties}))},s=function(e){return n.createElement(o.b,i({scriptUri:["esri/WebScene","esri/views/SceneView","dojo/promise/all"]},e,{viewProperties:e.viewProperties,mapProperties:e.mapProperties}))}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("react-arcgis",["react"],t):"object"==typeof exports?exports["react-arcgis"]=t(require("react")):e["react-arcgis"]=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.d(t,"a",function(){return s}),r.d(t,"b",function(){return c});var n=r(0),o=(r.n(n),r(6)),i=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},a={onClick:"click",onDoubleClick:"double-click",onDrag:"drag",onHold:"hold",onKeyDown:"key-down",onKeyUp:"key-up",onLayerViewCreate:"layerview-create",onLayerViewDestroy:"layerview-destroy",onMouseWheel:"mouse-wheel",onPointerDown:"pointer-down",onPointerMove:"pointer-move",onPointerUp:"pointer-up",onResize:"resize"},s=function(e){return n.createElement(o.a,i({},e,{loadMap:function(t,r){var n=t[0],o=t[1];return new Promise(function(t,s){try{var c=new n(e.mapProperties),u=i({map:c,container:r},e.viewProperties),p=new o(u),l=p;Object.keys(a).forEach(function(t){e[t]&&l.on(a[t],e[t])}),p.when(function(){t({map:c,view:p})},function(e){s(e)})}catch(e){s(e)}})}}))},c=function(e){return n.createElement(o.a,i({},e,{loadMap:function(t,r){var n=t[0],o=t[1],s=t[2];return new Promise(function(t,c){try{var u=new n({portalItem:{id:e.id}});u.load().then(function(){return u.basemap.load()}).then(function(){var e=u.allLayers,t=e.map(function(e){return e.load()});return s(t.toArray())}).then(function(n){var s=new o(i({container:r,map:u},e.viewProperties));Object.keys(a).forEach(function(t){e[t]&&s.on(a[t],e[t])}),t({map:u,view:s})}).otherwise(function(e){c(e)})}catch(e){c(e)}})}}))}},function(e,t,r){!function(e,r){r(t)}(0,function(e){"use strict";function t(e){var t=document.createElement("script");return t.type="text/javascript",t.src=e,t.setAttribute("data-esri-loader","loading"),t}function r(e){var t=document.createElement("link");return t.rel="stylesheet",t.href=e,t}function n(e,t,r){var n;r&&(n=o(e,r));var i=function(){t(e),e.removeEventListener("load",i,!1),n&&e.removeEventListener("error",n,!1)};e.addEventListener("load",i,!1)}function o(e,t){var r=function(n){t(n.error||new Error("There was an error attempting to load "+e.src)),e.removeEventListener("error",r,!1)};return e.addEventListener("error",r,!1),r}function i(){return document.querySelector("script[data-esri-loader]")}function a(e){return document.querySelector('link[href*="'+e+'"]')}function s(){var e=window.require;return e&&e.on}function c(e){var t=a(e);return t||(t=r(e),document.head.appendChild(t)),t}function u(e){return void 0===e&&(e={}),e.url||(e.url=h),new m.Promise(function(r,o){var a=i();if(a){var u=a.getAttribute("src");u!==e.url?o(new Error("The ArcGIS API for JavaScript is already loaded ("+u+").")):s()?r(a):n(a,r,o)}else s()?o(new Error("The ArcGIS API for JavaScript is already loaded.")):(e.css&&c(e.css),e.dojoConfig&&(window.dojoConfig=e.dojoConfig),a=t(e.url),d=e.url,n(a,function(){a.setAttribute("data-esri-loader","loaded"),r(a)},o),document.body.appendChild(a))})}function p(e){return new m.Promise(function(t,r){var n=window.require.on("error",r);window.require(e,function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];n.remove(),t(e)})})}function l(e,t){return void 0===t&&(t={}),s()?p(e):(!t.url&&d&&(t.url=d),u(t).then(function(){return p(e)}))}var d,f="undefined"!=typeof window,h="https://js.arcgis.com/4.6/",m={Promise:f?window.Promise:void 0},v={getScript:i,isLoaded:s,loadModules:l,loadScript:u,utils:m};e.utils=m,e.getScript=i,e.isLoaded=s,e.loadCss=c,e.loadScript=u,e.loadModules=l,e.default=v,Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,r){e.exports=r(4)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"WebMap",function(){return s}),r.d(t,"WebScene",function(){return c}),r.d(t,"Map",function(){return u}),r.d(t,"Scene",function(){return p}),r.d(t,"esriPromise",function(){return l});var n=r(5),o=r(8),i=r(2),a=(r.n(i),{Map:n.a,Scene:n.b,WebMap:o.a,WebScene:o.b,esriPromise:i.loadModules});t.default=a;var s=a.WebMap,c=a.WebScene,u=a.Map,p=a.Scene,l=i.loadModules},function(e,t,r){"use strict";r.d(t,"a",function(){return a}),r.d(t,"b",function(){return s});var n=r(0),o=(r.n(n),r(1)),i=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},a=function(e){return n.createElement(o.a,i({scriptUri:["esri/Map","esri/views/MapView"]},e,{mapProperties:i({basemap:"streets-vector"},e.mapProperties),viewProperties:i({center:[-122.4443,47.2529],zoom:6},e.viewProperties)}))},s=function(e){return n.createElement(o.a,i({scriptUri:["esri/Map","esri/views/SceneView"]},e,{mapProperties:i({basemap:"satellite",ground:"world-elevation"},e.mapProperties),viewProperties:i({center:[-122.4443,47.2529],scale:5e5},e.viewProperties)}))}},function(e,t,r){"use strict";r.d(t,"a",function(){return c});var n=r(2),o=(r.n(n),r(0)),i=(r.n(o),r(7)),a=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},c=function(e){function t(t){var r=e.call(this,t)||this;return r.state={mapContainerId:Math.random().toString(36).substring(0,14),status:"loading"},r}return a(t,e),t.prototype.render=function(){var e=this,t={left:"50%",marginRight:"-50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"},r=this.props.className?this.props.style:s({height:"100%",position:"relative",width:"100%"},this.props.style),n=this.props.loadElement?this.props.loadElement:o.createElement("h3",{id:"react-arcgis-loading-text"},"Loading.."),a=this.props.failElement?this.props.failElement:o.createElement("h3",{id:"react-arcgis-fail-text"},"The ArcGIS API failed to load.");if("loaded"===this.state.status){var c=o.Children.map(this.props.children,function(t){var r=t;return o.cloneElement(r,{map:e.state.map,view:e.state.view})});return o.createElement("div",{id:"base-container",style:r,className:this.props.className},o.createElement(i.a,{id:this.state.mapContainerId,style:{width:"100%",height:"100%"}}),c)}return"loading"===this.state.status?o.createElement("div",{id:"base-container",style:r,className:this.props.className},o.createElement(i.a,{id:this.state.mapContainerId,style:{width:"100%",height:"100%"}}),o.createElement("div",{style:t},n)):o.createElement("div",{id:"base-container",style:r,className:this.props.className},o.createElement(i.a,{id:this.state.mapContainerId,style:{width:"100%",height:"100%"}}),o.createElement("div",{style:t},a))},t.prototype.componentDidMount=function(){var e=this;Object(n.loadModules)(this.props.scriptUri,this.props.loaderOptions).then(function(t){return e.props.loadMap(t,e.state.mapContainerId).then(function(t){var r=t.map,n=t.view;e.setState({map:r,view:n,status:"loaded"}),e.props.onLoad&&e.props.onLoad(r,n)}).catch(function(e){throw e})}).catch(function(t){e.setState({status:"failed"}),e.props.onFail&&e.props.onFail(t)})},t}(o.Component)},function(e,t,r){"use strict";var n=r(0),o=(r.n(n),this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}()),i=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.render=function(){return n.createElement("div",{id:this.props.id,style:this.props.style})},t.prototype.shouldComponentUpdate=function(){return!1},t}(n.Component);t.a=i},function(e,t,r){"use strict";r.d(t,"a",function(){return a}),r.d(t,"b",function(){return s});var n=r(0),o=(r.n(n),r(1)),i=this&&this.__assign||Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},a=function(e){return n.createElement(o.b,i({scriptUri:["esri/WebMap","esri/views/MapView","dojo/promise/all"]},e,{viewProperties:e.viewProperties,mapProperties:e.mapProperties}))},s=function(e){return n.createElement(o.b,i({scriptUri:["esri/WebScene","esri/views/SceneView","dojo/promise/all"]},e,{viewProperties:e.viewProperties,mapProperties:e.mapProperties}))}}])}); | ||
//# sourceMappingURL=index.js.map |
@@ -11,3 +11,3 @@ { | ||
"@types/react-dom": "^16.0.3", | ||
"esri-loader": "^2.0.0" | ||
"esri-loader": "^2.2.0" | ||
}, | ||
@@ -24,2 +24,3 @@ "devDependencies": { | ||
"mocha": "^5.0.0", | ||
"mocha-junit-reporter": "^1.17.0", | ||
"mock-require": "^3.0.1", | ||
@@ -69,6 +70,8 @@ "npm-run-all": "^4.1.2", | ||
"build:scripts": "webpack -p", | ||
"test": "nyc mocha" | ||
"test": "nyc mocha", | ||
"test:junit": "nyc mocha --reporter mocha-junit-reporter", | ||
"report:cobertura": "nyc report --reporter cobertura" | ||
}, | ||
"types": "dist/esm/index.d.ts", | ||
"version": "3.1.3" | ||
"version": "3.2.0" | ||
} |
@@ -1,2 +0,4 @@ | ||
![Version 3.1.3](https://img.shields.io/badge/npm-v3.1.3-blue.svg) ![100% Code Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg) | ||
[![Version](https://shields.nsenger.com/react-arcgis-master/version)](https://www.npmjs.com/package/react-arcgis) | ||
[![Build Status](https://shields.nsenger.com/react-arcgis-master/status)](https://jenkins.nsenger.com/job/react-arcgis-master/) | ||
[![Coverage](https://shields.nsenger.com/react-arcgis-master/coverage)](https://jenkins.nsenger.com/job/react-arcgis-master/) | ||
@@ -11,3 +13,24 @@ # React-ArcGIS | ||
## Version 3.2.0: | ||
- You can now include loader options directly in react-arcgis components. This provides an easy way to migrate to esri's newer async/await compatible promises in your react-arcgis application. For example: | ||
```js | ||
render() { | ||
return ( | ||
<Map | ||
loaderOptions={{ | ||
dojoConfig: { | ||
has: { | ||
"esri-promise-compatibility": 1 | ||
} | ||
} | ||
}} | ||
/> | ||
); | ||
} | ||
``` | ||
Please see [this blog post](https://blogs.esri.com/esri/arcgis/2017/12/14/making-better-promises/) for more information regarding changes to the promise implementation in the ArcGIS API for JavaScript. | ||
## Version 3.1.2: | ||
@@ -32,3 +55,3 @@ | ||
*Don't forget to load the js api stylesheet! [https://js.arcgis.com/4.5/esri/css/main.css](https://js.arcgis.com/4.5/esri/css/main.css)* | ||
*Don't forget to load the js api stylesheet! [https://js.arcgis.com/4.6/esri/css/main.css](https://js.arcgis.com/4.6/esri/css/main.css)* | ||
@@ -35,0 +58,0 @@ *If you need to support browsers lacking a native promise implementation, you will have to add a global `Promise` constructor polyfill to your project, as react-arcgis does not include one. I recommend [es6-promise](https://www.npmjs.com/package/es6-promise).* |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
144933
31
744
297
0
24
Updatedesri-loader@^2.2.0