Ticket #120 (new enhancement)

Opened 3 years ago

Last modified 1 year ago

JLocComm

Reported by: mikel Assigned to:
Priority: major Milestone:
Component: javascript Version:
Keywords: Cc:

Description

pass in the a javascript function name, callsback with the current state of the map

Change History

05/15/06 01:24:33 changed by mikel

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_VARSzoom?;

$lat= (float)$HTTP_GET_VARSlat?;

$long= (float)$HTTP_GET_VARSlong?;

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>

08/14/07 08:51:42 changed by mikel

  • owner deleted.
  • component changed from interact to javascript.