Google Groups Home
Help | Sign in
Discussions > KML Server Side Scripting > Displaying a dynamic network topology with popup menus
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
devesh  
View profile
 More options Jun 25, 1:19 pm
From: devesh
Date: Wed, 25 Jun 2008 10:19:48 -0700 (PDT)
Local: Wed, Jun 25 2008 1:19 pm
Subject: Displaying a dynamic network topology with popup menus
Hi Everyone,

I am trying to display a frequently changing network topology via
google earth.
The network topology consists of nodes and links between them. The
topology is
quite dynamic as nodes move and links make and break. The network is
not so
dispersed and fits easily within a couple of city blocks.

I want to be able to display this 'dynamic network' on google earth,
with nodes
represented as points and links as lines. And I also want the user to
be able
to click on a node (in google earth) and bring up a context sensitive
popup 'Node
menu', and similarly when clicking the links.

The way I am doing it now is pretty standard: I have a backend
database which
is updated as the topology changes. And a frontend Cgi script which
reads this
DB and dishes out the KML representation of this graph. And finally I
have a
network link which periodically polls (pulls) this cgi script. The
polling
frequency has to be fast as the network is quite dynamic. I currently
set it to
poll every second.

In the KML that I dish out, nodes are represented by placemarks, and
links by
placemarks and linestrings. The context sensitive popup menu is
encoded in the form
of the html-description of the nodes and links.

The problem I am having with this setup is that it ends up repainting
the
entire scene each time (ie every second) it fetches the network link.
So when a
user clicks on a node to bring up its popup html description, that
description
is lost as soon as a new update happens.

Also because of the periodic polling, the whole thing is a bit jerky
as it
seems more like a fast slide show rather than a smooth animation.

So my questions are:

i. Are there any suggestions on whether I should be using a different
architecture to display something dynamic. Is there any way to 'Push'
updates
to google earth, instead of polling them.

ii. How do I make it not repaint the entire screen, or how do I ask it
retain
the popped up 'Node description' instead of erasing it each time it
updates it.

I am using the following version of google earth.

4.3.7204.0836 (beta)
Apr 24 2008
13:27:36
OpenGL
Linux (2.6.24.0)
Ubuntu 8.04

And this is the network link that I use:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<NetworkLink>
        <name>Blah Blah</name>
        <open>1</open>
        <flyToView>1</flyToView>
        <refreshVisibility>1</refreshVisibility>
        <Link>
                <refreshMode>onInterval</refreshMode>
                <refreshInterval>1</refreshInterval>
                <href> http://localhost/cgi-bin/graph.kml.rb</href>
        </Link>
</NetworkLink>
</kml>

Thanks. All pointers/suggestions are quite welcome. Please let me know
if more information is required.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ManoM Google employee  
View profile
 More options Jun 26, 5:24 pm
From: ManoM
Date: Thu, 26 Jun 2008 14:24:34 -0700 (PDT)
Local: Thurs, Jun 26 2008 5:24 pm
Subject: Re: Displaying a dynamic network topology with popup menus
Hi devesh,

This seems like a perfect use of Updates:
http://code.google.com/apis/kml/documentation/updates.html

Basically, your NetworkLink would download initial data, and then when
it polled again the server would send a NetworkLinkControl that
containing only data to change.

Mano

On Jun 25, 10:19 am, devesh wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google