WorldWindEarth / worldwindjs

WorldWindJS is a community maintained fork of the WebWorldWind virtual globe SDK from NASA - an interactive 3D globe library featuring maps, imagery and terrain plus 2D map projections.
https://worldwind.earth/worldwindjs/
38 stars 9 forks source link

KML IconStyle sets icon color #60

Closed lowswaplab closed 3 years ago

lowswaplab commented 3 years ago

Description of the Change

Set icon color according to KML IconStyle color tag

Why Should This Be In Core?

To better support KML files.

Benefits

To better support KML files.

Potential Drawbacks

None.

Applicable Issues

None.

ComBatVision commented 3 years ago

Please, remove duplicate in condition: style.kmlColorMode && style.kmlColorMode

lowswaplab commented 3 years ago

Done.

The next PR I want to do is use the KML "heading" tag to rotate the icon. The problem is that Placemark have "imageRotation" and "imageRotationReference" variables. Those should probably be in PlacemarkAttributes. (There are actually a lot of attributes that should probably be in PlacemarkAttributes instead of the Placemark itself.)

The code I've tested has imageRotation and imageRotationReference duplicated in PlacemarkAttributes. I don't think this is a good idea duplicating variables...

ComBatVision commented 3 years ago

I think you can update Placemark attributes from KML style in that place, where you put a code in previous closed PR.

lowswaplab commented 3 years ago

I think I found where Placemark variables (e.g. altitudeMode) are used in KmlPlacemark.js: this._renderable.altitudeMode.

I'll try to do something similar with imageRotation and imageRotationReference.