* Melchior FRANZ -- Wednesday 26 November 2008:
> 4) And to a key definition of your choice add this binding:

Here's a better version: it uses mpmap*.flightgear.org instead
of maps.google.com. These mpmap servers aren't as reliable
(i.e. occasionally down), but much more useful. The code
distinguishes between MP and non-MP use. In the latter case
the pilot menu and pilot symbols are rather unimportant, or
even disturbing. (If you don't see the pilots in the sim, then
you don't need them on the map either.) If mpmap01 is down,
then just set /sim/multiplay/mapserver to 2 etc. One could
also let the fifo runner script check which servers are up,
of course.

  <binding>
      <command>nasal</command>
      <script><![CDATA[
          var srv = props.globals.initNode("/sim/multiplay/mapserver", 1, 
"INT").getValue();
          var lat = getprop("/position/latitude-deg");
          var lon = getprop("/position/longitude-deg");

          if (getprop("/sim/multiplay/txport") or 0)  {
              var sign = getprop("/sim/multiplay/callsign");
              var ext = "&follow=" ~ sign;
          } else {
              var ext = 
"&updateinterval=30&pilot_label=off&icon_mode=dot&menuminimized";
          }

          exec("openurl 
http://mpmap%02d.flightgear.org/?ll=%.10f,%.10f&z=12&t=h"; ~ ext,
                  srv, lat, lon);
      ]]></script>
  </binding>

See the "Help" tab in the mpmap for a list of available
options.

m.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to