Announcement

Collapse
No announcement yet.

moving icons

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • moving icons

    I would like to move an icon along a path a la GPS Tracker and wonder if this i doable in xml?

  • #2
    Not in xml. You could do it with a plugin though.

    Comment


    • #3
      Bob,
      I'm doing that with KML. I download a kml file from a web server with updates periodically like every 12 seconds. Each plot has a unique name, so when the new kml file is downloaded, the old placemarks are moved to the new location. Let me know if you need specifics.
      James

      Comment


      • #4
        If you are working for DOD I think the widgets would be available to you. I think Nigel said it would be licensed to DOD. Maybe send a message to Nigel to check on the status. I don't see his pluggin on the Full Add On page.
        James

        Comment


        • #5
          I was able to do it from kml file that fetches the location from a server. The PHP script on the server would change the location every <insert specified time> seconds, and the icon would correspondingly move in World Wind.

          <?xml version="1.0" encoding="UTF-8"?>
          <kml xmlns="http://earth.google.com/kml/2.1">
          <NetworkLink>
          <name>GPS thingy</name>
          <open>1</open>
          <Url>
          <href>http://.../location.php</href>
          <refreshMode>onInterval</refreshMode>
          <refreshInterval>2</refreshInterval>
          </Url>
          </NetworkLink>
          </kml>
          Machine. Unexpectedly, I’d invented a time
          - Alan Moore

          Comment


          • #6
            I thought he wanted an icon to move continuously, not just refresh every few seconds.

            Comment


            • #7
              That's what continuous is?

              You can set the refresh to 1 (second), and feed the location to the server, picking it up from it into World Wind like that...

              edit:
              On the server, I'm simply creating a KML placemark in PHP, which refreshes every time it is called from World Wind giving a new location. You can get the new location by calling it in directly from the script
              Last edited by Chade; 11-10-2006, 12:35 AM.
              Machine. Unexpectedly, I’d invented a time
              - Alan Moore

              Comment


              • #8
                I meant smoothly along a path, like the dot on the map when Indiana Jones flies somewhere in the movies.
                Last edited by withak; 11-10-2006, 12:41 AM.

                Comment


                • #9
                  Moving icon

                  Originally posted by withak
                  I meant smoothly along a path, like the dot on the map when Indiana Jones flies somewhere in the movies.

                  Yup, that's the one. Basically just ollowing a track. No, the DOD has yet to realise the stunning intelligence that resides in this cranium so I don't work for them, though I understand there's now a fairly senior vacancy going as of this morning's newspapers

                  I've never written a plug-in so wouldn't know where to start.

                  Comment


                  • #10
                    Bob,
                    I'm trying to figure out how to simulate a flight, moving an aircraft icon along some path. I'm planning on using an online spreadsheet, called EditGrid.com which uses XSL stylesheets to generate either KML or XML. I pasted a bunch of lat/lons into a sheet here. Now I'm trying to figure our how to use the XSL to generate the KML based on current time. If I refresh the network link every 10 seconds or so, I should see a moving track. Right now it just downloads all the plots. Hopefully someone that knows more about XSL Stylesheets will help me out here. The plots I'm generating should be around Utah. You can see what I'm working on if you load this with the kml importer:


                    <?xml version="1.0" encoding="UTF-8"?>
                    <kml xmlns="http://earth.google.com/kml/2.0">
                    <Document>
                    <name>EditGrid</name>
                    <visibility>1</visibility>
                    <NetworkLink>
                    <name>MovingTrack Link</name>
                    <description><![CDATA[Moving Track Data]]></description>
                    <Url>
                    <href>http://www.editgrid.com/user/james_in_utah/MovingTrack.mil.kml</href>
                    <refreshMode>onInterval</refreshMode>
                    <refreshInterval>10</refreshInterval>
                    </Url>
                    </NetworkLink>
                    </Document>
                    </kml>

                    Comment


                    • #11
                      There was a discussion about this (via plugins):
                      http://forum.worldwindcentral.com/sh...t=moving+icons
                      I'm not sure how far he got, or if it's still applicable.
                      Mashi seems to have added a method SetPosition() to the icon class:
                      http://issues.worldwind.arc.nasa.gov/browse/WW-408
                      And it appears to still be there:
                      http://nasa-exp.svn.sourceforge.net/...on.cs?view=log
                      I'll see what I can do with it tonight, see if it still works.
                      Note: The above statement is probably an educated guess, derived from much forum reading, IRC chatting, general curiosity, etc. Use at your own risk.
                      Before asking, check the FAQ or search, and Ask a good question.

                      Having problems? Make sure you have Managed DirectX and .NET Framework.
                      Then check the Video Card Compatibility List


                      Comment


                      • #12
                        It should be similiar to what the movie recorder does in moving the camera smoothly along a path.

                        Comment


                        • #13
                          You mean like the dot and the camera moving? I thought it was just the icon. (Then again, I've never seen Indiana Jones flying somewhere).
                          Note: The above statement is probably an educated guess, derived from much forum reading, IRC chatting, general curiosity, etc. Use at your own risk.
                          Before asking, check the FAQ or search, and Ask a good question.

                          Having problems? Make sure you have Managed DirectX and .NET Framework.
                          Then check the Video Card Compatibility List


                          Comment


                          • #14
                            Just the smooth movement. When Indy files somewhere they show a map of the world with an animated dot and a red line showing his path. The movie recorder does the same kind of thing with the camera, i.e. moving it smoothly along a path at 30 fps (or whatever), not jumping it from point to point once every few seconds.

                            Comment


                            • #15
                              Ah, I see what you were trying to say
                              Note: The above statement is probably an educated guess, derived from much forum reading, IRC chatting, general curiosity, etc. Use at your own risk.
                              Before asking, check the FAQ or search, and Ask a good question.

                              Having problems? Make sure you have Managed DirectX and .NET Framework.
                              Then check the Video Card Compatibility List


                              Comment

                              Working...
                              X