Thomas DeWeese wrote:
Hi Marcel,

Sounds cool!

It is cool, using a MOM like xmlBlaster and a GUI based on batik SVG is the top cool generic, real time, massively distributed way to go ...


Marcel Ruff wrote:

I have an airplane radar view.
I have some little airplane symbols drawn with svg
(like Airbus A320, Boeing 747,etc) and collected in a library.

When a new airplane arrives at the airport i detect the type of airplane,
pick it from the library, clone the svg tree and assign
it a unique identifier (say the flight number).


I would dynamically create a little SVG snippet:

My stupid question: How is this 'dynamically' created (java code?)? Can you provide an example?

thanks

Marcel

<g id="flight<your number>" transform="translate(yourX, yourY)"> <use xlink:href="airplanes.svg#boeing747" x="0" y="0" width="20" height="20"/> <text id="flight<your number>_label">your number</text> </g>

  You might not need to assign an id to the 'text' element
(since it may never change and even if it does you can find it
 fairly easily given you can get a reference to the 'g', but
if you have labels for things like altitude, air speed, etc it
might be convenient).

Now the airplane positions arrive over xmlBlaster (http://www.xmlBlaster.org)
from the radar system every second, they should find the corresponding
svg plane using the flight number and move the airplane to the
next position.


   document.getElementById("flight"+flightNumber).
    setAttribute("transform", "translate("+newX+","+newY+")");

Any idea how to achieve this in a generic way following the SVG standard
or following the batik extension?


  The above should work well.  You may need to play with the coordinate
system for your symbols to get something that works well for you
what I have shown above probably isn't what you want since the
symbol will all be down and to the right of the true location of
the aircraft.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://www.xmlBlaster.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to