Skip to content Skip to sidebar Skip to footer

Issue Using Networklinkcontrol For Updates In Ge Plugin

I'm using KML to load an image overlay, and then I'm trying to change camera view values such as altitude using NetworkLinkControl. None of my NetworkLinkControl updates are reflec

Solution 1:

Try targetting the Camera element itself, not the PhotoOverlay parent. KML Updates in Google Earth don't see to work so well when you are trying to make changes a couple levels down from the targeted parent.

In other words, I would try this:

KML 1

<PhotoOverlayid="image_10000244"><name>My Photo</name><SnippetmaxLines="1">
      <![CDATA[<a href="#image_10000244">Enter Photo</a>]]>
  </Snippet><Cameraid="image_10000244_camera"><longitude>-122.668</longitude><latitude>45.5069</latitude><altitude>1.0</altitude><heading>66.0</heading><tilt>90.0</tilt><roll>0.0</roll></Camera><ViewVolumeid="image_10000244_viewvol" /></PhotoOverlay>

and then in your networklinkupdate:

<NetworkLinkControl><Update><targetHref>http://hostname/images/10000244.kml?auth_key=e34962fce2df4829b0e86870c9e834da&amp;nodesc=1</targetHref><Change><CameratargetId="image_10000244"><altitude>55</altitude></Camera></Change><Change><ViewVolumetargetId="image_10000244_viewvol"><!-- new values --></ViewVolume></Change></Update></NetworkLinkControl>

In general, it's best to target the immediate parent of the simple element you want to change. Cascading updates don't work so well.

I would also recommend that you try this in pure KML in Google Earth itself to see if it works. Then, after the NLC update is performed, you can copy out the PhotoOverlay and paste the code into your editor and see if the change was applied correctly.

Let me know if that works...

Post a Comment for "Issue Using Networklinkcontrol For Updates In Ge Plugin"