mike-000
mike-000
The canvas should use device pixels, not css pixels. e.g. context.fillRect( x * pixelRatio, y * pixelRatio, width * pixelRatio, height * pixelRatio );
The spherical geometry formula for movement on a great circle route is lat2 = Math.asin(Math.sin(lat1) * Math.cos(distance / radius) + Math.cos(lat1) * Math.sin(distance / radius) * Math.cos(bearing)); lon2 = lon1...
Substituting your canvas for the icon url in this example https://openlayers.org/en/latest/examples/icon.html works as expected https://codesandbox.io/s/icon-forked-jp23rn?file=/main.js
zIndex can be set in style functions. e.g. use the x coordinate so overlapping features are stacked left to right https://codesandbox.io/s/cluster-forked-u14rwm?file=/main.js
The parser does not add projection definitions to OpenLayers. Your application will need to include and register the proj4 definitions of all projections which might be needed except for EPSG:3857...
It could also be handled by the application as suggested in #3898
Distances measured in EPSG:3857 projection units are only true at the equator. Elsewhere objects appear bigger in the flat projection than they are on the spherical planet (where Greenland is...
With your data `line.getLength()` returns 35.922 That should correspond to `Math.sqrt(dx * dx + dy * dy)` where `dx = 8649890.62520487 - 8649887.3523805` (3.27282437) `dy = 1459088.71307292 - 1459052.94032918` (35.77274374)...
Yes a line `[P1, P2, P1]` will measure the distance from P1 to P2 and back to P1. If you only need P1 to P2 use `[P1, P2]`
#15231 is a duplicate of https://stackoverflow.com/q/77263582/10118270 It could be done using the view `change:resolution` event as in https://codesandbox.io/s/heatmap-earthquakes-forked-3vs5qn?file=/main.js Note also that the weight function is not truly dynamic, a `change`...