<html>
At 10:37 AM 9/4/2002 +0100, you wrote:<br>
<blockquote type=cite class=cite cite>Hi all,<br><br>
Is there a way to include URL's / links into a map?<br>
For example: the user clicks on an object, symbol or label and the click
triggers the link.<br><br>
Thanks for all suggestions,<br><br>
Stefan</blockquote><br>
Put the URL in your TEMPLATE definition. Here's something I posted a year
or so ago:<br><br>
<br>
<font face="Arial, Helvetica">A TEMPLATE can be either a File or a URL.
MapServer examines a template definition, decides&nbsp; whether you have
specified a File or a URL, and responds accordingly. For example;<br>
&nbsp;&nbsp;&nbsp;&nbsp; “Display_Results.html”<br>
looks like a file and so will be processed as a file, but <br>
&nbsp;&nbsp;&nbsp;
“<a href="http://www.some_domain.com/Index.html”looks" eudora="autourl">http://www.some_domain.com/Index.html”<br>
looks</a> like a URL and so will be processed as a URL, which is quite a
bit&nbsp; different than how a File is processed.<br><br>
If MapServer decides that it has a file template, it goes through the
file and replaces stuff within [] with appropriate data. If the template
is a URL, however, MapServer redirects to that URL. The URL might be on
the same server, or another server. Although MapServer can not process
the file pointed to by a URL, it does process the URL string itself. For
example:<br>
&nbsp;&nbsp;&nbsp;
</font><a href="http://www.tetonwyo.org/clerk/query/default.asp?pidn=[PIDN" eudora="autourl"><font face="Arial, Helvetica" color="#0000FF"><u>http://www.tetonwyo.org/clerk/query/default.asp?pidn=[PIDN</a>]<br>
</u></font><font face="Arial, Helvetica">MapServer will replace [PIDN]
with an appropriate value before redirecting to the new location. Note
also that you can go to an Active Server Page, or other not-purely HTML
type location. (To me, this is really sweet, because it allows you to
easily mix CGI MapServer with other web technologies.)<br><br>
Okay, so you read this far and I still haven’t told you anything that you
didn’t already know, but here’s what had me flailing. A template can only
reference a URL in a SINGLE query mode. So if you are in a MULTIPLE query
mode, e.g. nquery, MapServer only attempts to processes the template as a
file. Not a good thing if you specified a URL, but still entirely
logical. A URL is intrinsically a single thing, and you can’t
simultaneously redirect a browser to multiple locations. In other words,
MapServer assumes that if your query could potentially return more than
one result, that you would have specified a File for the template, not a
URL.<br><br>
</font><x-sigsep><p></x-sigsep>
Richard W. Greenwood, PLS<br>
Greenwood Mapping, Inc.<br>
Rich@GreenwoodMap.com<br>
(307) 733-0203<br>
<a href="http://www.greenwoodmap.com/" eudora="autourl">http://www.GreenwoodMap.com</a></html>