NASAWorldWind / WebWorldWind

The NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.
897 stars 384 forks source link

Surface shape line width is multiplied by 4 #128

Open balhar-jakub opened 7 years ago

balhar-jakub commented 7 years ago

The multiplication: https://github.com/NASAWorldWind/WebWorldWind/blob/master/src/shapes/SurfaceShape.js#L874

The intent is to make sure that the line width is consistent between SurfaceShapes and Shapes while also being roughly the same size as for example in the Cesium or Google Earth.

balhar-jakub commented 7 years ago

https://forum.worldwindcentral.com/forum/web-world-wind/web-world-wind-help/157216-surfacepolyline-outline-width-renders-approximately-3-times-wider-than-in-cesium

balhar-jakub commented 7 years ago

https://github.com/NASAWorldWind/WebWorldWind/pull/132

strikerM commented 7 years ago

The fix only works for polygons that cross the anti-meridian or contain a pole, since those require drawing the the interior and outline individually.

You should apply the same fix to line 833. https://github.com/NASAWorldWind/WebWorldWind/blob/develop/src/shapes/SurfaceShape.js#L833

AkeluX commented 7 years ago

@strikerM thanks for noticing the discrepancy.

@balhar-jakub please perform and test the require change.

AkeluX commented 7 years ago

The second part of the fix was merged and this issue should now be closed. It's in fb8d7e1.

@alberto-acevedo could you confirm that this solves your issue as well?