CesiumGS / CesiumGS/cesium

KML icons have incorrect aspect ratio

Open
#8,558 2 comments 0 reactions 0 assignees View on GitHub
category - kml type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

It seems that CesiumJS expects KML icons to be a specific aspect ratio (square?) and coerces my icons into that aspect ratio.

Here's a simple KML test:
[image_test.zip](https://github.com/AnalyticalGraphicsInc/cesium/files/4092872/image_test.zip)

This is the image I have in the KML, dimensions 400x100:

![image](https://user-images.githubusercontent.com/1711126/72831563-204a9e00-3c51-11ea-9d94-131d2cd01c60.png)

How it looks in Google Earth:

![image](https://user-images.githubusercontent.com/1711126/72831646-42dcb700-3c51-11ea-98e4-a5cbf9f5c9ed.png)

When I drag and drop it in the [Cesium Viewer](https://cesium.com/cesiumjs/cesium-viewer/index.html):

![image](https://user-images.githubusercontent.com/1711126/72831708-5d169500-3c51-11ea-9476-9f3f7d5fb976.png)

Contributor guide

Open the contributing guide

Research direction

Start by opening image_test.zip in the Cesium Viewer and compare the 400x100 KML icon with the Google Earth result shown in the issue. Trace how CesiumJS loads and sizes that KML image, then verify that the rendered icon preserves the source aspect ratio rather than coercing it to a square.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.