[worldKit-dev] 'Link to this page' (or coord display) in worldkit/geowiki

Stefan F. Keller sfkeller at gmail.com
Sun May 14 06:40:02 PDT 2006


Hi,



I extended worldkit/geowiki so that it can be called with parametrized URL,
like this:
http://www.geometa.info/worldkit/?lat=47.2244&long=8.8183&zoom=512

This was done by using parameters in index.php which override config.xml. In
PHP that's easy (see fig.1 and fig.2).



Now I'd like to add a "Link to this page" (in index.php: <a
href="javascript:newWindow()">Link (URL) to this page</a>) which obviously
requires additional integration between Flash and JavaScript. It's like in
www.multimap.com.



I know that there is the <window>-tag in config.xml. But this is by
definition not triggered when zooming in/out or panning. Display coords (in
index.php) would be a similar requirement.



This probably requires changing the Flash app and that's why I post it here
(I have no Flash dev kit yet...).



-- Stefan



Fig. 1. Adding key/value pairs to a link call to worldkit/geowiki:



  <?php

    $zoom= (int)$HTTP_GET_VARS['zoom'];

    $lat= (float)$HTTP_GET_VARS['lat'];

    $long= (float)$HTTP_GET_VARS['long'];

    if ($lat != 0 && $long != 0) {

      if ($zoom < 1 || $zoom > 16384) {

        $zoom= 1;

      }

      $parameters=

        "?initialzoom=".$zoom."&initiallat=".$lat."&initiallong=".$long;

    } else

      $parameters= "";

  ?>



Fig. 2. Extending the call to worldkit.swf:



  <object

   ...

   <param value="worldkit.swf<?php echo $parameters; ?>" name="movie">

   <embed

     ...

     src="worldkit.swf<?php echo $parameters; ?>">

  </object>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.brainoff.com/pipermail/worldkit-dev-brainoff.com/attachments/20060514/58865316/attachment-0001.html>


More information about the worldkit-dev mailing list