-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: projection1.getUnits is not a function proj.js:399:33 using dist/OlWindy.js with npm #45
Comments
I changed to use the esm version but with the same results. But I think I resolved this issue by making the following changes: In
and changing L844 to be:
Now I don't get the above error, but when I turn on the animation, it runs while tiles are loading, but stops when all the tiles have loaded. If zoom or pan and new tiles are loaded the animation starts and runs as long as tiles are loading. Any help would be greatly appreciated. |
One additional piece of info is that I get |
function toggleWindy() {
if ($(this).prop('checked')) {
if (windData) {
windy.appendTo(map);
windy.setData(windData);
}
}
else {
windy.clearWind();
}
} |
|
OK, changing toggleWindy the way you have it improves things, now when I toggle it on the first time, the wind starts and runs as expected but I still get the
EDIT: I fixed this by moving the appendTo() out of the on/off control and placing it after the windy layer definition. So it looks to be working with only the change in defining the projection object. |
根据这个人说的解决测试成功
Hi, this is an awesome project! Thanks.
I'm using:
And windData is your
out.json
.The problem appears to be that projection1 = 'EPSG:3857' instead of a projection object.
In Image.js:153, this is sourceProjection which comes from L149,
const sourceProjection = this.getProjection()
This happens when I toggle on the animation using the above code.
The text was updated successfully, but these errors were encountered: