<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Peter,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'll send you a copy of a widget I made which lets
you search attributes of a shapefile (e.g. name) and zooms to the object. You
could use a placename dataset or something similar to do the search on (let me
know if you don't know where to find one). </FONT></DIV>
<DIV><FONT face=Arial size=2>If anyone else wants it, e-mail me. Feedback will
help me debug.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jacob</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----Original Message-----<BR>From: <A
href="mailto:chameleon-bounces@lists.maptools.org">chameleon-bounces@lists.maptools.org</A>
[mailto:chameleon-bounces@lists.maptools.org] On Behalf Of Paul Spencer<BR>Sent:
15 March 2005 20:27<BR>To: Peter Thomann<BR>Cc: <A
href="mailto:chameleon@lists.maptools.org">chameleon@lists.maptools.org</A><BR>Subject:
Re: [Chameleon] finding locations and parsing session id</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Peter,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>the session id can be accessed in several
ways.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>PHP<BR>---</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>you have access to a pre-defined constant SID that
contains a <BR>URL-friendly form of the session id, as in:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$szURL = "<A
href='http://somewhere.php?".SID'>http://somewhere.php?".SID</A>;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>note it is a constant, not a PHP variable so there
is no '$' and it is <BR>UPPERCASE. SID evalutes to the equivalent
of:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$szURL = "<A
href='http://somewhere.php?sid=".session_id'>http://somewhere.php?sid=".session_id</A>();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>which is more likely to be used in form
variables,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>echo "<input type='hidden' name='sid'
value='".session_id()."'>";</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>JavaScript<BR>----------</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>you have two options. The session id may
already be in hidden form <BR>variables in the page, you can access
through:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>var sid = document.forms[0].sid.value;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The second option is to embed the sid in the page
using the Chameleon <BR>pre-processor. In your index.phtml, after
$oApp->CWCInitialize(); call</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>$oApp->setVar( 'SID', session_id()
);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>then in your template, you can place [$SID|$]
whereever you need the <BR>sid. For instance:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><a
href="somewhere.php?sid=[$SID|$]">link</a></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>For your second question, you can use the Locate
widget but it only has <BR>services that are specific to Canada right now.
It is built to be <BR>extensible with new locator services but it would require
some time and <BR>effort to understand how the code works before you could add a
new <BR>locator service to the existing widget.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Cheers</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Paul</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Peter Thomann wrote:<BR>> ok i have 2 problems
one is very easy i just cant find it<BR>> what is the name of the session-id
variable inside chameleon cause i need<BR>> links i my mouse-pointer-query
that points on a special position in the map<BR>> i calculate the links out
of the shapefiles.<BR>> <BR>> the other problem is that i need some kind
of widget, wich can find me a<BR>> special place like a city or something.
tried out the locate widget but i<BR>> cant figure out how to use it for my
map.<BR>> <BR>_______________________________________________<BR>Chameleon
mailing list<BR><A
href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</A><BR><A
href="http://lists.maptools.org/mailman/listinfo/chameleon">http://lists.maptools.org/mailman/listinfo/chameleon</A><BR></FONT></DIV></BODY></HTML>