Comments (8)
Hi again! I've found the issue. The problem was I have a computer with retina display, and since the pixel density is double, the canvas was literally divided by two. I've fixed it by adding to the return of the function buildBounds the multiplier window.devicePixelRatio:
return {x: x, y: y, xMax: width * window.devicePixelRatio, yMax: yMax * window.devicePixelRatio, width: width * window.devicePixelRatio, height: height * window.devicePixelRatio};
from wind-layer.
It's not fixed yet. Now the bounds are ok, but the particle origin, bucket and endpoint is still the way it was before. This only happens with retina displays :(
from wind-layer.
@imgorosabel Can you provide the system version and browser version?
from wind-layer.
@imgorosabel Can you provide the system version and browser version?
Mac OS X 10.14.6 and Firefox 70.0.1, but the same happens with Chrome 78.0.3904.108
from wind-layer.
@imgorosabel Ok, will check the problem in these two days
from wind-layer.
Great! Many thanks, if I can help you somehow let me know
from wind-layer.
@imgorosabel
Temporarily added a devicepixelratio parameter,But this can only solve the problem temporarily, not the optimal solution. Please keep paying attention.
new OlWind(data, {
layerName: 'data',
projection: 'EPSG:4326',
devicePixelRatio: window.devicePixelRatio,
map: map,
colorScale: [
"rgb(36,104, 180)",
"rgb(60,157, 194)",
"rgb(128,205,193 )",
"rgb(151,218,168 )",
"rgb(198,231,181)",
"rgb(238,247,217)",
"rgb(255,238,159)",
"rgb(252,217,125)",
"rgb(255,182,100)",
"rgb(252,150,75)",
"rgb(250,112,52)",
"rgb(245,64,32)",
"rgb(237,45,28)",
"rgb(220,24,32)",
"rgb(180,0,35)"
],
minVelocity: 0,
maxVelocity: 10,
velocityScale: 0.05,
particleAge: 90,
lineWidth: 1,
particleMultiplier: 0.01,
});
from wind-layer.
Thanks, it works!! MANY MANY Thanks! I'll check for future updates
from wind-layer.
Related Issues (20)
- maptalks-wind adding gl rendering mode HOT 1
- 色斑图必须采用图片吗? HOT 4
- OpenLayers 绘制色斑图 HOT 2
- 风流场渲染之后,其他的交互会导致其重新渲染,底图加载也是如此😂😂😂😂 HOT 4
- ol-wind, setData报错 HOT 2
- The mapbox-wind cannot be rendered using 'jsonArray'. HOT 4
- maptalks版本依赖问题 HOT 1
- The mapbox-wind's particles and scalarFill layer cannot overlap with each other HOT 3
- wind layer bounds decrease as zoom increases HOT 8
- 色斑图错位 HOT 7
- 气象上的windbarb是否支持 HOT 1
- When mapbox loads windlayer, it ends at 180 degrees east longitude HOT 1
- ol-wind加载流场 在隐藏图层/显示图层 后流场的流动效果停止 HOT 2
- 粒子绘制过程中会产生轨迹残留,影响视觉效果,如何解决呢。求助,急!!! HOT 1
- 移动端没有适配 HOT 1
- openlayers 叠加色斑图 HOT 1
- 风场在跨东经180度时断开 HOT 1
- 高德api2.0版本报错 HOT 1
- 高德地图报错
- 高德2.0报错,什么时候更新对2.0的支持?报错信息如下: HOT 3
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 wind-layer.