Porting over GE to Cesium using network links with KML files

770 views
Skip to first unread message

mic...@leidos.com

unread,
Feb 9, 2017, 8:54:00 AM2/9/17
to cesium-dev
I have a project that I am converting from GE to Cesium that relies heavily on Network Links...using KML files. I understand there is support for network links using Cesium and KML files. Does anyone have any examples or documentation that supports this ? I would like to try this first to see what the performance is like before possible converting my KML files to CZML.

Tom Fili

unread,
Feb 9, 2017, 10:15:34 AM2/9/17
to cesium-dev
Hi

Here is a sandcastle example that loads KML


Here is the reference documentation


Network links should just work. The one caveat is that onRegion updates aren't yet implemented. If there are a lot of network links updating frequently this has the potential to get slow as we have to create entities on the main thread, since we don't have access to threading like a native application would.

Thanks

mic...@leidos.com

unread,
Feb 9, 2017, 10:20:41 AM2/9/17
to cesium-dev
Yes >> I have seen these examples and reference documentation.

There is no much on network links however.

Here is the GE version

      // // create a Link object
      var link = ge.createLink("");
      var kmzUrl = 'http://' + server + '/aftweb/google_earth/active/' + tgt + '.kmz';
      link.setHref(kmzUrl);

      link.setRefreshMode(ge.REFRESH_ON_INTERVAL);

I am looking for examples of using network links with Cesium that I can port over. Also what version of Cesium has network links ?

Thanks

Tom Fili

unread,
Feb 9, 2017, 11:53:45 AM2/9/17
to cesium-dev
There isn't a KML API within Cesium, we just load the document into the generic Entity layer of Cesium. NetworkLinks are a special case that is specific to KML and are handled internally within the KmlDataSource.

In order to do what you want, you would need to generate the actual KML and load it into a KmlDataSource like this

// Start document
var kml = '<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2"><Document>';

// Add Network Link
kml += '<NetworkLink><Link><href>';
kml += 'http://' + server + '/aftweb/google_earth/active/' + tgt + '.kmz'
kml += '</href><refreshMode>onInterval</refreshMode></Link></NetworkLink>';

// Close document
kml += '</Document></kml>';

var parser = new DOMParser();
KmlDataSource.load(parser.parseFromString(kml, "text/xml"), {
    camera : scene.camera,
    canvas : scene.canvas
});

--Tom

mic...@leidos.com

unread,
Feb 9, 2017, 1:28:14 PM2/9/17
to cesium-dev
Hi Tom,

I will give you recommendation a shot. It was not clear to me on how to add the NetworkLink in the KmlDataSource documentation.

This is what I am doing now.

   viewer = new Cesium.Viewer('geContainer',
         { timeline: false,
           animation: false
          });

   ge = new Cesium.KmlDataSource();

   var options = {
     camera : viewer.scene.camera,
     canvas : viewer.scene.canvas
 };
    kmlUrl = 'google_earth/active/' + "localTracks" + '.kml';

//follow your instructions up until close document.
        
// Would the following lines of code work?

              
     viewer.dataSources.add(ge.load(kmlUrl,options))
   .then( function (dataSource) {
       viewer.flyTo(dataSource.entities);

Thank You!!

Tom Fili

unread,
Feb 9, 2017, 2:20:27 PM2/9/17
to cesium-dev
I'm a little lost by your question.

You can either load a KML document ('google_earth/active/' + "localTracks" + '.kml') like your code does or you can generate a KML document with a network link in it like my code does. You cannot load an existing document and add a network link to it, which it appears you are trying to do. I would need to see the full code example to be sure.

mic...@leidos.com

unread,
Feb 9, 2017, 2:44:04 PM2/9/17
to cesium-dev
Hi Tom,

Here is the GE code I am trying to port.

    function createNetworkLink(tgt) {
      var networkLink = ge.createNetworkLink("");
      networkLink.setDescription("NetworkLink open to fetched content");
      networkLink.setName("Open NetworkLink");
      networkLink.setFlyToView(false);
   //

      // // create a Link object
      var link = ge.createLink("");

      var kmlUrl = 'http://' + server + '/aftweb/google_earth/active/' + tgt + '.kml';

       link.setHref(kmlUrl);
       link.setRefreshMode(ge.REFRESH_ON_INTERVAL);
       link.setRefreshInterval(3.0);

      // attach the Link to the NetworkLink
      networkLink.setLink(link);
   //
      currentKmlObjects[tgt] = networkLink;

   //
      //add the NetworkLink feature to Earth
      ge.getFeatures().appendChild(networkLink);


What I am doing now is I have a KML file that is written to periodically.. The network link will automatically update the kml icon on the
google map based on the periodic rate.

Right now the code I sent you gets called every 5 seconds (so it refreshes the location since I may have a new file with a different lat/long in )
This is not ideal for many reasons. Once being the browser will eventually run out of memory and crash.

So I was trying to find an example to port over the network link to cesium using a KML file that is lat/long is updated periodically so the movement shows up on the map.

I hope this is clear.. You can see what I am doing with Cesium to get the kml data lat/long to show up on the map.

Let me know..

Thank you

mic...@leidos.com

unread,
Feb 13, 2017, 11:16:11 AM2/13/17
to cesium-dev
Hi Tom,

I am assuming there is no equivalent code for Cesium to accomplish what I have for GE ?
How do you recommend I port this code over to Cesium.. Right now I am refreshing the Map
and re-read the KML that may have changed and displaying it on the map.. The network links on GE
will update the map with the new data periodically with out refreshing the Map for its new position

Thanks

Hannah Pinkos

unread,
Feb 13, 2017, 12:31:54 PM2/13/17
to cesium-dev
Hello,

Sorry, but I don't have a good way to recreate this functionality.  Cesium has KML network link support, but we don't have the capability to create a nework link on the fly the way the Google Earth Plugin does.  
Instead, you can use CZML and WebSockets to update the CZML periodically.  See the discussion in this forum post: https://groups.google.com/forum/#!topic/cesium-dev/fntbTCvo1Qk
You can call CzmlDataSource.process to process a new packet of czml whenever a message is posted by the WebSocket.  The packet can include a new position and icon for the entity.

Best,

Hannah

mic...@leidos.com

unread,
Feb 13, 2017, 12:49:59 PM2/13/17
to cesium-dev
Hi Hannah,

Thank you for your reply.. I will look into your suggestions.

Regards,

Carlo

Miceli, Carlo J.

unread,
Apr 27, 2017, 9:07:53 AM4/27/17
to cesiu...@googlegroups.com

Ok I am back looking at this.. So we are staring to convert the kml file to a CZML format.

I want to make sure I understand how to do this with CZML since we are converting the code.

 

Our present system works as follows.

 

We have an application running on the same server we are running the Cesuim map and web application on the same machine as well.

 

The present application is writing to a file in a particular directory (KML file)  The Web application sets up at initialization a network link for this data and

The google network link reads this file periodically using Google network Link periodic refresh interval also set up at initialization.

 

At the interval the positon(lat/long) of the element us updated on the map via an icon.

So over time we can see the element moving on the map. (again google map)

 

So  to be clear is the only way to get this functionality to run with Cesium is to use WebSockets ?  If the Web application periodically

Has a thread running and reads the CZML file in a particular directory and then displays the data with new position would this work as well

Without refreshing the browser to show the movement ? So would I be able to call the czmlDataStreamSource.process by parsing the file?

 

The application running will have to create czml_writer function in C++ and since on the same machine as Web browser did not know if we needed WebSockets

Interface to make the element move on the Cesium map.

 

I hope this is clear,


Thank you for your help,

Carlo

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Hunter

unread,
Apr 27, 2017, 10:08:49 AM4/27/17
to cesiu...@googlegroups.com
If you're simply trying to refresh a data file periodically, you can do that using the normal setInterval function.  In the callback, then you can reload the KmlDataSource or CzmlDataSource into Cesium, whichever format you're using.

WebSockets would allow for a more sophisticated approach where the server pushes more specific targeted updates, rather than reloading all the data every time.  

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

Miceli, Carlo J.

unread,
Apr 27, 2017, 10:16:36 AM4/27/17
to cesiu...@googlegroups.com

I do not want to refresh the browser.. the data file is being refreshed by another application running on the

The same machine that has the apache server running on it. My web application will read this file from a directory and display it on the

Cesium map. (Again this was done on Google map with network links.)

 

I just want the element’s lat/long updated on the Cesium map to show it moving over time by reading the

Kml or czml file to get the updated lat/long then display it on the Cesium map with the new lat/long so it moves.

 

Right now I have a periodic call in my web page to read the file in (kml) and in order for it to update on the Cesium map to the new position I have to

Refresh the Web page.. and over time I run out of memory.

 

Does this make sense ?

 

Do you have an example on the setInterval function if will do the job ?


Thanks,

Carlo

--

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--

You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Scott Hunter

unread,
Apr 27, 2017, 10:20:56 AM4/27/17
to cesiu...@googlegroups.com
setInterval is a standard browser function, and not specific to Cesium.




--

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

Miceli, Carlo J.

unread,
Apr 27, 2017, 10:34:55 AM4/27/17
to cesiu...@googlegroups.com

Does this function support all the major browsers ?

--

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Scott Hunter

unread,
Apr 27, 2017, 10:56:32 AM4/27/17
to cesiu...@googlegroups.com
Yes, it's a standard browser function.  MDN pages usually have a compatibility table at the bottom of the page.

--

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

Miceli, Carlo J.

unread,
Apr 27, 2017, 11:36:50 AM4/27/17
to cesiu...@googlegroups.com

I am using kml files.. The interval seems to work fine.

 

Another question I have is I select the icon on the map to show me the KML data. Pops up on the Cesium screen.

 

I have a 3 second interval. Once the refresh occurs the popup screen goes away. Is there a way to keep this information up on the screen

So I can see the information change. Thanks…

 

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Scott Hunter
Sent: Thursday, April 27, 2017 10:56 AM
To: cesiu...@googlegroups.com
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Yes, it's a standard browser function.  MDN pages usually have a compatibility table at the bottom of the page.

 

On Thu, Apr 27, 2017 at 10:34 AM, Miceli, Carlo J. <CARLO.J...@leidos.com> wrote:

Does this function support all the major browsers ?

 

--

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Miceli, Carlo J.

unread,
Apr 27, 2017, 12:01:10 PM4/27/17
to cesiu...@googlegroups.com

Looks like the map eventually crashes using the browser interval.. Also at every interval everything on the map gets refreshed.


Ran for a while and the map then disappeared in my web page.

 

Any other suggestions ?

 

Thanks


Carlo

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Scott Hunter
Sent: Thursday, April 27, 2017 10:56 AM
To: cesiu...@googlegroups.com
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Yes, it's a standard browser function.  MDN pages usually have a compatibility table at the bottom of the page.

 

On Thu, Apr 27, 2017 at 10:34 AM, Miceli, Carlo J. <CARLO.J...@leidos.com> wrote:

Does this function support all the major browsers ?

 

--

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Miceli, Carlo J.

unread,
Apr 27, 2017, 12:02:19 PM4/27/17
to cesiu...@googlegroups.com

Here is the error I get.

 

An error occurred while rendering. Rendering has stopped.

RuntimeError: Program failed to link. Link log: Internal linking error Error at t (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:418:7991) at p (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:432:1662) at _ (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:432:3651) at C.prototype._bind (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:432:5384) at G (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:451:9085) at q.prototype.draw (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:451:17598) at r.prototype.execute (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:431:4930) at m.prototype.execute (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:454:29390) at we (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:461:9320) at Ae (http://10.37.208.115/aftweb/Build/Cesium/Cesium.js:461:10424)

OK

 

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Scott Hunter
Sent: Thursday, April 27, 2017 10:56 AM
To: cesiu...@googlegroups.com
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Yes, it's a standard browser function.  MDN pages usually have a compatibility table at the bottom of the page.

 

On Thu, Apr 27, 2017 at 10:34 AM, Miceli, Carlo J. <CARLO.J...@leidos.com> wrote:

Does this function support all the major browsers ?

 

--

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Miceli, Carlo J.

unread,
May 1, 2017, 8:25:11 AM5/1/17
to cesiu...@googlegroups.com

Looks like I am at a dead end with .KML functionality.

 

I am trying to find out if CZML will help me.

 

The refresh interval will refresh browser and display new data location on the map but clears and redraws every time.

 

What I am asking is with Google Earth Plugin we used Network Links and Network links interval to

Read the new position file and update the display. This did not update the browser like refresh interval does.

 

Network links in google plugin refreshed the position entry on the map and not the whole map so other items

Displayed did not clear on refresh.

 

Is there an equivalent in Cesium with CZML (kml network links is not there) that this can be done.

I have an application I am trying to port over.

 

If not is there any suggestions or any idea if network links (google/.kml) will be ported to Cesium or any work around I can use in

The meantime.

 

Thank You


Carlo

 

 

Miceli, Carlo J.

unread,
May 1, 2017, 9:26:02 AM5/1/17
to cesiu...@googlegroups.com

Ok.. for refresh interval my map crashes over time.

 

Has anyone experienced this?

 

--

You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Miceli, Carlo J.

unread,
May 1, 2017, 10:38:44 AM5/1/17
to cesiu...@googlegroups.com

All examples I see with things moving are the CZML file has all the coordinates built into the czml file.

Ex.. Vehicle.czml.

 

Are there any examples that update the coordinates periodically and displayed on the map ?

 

I am also display a track history file which can be large (has all the points of a track from the beginning of the start scenario) and

The performance on the map is not very good.

 

Any help with this would greatly be appreciated.

 

Thank you

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Miceli, Carlo J.


Sent: Monday, May 01, 2017 8:25 AM
To: cesiu...@googlegroups.com

--

You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Rachel Hwang

unread,
May 1, 2017, 5:15:55 PM5/1/17
to cesium-dev, CARLO.J...@leidos.com
Hi there,

The Cesium Entity system is designed to handle problems just like this, where you want to specify how a property changes over time. I don't know exactly what your situation is, but you might consider reading in your CZML files using the CZML DataSource: https://cesiumjs.org/Cesium/Build/Documentation/CzmlDataSource.html

This will allow you to access all your CZML objects as entities. Entities provide a robust way of specifying an object's properties at specific times. Here are some Sandcastle examples you might find useful. 


Hope that helps!
- Rachel

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Miceli, Carlo J.

unread,
May 2, 2017, 7:33:49 AM5/2/17
to cesiu...@googlegroups.com

Hi Rachel,

 

Thanks for your response.. I understand about the Entity … but.. I am looking using CZML streaming now….

 

In a nut shell.. I have a separate application that is updating a file in a director

 

On the same machine from a web browser that is has a Cesium map plugged in… a java script reads this file and displays

The lat/long of multiple tracks. The position gets updated over time.  I used google map network links I am trying to port over.

I have used the browser interval to read the file and display but technique has major performance issues and will eventuall

Crash the Cesium Map.

 

I have looked at the Sandcastle examples but none of them show anything moving over time based on and updated CZML file.

In other works for example the CZML file will one have on position entry for each track.. I may have 1-50 tracks in this file that need to be displayed

On the map... This position entry will get updated over time for each track and displayed again on the map.

 

So need something that periodically reads this CZML file and displays all the tracks without cause performance issues and crashes.

 

Does this make sense ?

 

Thanks,

Carlo

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Rachel Hwang
Sent: Monday, May 01, 2017 5:16 PM
To: cesium-dev
Cc: Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi there,

 

The Cesium Entity system is designed to handle problems just like this, where you want to specify how a property changes over time. I don't know exactly what your situation is, but you might consider reading in your CZML files using the CZML DataSource: https://cesiumjs.org/Cesium/Build/Documentation/CzmlDataSource.html

 

This will allow you to access all your CZML objects as entities. Entities provide a robust way of specifying an object's properties at specific times. Here are some Sandcastle examples you might find useful. 

 

 

Hope that helps!

- Rachel


On Monday, May 1, 2017 at 10:38:44 AM UTC-4, Miceli, Carlo J. wrote:

All examples I see with things moving are the CZML file has all the coordinates built into the czml file.

Ex.. Vehicle.czml.

 

Are there any examples that update the coordinates periodically and displayed on the map ?

 

I am also display a track history file which can be large (has all the points of a track from the beginning of the start scenario) and

The performance on the map is not very good.

 

Any help with this would greatly be appreciated.

 

Thank you

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Miceli, Carlo J.
Sent: Monday, May 01, 2017 8:25 AM
To: cesiu...@googlegroups.com
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Looks like I am at a dead end with .KML functionality.

 

I am trying to find out if CZML will help me.

 

The refresh interval will refresh browser and display new data location on the map but clears and redraws every time.

 

What I am asking is with Google Earth Plugin we used Network Links and Network links interval to

Read the new position file and update the display. This did not update the browser like refresh interval does.

 

Network links in google plugin refreshed the position entry on the map and not the whole map so other items

Displayed did not clear on refresh.

 

Is there an equivalent in Cesium with CZML (kml network links is not there) that this can be done.

I have an application I am trying to port over.

 

If not is there any suggestions or any idea if network links (google/.kml) will be ported to Cesium or any work around I can use in

The meantime.

 

Thank You


Carlo

 

 

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Rachel Hwang

unread,
May 4, 2017, 10:15:06 PM5/4/17
to cesium-dev, CARLO.J...@leidos.com

Hi Carlo,


Reloading your CZML should work fine -- can you provide a code example of how you're reloading? Maybe we can spot a bug.


Best,

- Rachel

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Miceli, Carlo J.

unread,
May 8, 2017, 9:47:51 AM5/8/17
to Rachel Hwang, cesium-dev

Hi Rachel,

 

Here is a basic code snippet.

 

I will find out if I can give you a copy of the .kml files in question.

 

Let me know if this is not clear

 

Thanks,

Carlo

 

var nIntervId;

var ge;

var viewer;

 

nIntervId = setInterval(updateTracks,5000);   ****  This is the autorefresh that will eventually crash the map.

 

viewer = new Cesium.Viewer('geContainer',

                                 { timeline: false,

                                    animation: false

                                  });

 

ge = new Cesium.KmlDataSource();

 

function updateTracks()

        {

 

                var options = {

                    camera : viewer.scene.camera,

                    canvas : viewer.scene.canvas

                };

 

                   kmlUrl = 'google_earth/active/' + "localTracks" + '.kml';    **** THIS IS A DIRECTORY ON THE LINUX MACHINE>>> THIS FILE GETS UPDATED PERIODICALLY WITH NEW LOCATIONS>

       

             

 viewer.dataSources.add(ge.load(kmlUrl,options))

                                                .then( function (dataSource) {

                                                viewer.flyTo(dataSource.entities);

                               

   

      }

 

From: Rachel Hwang [mailto:elkw...@gmail.com]
Sent: Thursday, May 04, 2017 10:15 PM
To: cesium-dev
Cc: Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi Carlo,

 

Reloading your CZML should work fine -- can you provide a code example of how you're reloading? Maybe we can spot a bug.

 

Best,

- Rachel


On Tuesday, May 2, 2017 at 7:33:49 AM UTC-4, Miceli, Carlo J. wrote:

Hi Rachel,

 

Thanks for your response.. I understand about the Entity … but.. I am looking using CZML streaming now….

 

In a nut shell.. I have a separate application that is updating a file in a director

 

On the same machine from a web browser that is has a Cesium map plugged in… a java script reads this file and displays

The lat/long of multiple tracks. The position gets updated over time.  I used google map network links I am trying to port over.

I have used the browser interval to read the file and display but technique has major performance issues and will eventuall

Crash the Cesium Map.

 

I have looked at the Sandcastle examples but none of them show anything moving over time based on and updated CZML file.

In other works for example the CZML file will one have on position entry for each track.. I may have 1-50 tracks in this file that need to be displayed

On the map... This position entry will get updated over time for each track and displayed again on the map.

 

So need something that periodically reads this CZML file and displays all the tracks without cause performance issues and crashes.

 

Does this make sense ?

 

Thanks,

Carlo

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Rachel Hwang
Sent: Monday, May 01, 2017 5:16 PM
To: cesium-dev
Cc: Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi there,

 

The Cesium Entity system is designed to handle problems just like this, where you want to specify how a property changes over time. I don't know exactly what your situation is, but you might consider reading in your CZML files using the CZML DataSource: https://cesiumjs.org/Cesium/Build/Documentation/CzmlDataSource.html

 

This will allow you to access all your CZML objects as entities. Entities provide a robust way of specifying an object's properties at specific times. Here are some Sandcastle examples you might find useful. 

 

 

Hope that helps!

- Rachel


On Monday, May 1, 2017 at 10:38:44 AM UTC-4, Miceli, Carlo J. wrote:

All examples I see with things moving are the CZML file has all the coordinates built into the czml file.

Ex.. Vehicle.czml.

 

Are there any examples that update the coordinates periodically and displayed on the map ?

 

I am also display a track history file which can be large (has all the points of a track from the beginning of the start scenario) and

The performance on the map is not very good.

 

Any help with this would greatly be appreciated.

 

Thank you

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Miceli, Carlo J.
Sent: Monday, May 01, 2017 8:25 AM
To: cesiu...@googlegroups.com
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Looks like I am at a dead end with .KML functionality.

 

I am trying to find out if CZML will help me.

 

The refresh interval will refresh browser and display new data location on the map but clears and redraws every time.

 

What I am asking is with Google Earth Plugin we used Network Links and Network links interval to

Read the new position file and update the display. This did not update the browser like refresh interval does.

 

Network links in google plugin refreshed the position entry on the map and not the whole map so other items

Displayed did not clear on refresh.

 

Is there an equivalent in Cesium with CZML (kml network links is not there) that this can be done.

I have an application I am trying to port over.

 

If not is there any suggestions or any idea if network links (google/.kml) will be ported to Cesium or any work around I can use in

The meantime.

 

Thank You


Carlo

 

 

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Scott Hunter

unread,
May 8, 2017, 10:18:11 AM5/8/17
to cesiu...@googlegroups.com
In your code snippet, you are adding the same KmlDataSource instance to viewer.dataSources over and over every time updateTracks is called.  You should only add the data source once.  

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

Miceli, Carlo J.

unread,
May 8, 2017, 11:22:35 AM5/8/17
to cesiu...@googlegroups.com

Ok.. how would I change this code then so I read the file and display on the map at each interval with the new lat/long ?

 

Thanks,

 

C.

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Rachel Hwang
Sent: Monday, May 01, 2017 5:16 PM
To: cesium-dev
Cc: Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi there,

 

The Cesium Entity system is designed to handle problems just like this, where you want to specify how a property changes over time. I don't know exactly what your situation is, but you might consider reading in your CZML files using the CZML DataSource: https://cesiumjs.org/Cesium/Build/Documentation/CzmlDataSource.html

 

This will allow you to access all your CZML objects as entities. Entities provide a robust way of specifying an object's properties at specific times. Here are some Sandcastle examples you might find useful. 

 

 

Hope that helps!

- Rachel


On Monday, May 1, 2017 at 10:38:44 AM UTC-4, Miceli, Carlo J. wrote:

All examples I see with things moving are the CZML file has all the coordinates built into the czml file.

Ex.. Vehicle.czml.

 

Are there any examples that update the coordinates periodically and displayed on the map ?

 

I am also display a track history file which can be large (has all the points of a track from the beginning of the start scenario) and

The performance on the map is not very good.

 

Any help with this would greatly be appreciated.

 

Thank you

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Miceli, Carlo J.
Sent: Monday, May 01, 2017 8:25 AM
To: cesiu...@googlegroups.com
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Looks like I am at a dead end with .KML functionality.

 

I am trying to find out if CZML will help me.

 

The refresh interval will refresh browser and display new data location on the map but clears and redraws every time.

 

What I am asking is with Google Earth Plugin we used Network Links and Network links interval to

Read the new position file and update the display. This did not update the browser like refresh interval does.

 

Network links in google plugin refreshed the position entry on the map and not the whole map so other items

Displayed did not clear on refresh.

 

Is there an equivalent in Cesium with CZML (kml network links is not there) that this can be done.

I have an application I am trying to port over.

 

If not is there any suggestions or any idea if network links (google/.kml) will be ported to Cesium or any work around I can use in

The meantime.

 

Thank You


Carlo

 

 

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Miceli, Carlo J.

unread,
May 8, 2017, 11:24:24 AM5/8/17
to cesiu...@googlegroups.com

I have an if around fly to view so it only flys to view at startup

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Scott Hunter


Sent: Monday, May 08, 2017 10:18 AM
To: cesiu...@googlegroups.com

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Rachel Hwang
Sent: Monday, May 01, 2017 5:16 PM
To: cesium-dev
Cc: Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi there,

 

The Cesium Entity system is designed to handle problems just like this, where you want to specify how a property changes over time. I don't know exactly what your situation is, but you might consider reading in your CZML files using the CZML DataSource: https://cesiumjs.org/Cesium/Build/Documentation/CzmlDataSource.html

 

This will allow you to access all your CZML objects as entities. Entities provide a robust way of specifying an object's properties at specific times. Here are some Sandcastle examples you might find useful. 

 

 

Hope that helps!

- Rachel


On Monday, May 1, 2017 at 10:38:44 AM UTC-4, Miceli, Carlo J. wrote:

All examples I see with things moving are the CZML file has all the coordinates built into the czml file.

Ex.. Vehicle.czml.

 

Are there any examples that update the coordinates periodically and displayed on the map ?

 

I am also display a track history file which can be large (has all the points of a track from the beginning of the start scenario) and

The performance on the map is not very good.

 

Any help with this would greatly be appreciated.

 

Thank you

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Miceli, Carlo J.
Sent: Monday, May 01, 2017 8:25 AM
To: cesiu...@googlegroups.com
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Looks like I am at a dead end with .KML functionality.

 

I am trying to find out if CZML will help me.

 

The refresh interval will refresh browser and display new data location on the map but clears and redraws every time.

 

What I am asking is with Google Earth Plugin we used Network Links and Network links interval to

Read the new position file and update the display. This did not update the browser like refresh interval does.

 

Network links in google plugin refreshed the position entry on the map and not the whole map so other items

Displayed did not clear on refresh.

 

Is there an equivalent in Cesium with CZML (kml network links is not there) that this can be done.

I have an application I am trying to port over.

 

If not is there any suggestions or any idea if network links (google/.kml) will be ported to Cesium or any work around I can use in

The meantime.

 

Thank You


Carlo

 

 

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Miceli, Carlo J.

unread,
May 11, 2017, 3:57:59 PM5/11/17
to cesiu...@googlegroups.com

I add the instance once now and then read the new file and load the new kml file.

That seems to work now.

 

The question I have can I keep the old point when the load is done. So if the position changes I want to

Have the old position still shown on the map so it shows a track history with KML ??

 

It appears I can do it with CZML..  Is there an way to do this with KML.. The KmlDataSource does not have a process function according to the docs.


Thanks,

Carlo

 

load(czml, options) → Promise.<CzmlDataSource>

DataSources/CzmlDataSource.js 2139

Loads the provided url or CZML object, replacing any existing data.

 

process(czml, options) → Promise.<CzmlDataSource>

DataSources/CzmlDataSource.js 2127

Processes the provided url or CZML object without clearing any existing data.

 

viewer = new Cesium.Viewer('geContainer',

                                 { timeline: false,

                                    animation: false

                                  });

 

ge = new Cesium.KmlDataSource();

 

          kmlUrl = 'google_earth/active/' + "localTracks" + '.kml';

       

           if (firstTimeFlyToView){

            

                                   viewer.dataSources.add(ge.load(kmlUrl,options))

                                                .then( function (dataSource) {

                                                viewer.flyTo(dataSource.entities);

                                });

         

                          firstTimeFlyToView = 0;

                   }

       

           else {

                               

 

                ge.load(kmlUrl,options);


         }

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Scott Hunter


Sent: Monday, May 08, 2017 10:18 AM
To: cesiu...@googlegroups.com

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Rachel Hwang
Sent: Monday, May 01, 2017 5:16 PM
To: cesium-dev
Cc: Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi there,

 

The Cesium Entity system is designed to handle problems just like this, where you want to specify how a property changes over time. I don't know exactly what your situation is, but you might consider reading in your CZML files using the CZML DataSource: https://cesiumjs.org/Cesium/Build/Documentation/CzmlDataSource.html

 

This will allow you to access all your CZML objects as entities. Entities provide a robust way of specifying an object's properties at specific times. Here are some Sandcastle examples you might find useful. 

 

 

Hope that helps!

- Rachel


On Monday, May 1, 2017 at 10:38:44 AM UTC-4, Miceli, Carlo J. wrote:

All examples I see with things moving are the CZML file has all the coordinates built into the czml file.

Ex.. Vehicle.czml.

 

Are there any examples that update the coordinates periodically and displayed on the map ?

 

I am also display a track history file which can be large (has all the points of a track from the beginning of the start scenario) and

The performance on the map is not very good.

 

Any help with this would greatly be appreciated.

 

Thank you

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Miceli, Carlo J.
Sent: Monday, May 01, 2017 8:25 AM
To: cesiu...@googlegroups.com
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Looks like I am at a dead end with .KML functionality.

 

I am trying to find out if CZML will help me.

 

The refresh interval will refresh browser and display new data location on the map but clears and redraws every time.

 

What I am asking is with Google Earth Plugin we used Network Links and Network links interval to

Read the new position file and update the display. This did not update the browser like refresh interval does.

 

Network links in google plugin refreshed the position entry on the map and not the whole map so other items

Displayed did not clear on refresh.

 

Is there an equivalent in Cesium with CZML (kml network links is not there) that this can be done.

I have an application I am trying to port over.

 

If not is there any suggestions or any idea if network links (google/.kml) will be ported to Cesium or any work around I can use in

The meantime.

 

Thank You


Carlo

 

 

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Rachel Hwang

unread,
May 16, 2017, 2:18:33 PM5/16/17
to cesium-dev, CARLO.J...@leidos.com
Hi Carlo,

Unfortunately, KML wasn't really designed to work this way -- the specification doesn't allow for it. However, you can keep the old data around just by creating a new KMLDataSource instance each time you load.

Hope that helps,
- Rachel

Miceli, Carlo J.

unread,
May 17, 2017, 9:13:41 AM5/17/17
to Rachel Hwang, cesium-dev

Thanks Rachel,


That works fine.. is there a way after a few minutes to start removing the old sources ?

 

We only want to keep the last two minutes’ worth of data on the map.

 

Thank you.

 

From: Rachel Hwang [mailto:elkw...@gmail.com]
Sent: Tuesday, May 16, 2017 2:19 PM
To: cesium-dev
Cc: Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi Carlo,

 

Unfortunately, KML wasn't really designed to work this way -- the specification doesn't allow for it. However, you can keep the old data around just by creating a new KMLDataSource instance each time you load.

Rachel Hwang

unread,
May 17, 2017, 3:50:23 PM5/17/17
to cesium-dev, elkw...@gmail.com, CARLO.J...@leidos.com
Hi Carlo,

Some of this thread (on implementing entity timeout), is applicable for DataSources too: https://groups.google.com/d/msg/cesium-dev/PzqinNJ51cM/olsNLmSQAAAJ

In short, we don't have native support for a dataSource timeout right now, however you can use the show property of a DataSource, set it to an TimeIntervalCollection (computed at time of load, setting show to false after 2 minutes), then check periodically to see whether show's value has changed, then remove a timed out data source when appropriate.


Hope that helps!
- Rachel
<p c

Miceli, Carlo J.

unread,
May 17, 2017, 3:54:53 PM5/17/17
to Rachel Hwang, cesium-dev

Hi Rachel,

 

One other thing.. not sure if you have any insight on this  but after a while browser will crash

Saying ran out of memory when I add datasources for a while. I am updating the map display every second.

 

If you have any insight on this I would appreciate. I will try your suggestions as well.

 

Thank you


Carlo

Miceli, Carlo J.

unread,
May 18, 2017, 10:13:02 AM5/18/17
to Rachel Hwang, cesium-dev

Hi Rachel,

 

Ok I built a parser that reads in a .kml file and stores it to a .czml file.

 

I am now running with .czml files..

 

I have a Chrome browser running and and a IE browser running.

 

I eventually get a crash on the IE browser but the chrome one is still running for now.. (both crash in time with .kml processing for some reason)


Can anyone tell me the cause of this error on IE ? I will try firefox next.. Any suggestions or recommended settings on the browsers ?

 

Thank You


Carlo

 

 

From: Rachel Hwang [mailto:elkw...@gmail.com]

Sent: Wednesday, May 17, 2017 3:50 PM
To: cesium-dev

Miceli, Carlo J.

unread,
May 18, 2017, 3:35:51 PM5/18/17
to Rachel Hwang, cesium-dev

Hi Rachel,

 

Al browsers over time will crash and run out of memory.

 

Not sure if there is a bug or what is going on. But I can not keep it up that long with the examples I sent you.


Carlo

 

From: Rachel Hwang [mailto:elkw...@gmail.com]

Sent: Wednesday, May 17, 2017 3:50 PM
To: cesium-dev

Rachel Hwang

unread,
May 20, 2017, 4:13:02 PM5/20/17
to cesium-dev, elkw...@gmail.com, CARLO.J...@leidos.com
Hi Carlo,

Can you share your loading code? That will make it easier for us to help you.

Best,
- Rachel


On Thursday, May 18, 2017 at 12:35:51 PM UTC-7, Miceli, Carlo J. wrote:

Hi Rachel,

 

Al browsers over time will crash and run out of memory.

Miceli, Carlo J.

unread,
May 22, 2017, 9:24:56 AM5/22/17
to cesiu...@googlegroups.com, elkw...@gmail.com
Hi Rachel,

Same code in this discussion.  Same happens for both kml and czml.

This code run every second to read in a new file with updated tracks and position.

Browsers will crash within an hour or less. I even tried loading overtime as well.

I tried to create the instance once add..then load the subsequent call..or created the instance every call.
Does not matter .. will crash over time.

Let me know what you think. You can tell over time that the browsers seems to slow down as well.

Thanks,

Carlo

ge = new Cesium.KmlDataSource();

 

          kmlUrl = 'google_earth/active/' + "localTracks" + '.kml';

       

           if (firstTimeFlyToView){

            

                                   viewer.dataSources.add(ge.load(kmlUrl,options))

                                                .then( function (dataSource) {

                                                viewer.flyTo(dataSource.entities);

                                });

         

                          firstTimeFlyToView = 0;

                   }

       

           else {

                               

 

                ge.load(kmlUrl,options);


         }


From: cesiu...@googlegroups.com [cesiu...@googlegroups.com] on behalf of Rachel Hwang [elkw...@gmail.com]
Sent: Saturday, May 20, 2017 3:13 PM
--

Rachel Hwang

unread,
May 23, 2017, 3:00:01 PM5/23/17
to cesium-dev, elkw...@gmail.com, CARLO.J...@leidos.com
Hi Carlo,

Our apologies, but w're having some trouble reproducing your issue. Can you provide a complete code example, perhaps as a Sandcastle example? (You can paste in your code, then save it as a gist by clicking the "Share" button at the top. Just paste the link here.) http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases

We'd love to help, but we have to reproduce your problem first. 

Best,
- Rachel
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
</

Miceli, Carlo J.

unread,
May 24, 2017, 7:24:47 AM5/24/17
to Rachel Hwang, cesium-dev
Hi Rachel,

Yes.. That is what i was planning on doing. I will try to have a simple example to reproduce the problem
in the next day or so.

Will let you know if I can reproduce it with a sandcastle or something similar.

Thank You

Carlo

From: Rachel Hwang [elkw...@gmail.com]
Sent: Tuesday, May 23, 2017 2:00 PM

Miceli, Carlo J.

unread,
May 30, 2017, 10:34:52 AM5/30/17
to Rachel Hwang, cesium-dev

Hi Rachel,

 

I ran this in your sandcastle app. If you let it run for an hour or so the browser will hang and

Eventually run out of memory on Chrome. I think it will fail quicker with Mozilla.

 

http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=CZML%20Billboard%20and%20Label.html&label=CZML

Link is above and I deleted the JS code and pasted in the below code.

 

Let me know what you think.

 

Thanks,

Carlo

 

var czml =

    

[

   {

   "id" : "document",

   "name" : "TEST",

   "version" : "1.0"

   },

 

   {

   "id" : "trk1",

   "name" : "1 {477088000}",

   "position" : {"cartographicDegrees" : [-82.392379761,27.857116699,53.2013]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      },

      

   "description": " <table border=\"1\"><b><tr><th colspan=\"3\">TRACK</th></tr> <tr><th>Item</th><th>Value</th><th>Units</th></tr> \

                    <tr><td>Latitude</td><td align=\"right\">27.7578</td><td>deg WGS 84</td></tr><tr><td>Longitude</td><td align=\"right\">-82.523</td> \

                    <td>deg WGS 84</td></tr><tr><td>Speed</td><td align=\"right\">11.0</td><td>knots</td></tr><tr><td>Heading</td> \

                    <td align=\"right\">11.7</td><td>deg</td></tr><tr><td>Kind</td><td colspan=\"2\">AIS</td></tr><tr><td>Age</td><td align=\"right\">00:03:33</td> \

                    <td>duration</td></tr><tr><td>Last Update</td><td>0x02010001</td><td>SensorId</td></tr><tr><td>Last Update</td><td colspan=\"2\">2017-05-17T12:03:08.529Z</td></tr></b></table>"

 

 

   },

   

   {

   "id" : "trk2",

   "name" : "2 {477058800}",

   "position" : {"cartographicDegrees" : [-82.513336182,27.787147522,12.1227]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk3",

   "name" : "3 {366390000}",

   "position" : {"cartographicDegrees" : [-82.523002625,27.757831573,10.2413]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk4",

   "name" : "4 {367168230}",

   "position" : {"cartographicDegrees" : [-82.629875183,27.776863098,0.0922988]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk5",

   "name" : "5 {366967050}",

   "position" : {"cartographicDegrees" : [-82.558769226,27.633367538,22.9583]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk6",

   "name" : "6 {367003260}",

   "position" : {"cartographicDegrees" : [-82.559936523,27.634202957,22.5965]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk7",

   "name" : "7 {366341000}",

   "position" : {"cartographicDegrees" : [-82.574996948,27.685241699,10.0483]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk8",

   "name" : "8 {CARNIVAL INSPIRATION}",

   "position" : {"cartographicDegrees" : [-82.444549561,27.848119736,34.3424]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk9",

   "name" : "9 {636091540}",

   "position" : {"cartographicDegrees" : [-82.56124115,27.632991791,22.7631]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

  },

   {

   "id" : "trk10",

   "name" : "10 {367078740}",

   "position" : {"cartographicDegrees" : [-82.441169739,27.81936264,31.8315]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk11",

   "name" : "11 {367168440}",

   "position" : {"cartographicDegrees" : [-82.633415222,27.760282516,0.115857]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk12",

   "name" : "12 {567035000}",

   "position" : {"cartographicDegrees" : [-82.999794006,27.591011047,130.836]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk13",

   "name" : "13 {567308000}",

   "position" : {"cartographicDegrees" : [-82.428703308,27.907411575,51.4946]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },

   {

   "id" : "trk14",

   "name" : "14 {309319000}",

   "position" : {"cartographicDegrees" : [-82.41242981,27.797065735,39.4494]},

   "point" :

      {

         "color": {"rgba":[255,255,255,255]},

         "outlineColor": {"rgba":[255,0,0,255]},

         "outlineWidth": 4,

         "pixelSize": 2

      }

   },];

 

var viewer = new Cesium.Viewer('cesiumContainer');

 

var nIntervId = setInterval(updateTracks(),1000);

 

updateTracks();   

    

function updateTracks()

  {

    viewer.dataSources.add(Cesium.CzmlDataSource.load(czml));

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

</

Miceli, Carlo J.

unread,
May 30, 2017, 4:18:22 PM5/30/17
to Rachel Hwang, cesium-dev
Hi Rachel,

Had another colleague of mine run the same test on Internet Explorer and in a few hours he got the following...

So we have some long term run problems. Just started the js and he let it run.

Thanks,
Carlo

Miceli, Carlo J.

unread,
May 31, 2017, 8:02:03 AM5/31/17
to Rachel Hwang, cesium-dev

I Ran the same test on firefox and it lasted only 30 minutes or so.


Here is what I got.

 

 

From: Miceli, Carlo J.
Sent: Tuesday, May 30, 2017 10:35 AM
To: 'Rachel Hwang'; cesium-dev
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi Rachel,

 

I ran this in your sandcastle app. If you let it run for an hour or so the browser will hang and

Eventually run out of memory on Chrome. I think it will fail quicker with Mozilla.

 

http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=CZML%20Billboard%20and%20Label.html&label=CZML

Link is above and I deleted the JS code and pasted in the below code.

 

Let me know what you think.

 

Thanks,

Carlo

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

</

Miceli, Carlo J.

unread,
Jun 1, 2017, 1:53:14 PM6/1/17
to cesiu...@googlegroups.com, Rachel Hwang

Hi Rachel,


Were you able to catch the issue we are having with our example ?

 

Happens with Chrome,Firefox and IE.

 

Let me know.


Thank you

 

Carlo

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Miceli, Carlo J.


Sent: Tuesday, May 30, 2017 10:35 AM
To: Rachel Hwang; cesium-dev

Rachel Hwang

unread,
Jun 5, 2017, 12:05:56 PM6/5/17
to cesium-dev, elkw...@gmail.com, CARLO.J...@leidos.com
Hi Carlo,

Apologies -- I'm still having trouble reproducing your issue. Please paste your code into a sandcastle example, make sure that it runs, then click the "Share" button on the toolbar. This will save your code as a gist and generate a link to it that I can run. 

I suspect there's some sort of memory leak in your code which we'll hopefully be able to debug together. Internet Explorer has some known issues with texture memory, but other browsers should be fine.

Thanks,
- Rachel

<span style="font-size:11.0pt;font-family:"Calib

Miceli, Carlo J.

unread,
Jun 5, 2017, 12:50:59 PM6/5/17
to Rachel Hwang, cesium-dev

Hi Rachel,

 

Here it is.. Select Run (F8) and run.

 

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

 

Let it run for a while in firefox for example..  Just let it sit . There is a 1 second interval that will keep redrawing.

 

I have given this to multiple colleagues and it crashes on all of their different browsers machines.

 

Let me know what you find out.


Thanks,

Carlo

 

From: Rachel Hwang [mailto:elkw...@gmail.com]

Sent: Monday, June 05, 2017 12:06 PM
To: cesium-dev
Cc: elkw...@gmail.com; Miceli, Carlo J.

Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

Hi Carlo,

 

Apologies -- I'm still having trouble reproducing your issue. Please paste your code into a sandcastle example, make sure that it runs, then click the "Share" button on the toolbar. This will save your code as a gist and generate a link to it that I can run. 

 

I suspect there's some sort of memory leak in your code which we'll hopefully be able to debug together. Internet Explorer has some known issues with texture memory, but other browsers should be fine.

 

Thanks,

- Rachel

On Thursday, June 1, 2017 at 1:53:14 PM UTC-4, Miceli, Carlo J. wrote:

Hi Rachel,


Were you able to catch the issue we are having with our example ?

 

Happens with Chrome,Firefox and IE.

 

Let me know.


Thank you

 

Carlo

 

Rachel Hwang

unread,
Jun 5, 2017, 4:17:33 PM6/5/17
to cesium-dev, elkw...@gmail.com, CARLO.J...@leidos.com
Hi Carlo,

I believe the culprit, as Scott mentioned earlier in this thread is that you were adding a new datasource each time. You can just call load on an existing datasource to update it rather than adding a new datasource to the viewer. See this example: http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=8ba5cd9007c969080b176ad857148a2e

Best,
- Rachel

   },<o:p

Miceli, Carlo J.

unread,
Jun 5, 2017, 4:29:00 PM6/5/17
to Rachel Hwang, cesium-dev
Hi Rachel,

Thank you for the example. I will run the example as well to see what happens.

I tried this and I was not seeing my tracks moving to new location. I think my syntax was not the same.

I will double check my syntax on my real program and let you know what I find.

Thanks,

Carlo



From: Rachel Hwang [elkw...@gmail.com]
Sent: Monday, June 05, 2017 3:17 PM

Miceli, Carlo J.

unread,
Jun 7, 2017, 7:46:43 AM6/7/17
to Rachel Hwang, cesium-dev

Hi Rachel,

 

Ok I am running some tests on the example you sent me to see if there still are memory issues..

 

I run the CZML example you sent me and click on one of the tracks on the map and a description box comes up and stays up even after all intervals

 

If I convert this example to KML with a box from one of you examples.. it runs but when you click on the box with your

Mouse the description box comes up on the map but then clears at the one second interval.

 

This does not happen with czml but it does with kml.

 

Here is the example

 

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

 

Is there a reason why a KML data source at interval time clears the displayed box on the map from when you click on the source on the map but

With CZML data source this behavior does not happen

 

You can use my example from before (link below) to see this differences in behavior.

 

Let me know what you think

Miceli, Carlo J.

unread,
Jun 7, 2017, 7:49:33 AM6/7/17
to Rachel Hwang, cesium-dev

Miceli, Carlo J.

unread,
Jun 7, 2017, 7:50:14 AM6/7/17
to Rachel Hwang, cesium-dev

 

 

From: Miceli, Carlo J.
Sent: Wednesday, June 07, 2017 7:47 AM
To: 'Rachel Hwang'; cesium-dev
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi Rachel,

 

Ok I am running some tests on the example you sent me to see if there still are memory issues..

 

I run the CZML example you sent me and click on one of the tracks on the map and a description box comes up and stays up even after all intervals

 

If I convert this example to KML with a box from one of you examples.. it runs but when you click on the box with your

Mouse the description box comes up on the map but then clears at the one second interval.

 

This does not happen with czml but it does with kml.

 

Here is the example

 

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

 

Is there a reason why a KML data source at interval time clears the displayed box on the map from when you click on the source on the map but

With CZML data source this behavior does not happen

 

You can use my example from before (link below) to see this differences in behavior.

 

Let me know what you think

Miceli, Carlo J.

unread,
Jun 7, 2017, 8:11:56 AM6/7/17
to Rachel Hwang, cesium-dev

Here is a better point.

 

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

 

Click on point.. Description comes up.. Then clears at interval time with KML data source.

 

Behavior does not clear displayed description with CZML data source

 

From: Miceli, Carlo J.
Sent: Wednesday, June 07, 2017 7:50 AM
To: 'Rachel Hwang'; 'cesium-dev'
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

 

 

From: Miceli, Carlo J.
Sent: Wednesday, June 07, 2017 7:47 AM
To: 'Rachel Hwang'; cesium-dev
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi Rachel,

 

Ok I am running some tests on the example you sent me to see if there still are memory issues..

 

I run the CZML example you sent me and click on one of the tracks on the map and a description box comes up and stays up even after all intervals

 

If I convert this example to KML with a box from one of you examples.. it runs but when you click on the box with your

Mouse the description box comes up on the map but then clears at the one second interval.

 

This does not happen with czml but it does with kml.

 

Here is the example

 

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

 

Is there a reason why a KML data source at interval time clears the displayed box on the map from when you click on the source on the map but

With CZML data source this behavior does not happen

 

You can use my example from before (link below) to see this differences in behavior.

 

Let me know what you think

Miceli, Carlo J.

unread,
Jun 12, 2017, 7:14:32 AM6/12/17
to Rachel Hwang, cesium-dev

Hi Did anyone get a chance to look at the links below that show the difference of the description popup clears at

Every interval for KML but not for CZML ?

 

Is this a design flaw in KML ?

 

Please let  me know ?

 

Thanks,

Carlo

 

From: Miceli, Carlo J.
Sent: Wednesday, June 07, 2017 8:12 AM
To: 'Rachel Hwang'; 'cesium-dev'
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Here is a better point.

 

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

 

Click on point.. Description comes up.. Then clears at interval time with KML data source.

 

Behavior does not clear displayed description with CZML data source

 

From: Miceli, Carlo J.
Sent: Wednesday, June 07, 2017 7:50 AM
To: 'Rachel Hwang'; 'cesium-dev'
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

 

 

From: Miceli, Carlo J.
Sent: Wednesday, June 07, 2017 7:47 AM
To: 'Rachel Hwang'; cesium-dev
Subject: RE: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi Rachel,

 

Ok I am running some tests on the example you sent me to see if there still are memory issues..

 

I run the CZML example you sent me and click on one of the tracks on the map and a description box comes up and stays up even after all intervals

 

If I convert this example to KML with a box from one of you examples.. it runs but when you click on the box with your

Mouse the description box comes up on the map but then clears at the one second interval.

 

This does not happen with czml but it does with kml.

 

Here is the example

 

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

 

Is there a reason why a KML data source at interval time clears the displayed box on the map from when you click on the source on the map but

With CZML data source this behavior does not happen

 

You can use my example from before (link below) to see this differences in behavior.

 

Let me know what you think

Matthew Amato

unread,
Jun 19, 2017, 3:29:36 PM6/19/17
to cesiu...@googlegroups.com
Just to close the loop, I replied to the other thread on this subject: https://groups.google.com/d/msg/cesium-dev/mBfPYXSySl0/5NR4O6GBBAAJ so let's continue the conversation there.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

Miceli, Carlo J.

unread,
Jun 26, 2017, 8:37:13 AM6/26/17
to Rachel Hwang, cesium-dev

Hi.

With my continue port of GE to Cesium I have some other Google Earth Plugin procedures I need to port.

Google.earth.addEventListener   (“click”)… type is KmlPlaceMark.

Does Cesium have an equivalent of this function for KML ?

Thank you,

Carlo

Rachel Hwang

unread,
Jun 26, 2017, 10:16:19 AM6/26/17
to cesium-dev, elkw...@gmail.com, CARLO.J...@leidos.com
Hi, 

If you need to implement any sort of on click behavior, check out ScreenSpaceEventType: http://cesiumjs.org/Cesium/Build/Documentation/ScreenSpaceEventType.html


Hope that helps,
- Rachel

Miceli, Carlo J.

unread,
Jun 26, 2017, 10:52:19 AM6/26/17
to cesiu...@googlegroups.com

Hi..

 

This helps .. to be more specific I am trying to port this code over.


Any examples would help using KML placemark.

 

Thanks,

Carlo

 

function addPlacemarkEventListener() {

                   //This code captures clicks on placemarks and places data within the left hand pane of web page

                  // Listen for mouse click on the window (look specifically for point placemarks).

                                var croName;

                var croDesc;

                                var placemark;

                                var hookNum = 0;   

                                google.earth.addEventListener(ge.getWindow(), 'click', function(event) {    

                                                if ( event.getTarget().getType() == 'KmlPlacemark' &&        

                                                                                ( event.getTarget().getGeometry().getType() == 'KmlPoint' || event.getTarget().getGeometry().getType() == 'KmlMultiGeometry' )

                                                                ){      

                                                   event.preventDefault();

                                                   placemark = event.getTarget();      

                                                   croName = placemark.getName();

                                                   croDesc = placemark.getDescription();

                                                   if (!croDesc == "") {

                                                                  hookNum = hookNum + 1;

                                                                  if (hookNum > 3)

                                                                  {

                                                                                 hookNum = 1;

                                                                   }

                                                   // Add to Cro Based upon Hook Number

                                                                   if (hookNum ==1)

                                                                   {

                                                                                  document.getElementById("trk1Id").innerHTML = "Id:  " + croName;

                                                                                  document.getElementById("trk1Details").innerHTML = croDesc;

                                                                                  croObjects[0] = croName;

                                                                   }

                                                                   else if (hookNum == 2)

                                                                   {

                                                                                                document.getElementById("trk2Id").innerHTML = "Id:  " + croName;

                                                                                                document.getElementById("trk2Details").innerHTML = croDesc;

                                                                                                croObjects[1] = croName;

                                                                                }

                                                                                else

                                                                                {

                                                                                                document.getElementById("trk3Id").innerHTML = "Id:  " + croName;

                                                                                                document.getElementById("trk3Details").innerHTML = croDesc;

                                                                                                croObjects[2] = croName;

                                                                                }

                                                                }

                                                                if (event.getTarget().getGeometry().getType() == 'KmlMultiGeometry' ) {

                                                                   //this most Likely ADSB point therefore create point based placemark other downstream processing can handle

                                                                  

                                                                   //alert ("detected multiGeometry");

                                                                  

                                                                   placemark = ge.createPlacemark('');

                                                                   var point = ge.createPoint('');

                                                                               

                                                                   //var destLat = event.getTarget().getAbstractView().getLatitude();

                                                                   //var destLon = event.getTarget().getAbstractView().getLongitude();

                                                                   //var destAlt = event.getTarget().getAbstractView().getAltitude() * 0.3048;

                                               

                                                                   //alert ("this is the values " + destLat + " " + destLon + " " + destAlt );

                                                                               

                                                                   point.setLatitude(event.getTarget().getAbstractView().getLatitude());

                                                                   point.setLongitude(event.getTarget().getAbstractView().getLongitude());

                                                                   // NOTE UNLIKE OTHER DATA FROM AFT & GE THIS ALTITUDE DATA IS IN FEET THEREFORE MUST CONVERT TO METERS!!!

                                                           point.setAltitude(event.getTarget().getAbstractView().getAltitude() * 0.3048);

                                                                               

                                                                   placemark.setGeometry(point)

                                                                  

                                                                }

                                                                // always add placemarks points for ruler calculations regardless of ruler style

                                                                if (placemarkRulerEnabled || pointRulerEnabled) {

                                                                   addRulerPoint(placemark);

                                                                }

                                                                if (cameraViewEnabled) {

                                                                   pointCamera(placemark);

                                                                   objectTrackedByCamera = croName;

                                                                }

                                                }

                                                else {

                                                                //not a placemark or kml point however if pointRulerEnabled then we want to get the lat/lon/alt of the point(s)

                                                                // selected to compute the distance

                                                                 if (pointRulerEnabled) {

                                                                                 // get point geometry from window                                                     

                                                                                // Create the placemark and add it to Earth.

                                                                                 placemark = ge.createPlacemark('');

                                                                                 var point = ge.createPoint('');

                                                                                 point.setLatitude(event.getLatitude());

                                                                                 point.setLongitude(event.getLongitude());

                                                                                 point.setAltitude(event.getAltitude());

                                                                                 placemark.setGeometry(point);

                                                                                if (rulerIndex==0) {

                                                                                                var tempId = 's' + numRulers;

                                                                                                placemark.setName(tempId);

                                                                                                currentKmlObjects[tempId] = placemark;

                                                                                }

                                                                                else {

                                                                                               var tempId = 'e' + numRulers;

                                                                                               placemark.setName(tempId);

                                                                                                currentKmlObjects[tempId] = placemark;

                                                                                }

                                                                                ge.getFeatures().appendChild(placemark);

                                                                                addRulerPoint (placemark);

                                                                 }

                                                                if (cameraViewEnabled) {

                                                                                // get point geometry from window                                                     

                                                                                // Create placemark holder

                                                                                 var tempPlacemark = ge.createPlacemark('');

                                                                               

                                                                                 var point = ge.createPoint('');

                                                                                 point.setLatitude(event.getLatitude());

                                                                                 point.setLongitude(event.getLongitude());

                                                                                 point.setAltitude(event.getAltitude());

                                                                               

                                                                                 tempPlacemark.setGeometry(point);

                                                                               

                                                                     pointCamera(tempPlacemark);

                                                                                objectTrackedByCamera = "";

 

                                                                }

                                                }

                                });

                }

 

 

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Rachel Hwang
Sent: Monday, June 26, 2017 10:16 AM
To: cesium-dev
Cc: elkw...@gmail.com; Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi, 

--

Miceli, Carlo J.

unread,
Jun 28, 2017, 10:48:44 AM6/28/17
to cesiu...@googlegroups.com, Rachel Hwang

With the continue Google Earth Port… I am having style issues with the entities name. They are blurred and hard to read especially zoomed out.

 

Here is a placemark in our KML file.

 

                <Placemark class="trk4"><name>4 {DEBBIE LOU}</name><Style><LabelStyle><scale class="scaleLabel_track">0.55</scale></LabelStyle><IconStyle><heading>264.873</heading><scale class="scaleIcon_track">0.65</scale><Icon><href>./trackAIS.png</href></Icon></IconStyle></Style><Point><coordinates>-82.629890442,27.776836395,0.0917636</coordinates></Point><description><![CDATA[<table border="1"><b><tr><th colspan="3">TRACK</th></tr><tr><th>Item</th><th>Value</th><th>Units</th></tr><tr><td>Latitude</td><td align="right">27.7768</td><td>deg WGS 84</td></tr><tr><td>Longitude</td><td align="right">-82.6299</td><td>deg WGS 84</td></tr><tr><td>Speed</td><td align="right">0.0</td><td>knots</td></tr><tr><td>Heading</td><td align="right">264.9</td><td>deg</td></tr><tr><td>Kind</td><td colspan="2">AIS</td></tr><tr><td>Age</td><td align="right">01:29:21</td><td>duration</td></tr><tr><td>Last Update</td><td>0x02010001</td><td>SensorId</td></tr><tr><td>Last Update</td><td colspan="2">2017-06-28T14:46:36.663Z</td></tr></b></table>]]></description></Placemark>

 

Any ideas would greatly be appreciated.  Thank you


Carlo

 

 

 

 

From: cesiu...@googlegroups.com [mailto:cesiu...@googlegroups.com] On Behalf Of Rachel Hwang


Sent: Monday, June 26, 2017 10:16 AM

To: cesium-dev
Cc: elkw...@gmail.com; Miceli, Carlo J.
Subject: Re: EXTERNAL: Re: [cesium-dev] Re: Porting over GE to Cesium using network links with KML files

 

Hi, 

--

Miceli, Carlo J.

unread,
Jul 5, 2017, 3:37:59 PM7/5/17
to cesiu...@googlegroups.com, Rachel Hwang

Ok. Since I have not heard on this.. I am assuming this is how Cesium renders KML files and this is normal ?

Rachel Hwang

unread,
Jul 7, 2017, 10:55:54 AM7/7/17
to cesium-dev, elkw...@gmail.com, CARLO.J...@leidos.com
Hi Carlo,

You can adjust the styling of your KML placemarks once they've been loaded as Entities in Cesium. The code will be very similar to this: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=GeoJSON%20and%20TopoJSON.html&label=Showcases

You can change the label properties however you'd like by accessing entity.label. see here for styling examples: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Labels.html&label=All

Hope that helps,
- Rachel

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/tKR2AdpsglA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages