AW: [mapserver-users] Question on linking external info

Nicole Bomeke bon at ivv-aachen.de
Fri Jun 14 03:23:44 EDT 2002


That is a good question.

I used the following code to achive something similar, but by doing it this
way the user has to click twice.
The first time he has to click on a point on the map and the second time he
has to click on a link in the
template file. The link refers to a html page with the name "[HSTNAME].html"
stored in column HSTNAME of the
DBase File vrs_hst.dbf.

That works fine but is a bit inconvenient. I would prefer that the html page
"[HSTNAME].html" appears allready
on the first click. Has anybody an idear how I can achive that?

Nicole Bomeke


Mapfile:
---------
  LAYER
    NAME "Haltestellen"
    DATA vrs_hst
    STATUS DEFAULT
    TYPE POINT
    CLASS
      NAME "Haltestellen"
      COLOR 0 0 255
      TEMPLATE "point_query.html"
    END
  END


point_query.html:
-----------------
<font size+1><b>You have choosen [HSTNAME].</b></font>
<br>
<font size+1><b>For further information:</b></font>

<p>
<script language="javascript">
  var URL="http://[host]/mapserv3.5_vrs_appl/"+"[HSTNAME]"+".html";
  document.write("<a href="+URL+">Click here!</a>\n");
</script>



-----Ursprungliche Nachricht-----
Von: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu]Im Auftrag von lists
Gesendet: Donnerstag, 13. Juni 2002 12:35
An: mapserver-users at lists.gis.umn.edu
Betreff: [mapserver-users] Question on linking external info


Hi

I recently started looking into MapServer, and have MapServer 3.6/PostGIS
running. Very nice !

I was looking at the Recreation Compass at
http://www.dnr.state.mn.us/maps/compass.html and was wondering how they
implemented the external info when clicking on certain features in the
map.

For example, on clicking one of the pink "Scientific & Natural Areas" I
get a new browser window with Information/photos etc about "Lost River
Peatland
SNA" ... generally speaking, what is needed to achieve this ?

Any help would be much appreciated

Regards and Thanks

Arif Saleem




More information about the mapserver-users mailing list