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

Mikel Maron mikel_maron at yahoo.com
Mon May 15 01:21:39 PDT 2006


What I've done in the past is use <inputonly> and <annotateurl> (with a javascript arg) for this purpose .. this will end up sending the current parameters each time the map is zoomed.
You can see this in action at http://mapufacture.com/map.php .. open up the "Current Location" panel, and navigate through the map.

But with Geowiki, annotateurl is obviously already occupied with another function. So what we really need here is another interface to access the current state of the map. Something like JLocComm, passed with the name of a javascript function, which would callback to that function with the current parameters.

http://worldkit.org/trac/index.fcgi/ticket/120

-Mikel

----- Original Message ----
From: Stefan F. Keller <sfkeller at gmail.com>
To: worldkit-dev at lists.brainoff.com
Sent: Sunday, May 14, 2006 2:40:02 PM
Subject: [worldKit-dev] 'Link to this page' (or coord display) in worldkit/geowiki

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  . 
  
 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> 
  
_______________________________________________
worldkit-dev mailing list
worldkit-dev at lists.brainoff.com
http://lists.brainoff.com/listinfo.cgi/worldkit-dev-brainoff.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.brainoff.com/pipermail/worldkit-dev-brainoff.com/attachments/20060515/6db819f6/attachment-0005.htm>


More information about the worldkit-dev mailing list