Comments (3)
Hi @hlam94 - I haven't tested this on v4.19 yet. Apparently esri have removed dojo dependencies in that release, so their module / class system has changed. I can see this causing all sort of problems without some refactoring.
What you've done to remove the declared call is correct, that was an old style way to extend their Accessor classes. It's probably not that which is the problem though, but instead major changes to their api.
If I get a chance I'll look at upgrading this, but I don't use it anymore personally and haven't looked at the arcgis js api for a while as well - I can't guarantee I'll get around to it. If you work something out feel free to submit a PR.
from animatedenvironmentlayer.
We did 2 things to get vectors to show up in 4.20
1.) We found no documented changes to the BaseLayerView2D object, but found that the extended attach method was not being called by ESRI as it had been in previous API versions. It is unknown whether the issue is with the way the ESRI object is behaving or that this object is not able to extended the method properly. Once we confirmed that this.attach() was no longer being triggered the same way post 4.15, the issue was resolved by manually calling this.attach() when AnimatedEnvironmentLayerView2D was called. We tried to call the attach method in predraw because BaseLayerView2D is reported to call its attach method just before the layer draws but doing so in this code would destroy the data because the windy object is overwritten and the data is destroyed. I do not think that this is a proper fix, but it is a slap job for now. Maybe a bigger brain has a proper way to resolve the issue.
function AnimatedEnvironmentLayerView2D(props) {
var _this = _super.call(this) || this;
_this.view = props.view;
_this.layer = props.layer;
_this.view.on("resize", function () {
if (!_this.context)
return;
// resize the canvas
_this.context.canvas.width = _this.view.width;
_this.context.canvas.height = _this.view.height;
});
watchUtils.watch(_this.layer, "visible", function (nv, olv, pn, ta) {
if (!nv) {
_this.clear();
}
else {
_this.prepDraw();
}
});
this.attach();
return _this;
}
2.) 4.15 release notes suggested that .otherwise() will no longer be supported as they have moved to native promises rather than dojo promises. (https://developers.arcgis.com/javascript/latest/4.15/#return-native-promises)
We experienced fails here that were likely unrelated to this change, but we made it anyway and it seems to work without issue.
esriRequest(this.url, {
responseType: "json"
})
.then(function (response) {
_this.dataFetchRequired = false;
_this.doDraw(response.data); // all sorted draw now.
_this.dataLoading = false;
})
.catch(function (err) {
console.error("Error occurred retrieving data. " + err);
_this.dataLoading = false;
_this.isErrored = true;
});
from animatedenvironmentlayer.
I merged a PR recently that provided support for v4.21. So closing this.
#11 PR to update to 4.21
from animatedenvironmentlayer.
Related Issues (9)
- How can I find the realtime data of wind HOT 1
- any plan to make a version for arcgis js v3.x HOT 1
- Error in updated hook: "TypeError: animatedEnvironmentLayer_1.AnimatedEnvironmentLayer is not a constructor" HOT 4
- Support FOR 3D solutions HOT 2
- [esri.support.LayersMixin] #add() The item being added is not a Layer or a Promise that resolves to a Layer. HOT 2
- How to stretch the animation to cover entire screen ? HOT 6
- Wind animation is not visible on full screen HOT 8
- I found the reason why the artboard is not full screen but there is a new bug HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animatedenvironmentlayer.