Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not displaying GroundOverlay in KML file. #4212

Closed
dwhipps opened this issue Aug 17, 2016 · 5 comments
Closed

Not displaying GroundOverlay in KML file. #4212

dwhipps opened this issue Aug 17, 2016 · 5 comments

Comments

@dwhipps
Copy link
Contributor

dwhipps commented Aug 17, 2016

This is likely a two-part ticket, but for starters, the KML file I have here:

https://earthdata.layeredearth.com/Layers/Earth/Climate%20Change/Other/Malaria%20in%20Africa%20Projections.kmz
... does not display anything in Cesium, seen in SANDCASTLE here:

http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=a2c8d3fa055a3a341114040331265ac7

I suspect this has to do with the nested elements in the kml, but I can see that processGroundOverlay is getting called, they're just not being displayed.

(The second part of this, which I'll put in a separate ticket, is that Cesium shouldn't be processing feature nodes unless they're 'visible' as defined here: https://developers.google.com/kml/documentation/kmlreference#folder)

A Folder is used to arrange other Features hierarchically (Folders, Placemarks, NetworkLinks, or Overlays). A Feature is visible only if it and all its ancestors are visible.

@hpinkos
Copy link
Contributor

hpinkos commented Aug 17, 2016

Thanks @dwhipps!
I think the issue might be related to a bug we've seen with timespans: #4041

For visibility, from looking at the code it looks like that is being processed correctly. When is sees visibility of zero, it sets show to false. I think we still want to process it in case a user wants to set show to true later on.

@dwhipps
Copy link
Contributor Author

dwhipps commented Aug 17, 2016

It's not clear on whether this has a decent chance of getting fixed. It's a bit of a show-stopper, as nothing at all renders.

@hpinkos
Copy link
Contributor

hpinkos commented Aug 17, 2016

Sorry, I can't promise that we'll be able to get to it immediately.
We are planning to spend a few days in October tackling frequently requested bug fixes. This seems like it might be a good issue for us to look into then since it is effecting multiple users.

@mramato
Copy link
Contributor

mramato commented Aug 18, 2016

@dwhipps thanks for the report. If you're up for it, there's no need to "wait for us" to do something, Cesium is a community with lots of contributors and we are more than happy to take a pull request for this or any other issue. This sounds like something that would be isolated to code in KmlDataSource.js

@dwhipps
Copy link
Contributor Author

dwhipps commented Aug 19, 2016

After further investigation, this appears to be a case of Google Earth (and WolrdWind) being more lenient than Cesium. There were multiple GroundOverlay nodes with the same node "id" (these should be unique), so when getOrCreateEntity is called inside processFeature, the existing entities were being found with that id, no new entity was created, and entity.show was being set to false (because the last instance was not 'visible'.)

I confirmed this by simply changing the duplicated node ids. All was fine after that.

In short, I don't think this is actually a bug in Cesium. Not sure if there's a way to warn if multiple nodes are found with the same ID, but seems like a real edge-case.

I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants