KML gx:Track Network Link updates

2019-08-24 07:05发布

问题:

I am using a Network Link and Network Link Control to add coordinates to a gx:Track. I know that the network link is working because it changes other updates that I needed to make, but it doesn't change the gx:Track at all. And by that I mean that new coordinates do not get added to the track.

Here is my code that the updates get tacked onto:

<Folder id="movement">
  <name>Position</name>
  <Placemark id="known_mov">
    <name>Known Position - movement</name>
    <description>position according to GPS data for transmitted messages</description>
    <styleUrl>#multiTrack</styleUrl>
    <gx:Track id ="trans_pos_mov">
      <!-- UPDATES ADDED HERE -->
      </gx:Track>
  </Placemark>

And here is the code for the updates:

<Create>
  <gx:Track targetId="trans_pos_mov">
    <when>12:56:25</when>
    <gx:coord>1 1 1</gx:coord>
  </gx:Track>
</Create>

Am I missing a step somewhere? Am I not calling the targetId in the right spot?

Much thanks.

回答1:

That should work. Did you notice that you have a space after id, before the equals sign?

id ="trans_pos_mov"

That would explain why you're not seeing any updates, id attribute would be empty.