Flexible handling for KML network resources
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
I asked about this in #873 and was told to start a new issue, so: I'm trying to improve our Google Earth compatibility. We have users on Google Earth Pro 7.1 and 7.3, and both have an infuriating feature -- the default Placemark icon set uses links like `http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png`. That would be fine, except if the machine is not on the internet... Google Earth Pro still happily fills in the correct image! They must have an internal pre-fetched representation of the default icons and silently use those instead of looking for the actual file online.
What does this have to do with Cesium? Well, there are a number of compatibility / interoperability features on the roadmap that specifically cater to the Google "flavor" of KML. Ideally, this "feature" (ugh) of Google Earth could also be replicated, so that our Cesium-based viewer can open KML/KMZ exported from GE. I haven't looked into how licensing would work with the Google-provided images, but they might map nicely to pre-existing pins in the default set Cesium already has.
More generally, maybe we could pass a function (or Proxy?) to the KMLDataSource that is allowed to rewrite resource URIs before they're requested from the network? This would be more work -- for the above use case, we'd have to grab and host copies of the default icon set somewhere on our server -- but it would also be helpful in other situations, for example, we have internal services that provide the "base" KML file over HTTPS but include NetworkLinks over HTTP, which quietly fails in modern browsers.
I realize this is sort of two related requests, but I wanted feedback on which solution (overriding specific image paths to emulate Google Earth Client behavior, versus a generic API for rewriting network resource requests) would be preferred by the team.
Contributor guide
Research direction
Start with the KMLDataSource entry point and investigate how resource URIs are currently requested. Compare the proposed Google Earth-specific icon handling with a generic URI-rewriting function or Proxy; completion requires choosing and implementing a defined approach for KML/KMZ network resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100