ramazanalic / kml-samples

Automatically exported from code.google.com/p/kml-samples
0 stars 0 forks source link

Ability to dynamically update a network link's refreshInterval #281

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which products are relevant to this feature request?

Google Earth

What should this feature enhancement do?

For NetworkLinks updated using onInterval...
When an <Update> block containing a targetId for the receiving 
NetworkLink's <Link> node is passed via a NetworkLinkControl, the 
receiving NetworkLink's refreshInterval will be updated accordingly.  This 
would allow for one to change a currently open NetworkLink's refresh rate 
from 10s to 3.5s, for example.

Are there any currently known workarounds that produce the same, or
similar, result?

Not that I know of.

Original issue reported on code.google.com by dou...@gmail.com on 1 Jun 2009 at 5:02

GoogleCodeExporter commented 8 years ago
An example would be:

1. Send the loader NetworkLink:

<?xml version="1.0"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <NetworkLink>
    <name>Main Loader 1</name>
    <open>1</open>
    <visibility>1</visibility>
    <Link>
      <href>http://127.0.0.1:1234/_main1.kml</href>
    </Link>
  </NetworkLink>
</kml>

2. Send the updater NetworkLink:

<?xml version="1.0"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <NetworkLink>
    <name>Update Loader 1</name>
    <Link id="linkUpdate1Id">
      <href>http://127.0.0.1:1234/_update1.kml</href>
    </Link>
  </NetworkLink>
</kml>

3. Send a NetworkLinkControl to change the <Link> to refresh onInterval as 
_update1.kml when requested by GE:

<?xml version="1.0"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<NetworkLinkControl>
  <Update>
    <targetHref>http://127.0.0.1:1234/_update1.kml</targetHref>
    <Change>
      <Link targetId="linkUpdate1Id">
        <refreshMode>onInterval</refreshMode>
        <refreshInterval>1</refreshInterval>
      </Link>
    </Change>
  </Update>
</NetworkLinkControl>

------------------------------------------------------------------
==> Now the updater NetworkLink's <Link> will refresh onInterval at 1s.

Original comment by dou...@gmail.com on 1 Jun 2009 at 5:12