Adding a url link object to a map

Gregor Mosheh gregor at HOSTGIS.COM
Fri Jul 6 13:06:58 PDT 2007


> I want to add points and/or labels to a map layer that will link to a 
> URL when clicked by the user.
> Can anyone tell me the easiest way to do this?

Yup. You'd use the query template (the TEMPLATE setting for a layer) to 
display the URL in the apprpriate context.

For example:
<http-equiv="refresh" content="0;url=[url]"/>

Or, if the URL is derived from some field/attribute:
<http-equiv="refresh" content="0;url=http://server/place/[title].pdf"/>

Is that a good start?
Of course, this assumes that you have a query template and that you have 
click-to-query stuff basically working. But from there it's easy.

-- 
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the MapServer-users mailing list