Open andr3nun3s opened 11 years ago
This is a good start. Let's concentrate on Placemark and geometry first. We can just render point geometry as default billbboards and everything else as white lines and polygons. This will help us get basic architecture in place and also show some early visual progress. We'll probably have to further break up some of these roadmap items into smaller tasks as we go.
I believe that Point and LineString is done.
I've also marked style processing and styleUrl.
Hey @mramato, how's this going? Is there anything I can do to help out?
Hey @andre-nunes. I haven't worked directly on KML in a little while but #1444 adds some major features that we needed in order to move forward (such as extruded polygons), so once that's in master and I merge it down, there should be some exciting stuff.
One thing you could start looking into is supporting the various Balloon
options and styles. There's some basic code in their now that hooked up the description
property to load balloon data in our new InfoBox
widget, sync up and give it a try. We would want to also handle BallonStyle
and ExtendedData
. I have at least one KMZ I can send you that uses these, let me know and I'll email you.
Other than that, feel free to just review what's there (and the list above) and see if there's anything you want to do. No matter how small, feel free to open a pull request into this branch any time.
Yes, please send me the KMZ and I'll start looking into Ballon
options and styles during the week!
I did another pass on the main task list and unchecked most of the boxes for now. My plan is to go through what we have and validate/complete each item and then I'll start checking things back on one at a time.
Hey, I'd like to help out if possible, I was really busy last time and would like to make up for it. Just let me get up to speed on current developments.
Is there anything specific I could look into?
That would be awesome. I'm in the process of figuring out where we left off (since I haven't looked at this code in months) but once I have a plan of attack put together I'll let you know and we can split up the work. I'll also probably create a new mailing list post to let people know what we're up to and where we are going. Are you still in school, or have you graduated?
That sounds good!
I'm still in school but as I'm just attending some leftover courses I'll have more free time during this year.
Let me know when you've got the plan worked out.
Hey @andre-nunes I know we haven't talked much but I just wanted to let you know that we just opened a PR for KML to go into master (link above this post). There's still a lot of work to do with KML overall, but it's looking really good for a bunch of use cases. That's again for getting the ball started on this!
Hi @mramato, I'm really glad to see some of my work being finally merged into cesium, let me know if there's something I can help out with in my free time. Oh and I just noticed that you've updated GSoC's ideas for 2015, is Cesium applying this year? I might shoot you an email regarding that ;)
Yes, we're applying. I assumed you graduated already. Definitely let me know if you're interested and what you want to work on.
Some, because I didn't try them all, of the KML files available from http://activefiremaps.fs.fed.us/googleearth.php result in error.
An error occurred while loading the file: conus_latest_modis.kml An error occurred while loading the file, which may indicate that it is invalid. A detailed error report is below:
Request has failed.
The file https://www.google.com/maps/d/kml?mid=zp8nK_5H0MFQ.kzTmU5XK-qJQ results in the following:
An error occurred while loading the file: 2015 California Fire Map.kmz An error occurred while loading the file, which may indicate that it is invalid. A detailed error report is below:
TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined at Autolinker.HtmlParser.Autolinker.Util.extend.parse (http://localhost:8080/Source/ThirdParty/Autolinker.js:947:24) at Autolinker.link (http://localhost:8080/Source/ThirdParty/Autolinker.js:359:15) at processDescription (http://localhost:8080/Source/DataSources/KmlDataSource.js:1225:27) at processFeature (http://localhost:8080/Source/DataSources/KmlDataSource.js:1288:9) at processPlacemark (http://localhost:8080/Source/DataSources/KmlDataSource.js:1331:17) at processDocument (http://localhost:8080/Source/DataSources/KmlDataSource.js:1319:21) at processFolder (http://localhost:8080/Source/DataSources/KmlDataSource.js:1327:9) at processDocument (http://localhost:8080/Source/DataSources/KmlDataSource.js:1319:21) at processFeatureNode (http://localhost:8080/Source/DataSources/KmlDataSource.js:1477:13) at http://localhost:8080/Source/DataSources/KmlDataSource.js:1502:13
Thanks @GatorScott. The Request has failed.
is a CORS issue. Just like imagery, any KML files loaded via url to another website or that contain a NetworkLink to another website either needs CORS to be enabled on that server or it has to go through a proxy. I'm writing up a tutorial on using KML in Cesium and I plan on having a section covering this.
That being said, once I used a proxy, I got a lot of errors about invalid styles; so I'll definitely look into and fix the issue for all KML on that page.
The length issue appears to be a clear cut bug caused by KML objects with no description but an empty ExtendedData
node. It's an easy fix that I'll have a PR open for in a few minutes.
Thanks again for the link.
The "2015 California Fire Map KML" works now but is displaying the placemark names using a serif font that is pretty illegible.
The "2015 California Fire Map KML" works now but is displaying the placemark names using a serif font that is pretty illegible.
It's using the browser's default san-serif font, but I agree it could be done better. I also want to allow people to select the font to use for labels as well. Cesium's label rendering as a whole needs improvements, this problem is not specific to KML. I'll write up an issue, since I don't think we have one right now.
You wrote "san-serif" when it should be "sans-serif" which is French for without serif.
Looks like that typo is also in the KML code, so it's not even using sans-serif
but instead whatever the default browser font is. Unfortunately, fixing it doesn't fix the overall problem so we still have a bug somewhere in LabelCollection
or writeTextToCanvas
. Thanks for the heads up.
Could you make that a bold sans-serif by default? It looks way better.
I tried to get a non-bold picture but the California fire file doesn't work from cesiumjs.org.
I opened #2549 which majorly improves font issues (but is going to probably be partially held up by #2130). We could go with a bold in the meantime, I also recommended a monospace font in a comment in that PR which looks good without bolding.
Is there a way to control z-level for polygons loads through KMLs?
I have placemarks loaded into my viewer:
But when I load a polygon over the are the placemarks are buried behind it, barely visable:
Is there a way to make it so the placemark undeaneath can come to the top? A way to control the z-level? I believe a problem might be that the polygon kml acting at the large blue overlay has the attribute: gx:altitudeModeclampToSeaFloor/gx:altitudeMode
And I noticed that "gx:altitudeMode" has yet to incorporated into the API, perhaps that is the problem?
I swear I answered this yesterday, but I guess I never submitted the comment. I just posted an answer to the same question on the mailing list. I assume that was you too?
Hi, How can I get the coordinates from Kml file using JavaScript
Hi folks, is there anyone working on lookAt
right now? If not, could someone point me at where I might want to look to add this or at least access the data in the KML? Thanks.
@maburiza and @Hoverbear in the future, please use the forum for general questions and discussions. More people will see it and you're likely to get a faster answer.
@maburiza We don't have a way to directly get the extent of an entire file (since it changes over time), but you can iterate the loaded entities and discover any information you need.
@Hoverbear No one is working on lookAt, but if you are interested in adding the capability, we would be willing to look at a pull request. My first approach would be to modify processFeature
in KmlDataSource
to load the lookAt
element and convert it and assign it to the viewFrom
property on the Entity
being created. There might be some roadblocks to this approach but if you take it as far as you can and open a PR, we can help you finish it.
Please create a forum topic to continue any further discussion.
There are some sample KML files for regions in this forum thread https://groups.google.com/forum/#!topic/cesium-dev/7BTA9RCCdIc
Other resources for regions. I find them more clear for me than the KML reference:
There appears to be no support for NetworkLink/Link/viewRefreshMode, viewRefreshTime and viewFormat. Those would be very helpful. We use:
@13kenney Yes, this is explicitly marked not-support in the above roadmap. We will be implementing sometime over the next few months (but don't have an exact ETA).
Thanks, great to hear it is coming!
Mark
On Aug 17, 2015, at 1:33 PM, Matthew Amato notifications@github.com wrote:
@13kenney Yes, this is explicitly marked not-support in the above roadmap. We will be implementing sometime over the next few months (but don't have an exact ETA).
— Reply to this email directly or view it on GitHub.
Hi,
Anybody working on ScreenOverlay feature? Any ticket in place or plan for it?
Regards, Ramesh
No one is actively working on it, but it's definitely on the roadmap. We are hoping to do another round of KML improvements early next year, but I don't have any kind of ETA for you.
Thanks for the quick response. (Until then, we will parse the KML document and use HTML/JS features to overlay the image on Cesium maps.)
Hi Anybody working on Placemark Geometry-Model feature? Any plan for it? Our project used to display 3D models created by google-skechup on google-earth. Now we are seeking a solution to display these models on the map.
Hello,
It seems to me that Cesium interprets KML absolute <altitudeMode>
as altitude from ellipsoide, while in KML specs it should be an altitude from sea level (or EGM96 if my guess about Google Earth sea level is true).
Please, tell if there is any work towards altitudeMode support?
Please, tell if there is any work towards altitudeMode support?
It is on our roadmap, but there's no ETA.
It is on our roadmap, but there's no ETA.
Thank you for response! And good luck with your roadmap!
@mramato Here is what should be checked off after #3538
For NetworkLinks
In <Link>
all these are done
<refreshMode>
<refreshInterval>
<viewRefreshMode> (onStop only)
<viewRefreshTime>
<viewBoundScale>
<viewFormat>
<httpQuery>
For <Icon>
there isn't any refreshing but these now work for the first load
<viewBoundScale>
<viewFormat>
<httpQuery>
<NetworkLinkControl>
has support for
<cookie>
<expires>
<maxRefreshInterval>
These are also done
Thank you, wonderful news about the Network Links support!
Cesium KML not support 3d model?
NetworkLinkControl support requested in #4404
I'm porting an application from GE to Cesium; it relies on NetworkLinks updates heavily, a Is there any roadmap for such a feature? If the answer is No.. does Cesium have Network Links but not using KML files but some other format I may have to convert to ? Thank You
Hi @micelic! Cesium does have support for network links, but performance may be slow depending on how your KML is organized. If performance is an issue, I would recommend converting to CZML. Other users that have migrated from GE->Cesium have seen significantly better performance with CZML than KML. You can learn about the format here: https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/CZML-Guide
In the future, please post questions like this on our forum: https://groups.google.com/forum/?hl=en#!forum/cesium-dev There is higher visibility there so it is more likely that others will see your question and be able to help answer it. And it may help out other members of the community who have a similar question. Thanks!
Thank You.
I would like to try the network links first to see the performance hit.. If it is an issue I will think to convert to CZML.
Is there anything documented on Cesium and network links for KML.
The documentation on this topic is limited.
I appreciate your help.
From: Hannah [mailto:notifications@github.com] Sent: Thursday, February 09, 2017 8:47 AM To: AnalyticalGraphicsInc/cesium Cc: Miceli, Carlo J.; Mention Subject: Re: [AnalyticalGraphicsInc/cesium] KML Support (#873)
Hi @micelichttps://github.com/micelic! Cesium does have support for network links, but performance may be slow depending on how your KML is organized. If performance is an issue, I would recommend converting to CZML. Other users that have migrated from GE->Cesium have seen significantly better performance with CZML than KML. You can learn about the format here: https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/CZML-Guide
In the future, please post questions like this on our forum: https://groups.google.com/forum/?hl=en#!forum/cesium-dev There is higher visibility there so it is more likely that others will see your question and be able to help answer it. And it may help out other members of the community who have a similar question. Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/AnalyticalGraphicsInc/cesium/issues/873#issuecomment-278644612, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMB5q4KX202u08BO-AzVpJRZweGjarBmks5raxjjgaJpZM4AvhIQ.
Any plans for Screenoverlays? Previous comments have indicated it was on roadmap, but not sure if this work has started?
@prieks we will likely not add screen overlay support because you can easily use HTML and CSS to create and position elements on top of the viewer. You can see this example for how to do so programmatically: http://analyticalgraphicsinc.github.io/cesium-google-earth-examples/examples/screenOverlay.html
Although Cesium may not have a general screen overlay API, I'm pretty sure that we would add ScreenOverlay support for KML if enough users need it or someone is able to contribute it.
This issue has been heavily edited since Andre's original write-up and is now maintained by @mramato.
The initial KML implementation was started as part of the 2013 Google Summer of Code and resulted in many core features being implemented by @andre-nunes in his branch. Current work is taking place in the kml branch of the official Cesium repository. Since KML is a large specification, the plan is to implement what we see as the minimum viable product first and officially release that as part of Cesium. We will then continue to add additional functionality on a feature by feature basis with each Cesium release.
The below task list tries to capture everything at a fairly high level for each phase. There are many hidden features and requirements here and listing them all isn't useful. For example, we are going to need polygon and polyline draping on terrain as a core Cesium feature (#2172). We will add new tasks when we encounter an issue as we implement each of the high-level types. If you have a strong need for a feature that we haven't gotten to yet, or feel we're missing something in the below list; please don't hesitate to let us know.
Related Links
Mailing-list topic Google Documentation OGC Specification
onExpire
,onInterval
,onStop
onRegion
,onChange
,onRequest
DataSourceBrowser
for full implementation)<Link>
features<refreshMode>
<refreshInterval>
<viewRefreshMode>
<viewRefreshTime>
<viewBoundScale>
<viewFormat>
<httpQuery>
<Link>
features for<Icon>
<Data>
<Schema>
and<SchemaData>
<gx:altitudeOffset>
for LinearRing and LineString<gx:angles>
for Track and MultiTrack (applies to both model and billboard).<Icon>
gx extensionsx
,y
,w
, andh
forGroundOverlay
LineStyle
xal:AddressDetails
altitudeMode
absolute
clampToGround
relativeToGround
(doesn't work on terrain).gx:altitudeMode
ge:Track
gets billboard heading from angles or direction of travel.Random notes
BalloonStyle:displayMode
. I'm not sure we care.$[geDirections]
with nothing. If we ever provide out of the box routing, we can use that instead. (https://github.com/gregjacobs/Autolinker.js) can be used to do this.createObjectURL
for loading data from a zip file (which is currently using data uris). The problem here is that you need to callrevokeObjectURL
in order to clean things up when you're done.KmlDataSource
to support other planets.zip.js
has the ability to report progress which we currently don't utilize.loadXmlFromZip
andloadDataUriFromZip
in KmlDataSource.js would be the place to start if we ever want to add it. We just need to pass aonprogress
callback as the third parameter toentry.getData
when
block). If we want to match Google Earth, we should too. Rather than try/catching JulianDate.fromIso8601, we should add a exceptionless version that returns undefined.