highlite again!
Trimble, Beheen
btrimble at SFWMD.GOV
Wed Oct 11 11:09:58 PDT 2006
Hi Steve,
Sorry for asking questions if they look simple to you!
Since yesterday I am trying to do this! Mine does not highlight!
Would you pleas answer these questions for me?
1) My layer template queries all the items from the shape file and
displays the attributes in a separate window. That means the highlited
layer is where I clicked the feature, right?
2) Because of item above, I am not using the CLASSITEM. Is this okay?
3) Would you please clarify this statement of yours with my case of map
file and page, shown below?
Rather it stores the key value (an ID) for the selected feature in a
hidden variable and uses that value to draw that feature in a
highlighted way.
- Which one is the key value - I don't know
- Which one is hidden variable - mine is 'layer' defined in EXPRESSION
and the page option menu called name=layer ?
- What is the value in the hidden variable after clicking - the name of
the shapefile, 'lecsr_subareas' located in data directory?
Thanks a lot
Beheen
This is part of my map file:
LAYER
NAME lecsr_subareas
TYPE POLYGON
STATUS DEFAULT
DATA lecsr_subareas
CLASS
NAME 'Lecsr Subareas'
STYLE
OUTLINECOLOR 205 198 115
COLOR 255 228 225
END
END
CLASS
NAME 'Lecsr Subareas Selected'
EXPRESSION "%layer%"
STYLE
OUTLINECOLOR 0 0 0
COLOR 255 255 0
END
END
END
This is part of my page:
<input type="image" name="img" src="[img]" width="[mapwidth]"
height="[mapheight]" border="0" alt="this is the map" >
<input type="submit" value="Refresh/Query">
<input type="radio" name="mode" value="query" onClick="nueva();"
<select multiple name="layer" size=3>
<option value="lecsr_subareas" [lecsr_subareas_select]> Lecsr Subareas
...
</select>
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Steve Lime
Sent: Tuesday, October 10, 2006 4:22 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] highlite again!
Beheen: Take a look at this page:
http://maps.dnr.state.mn.us/cgi-bin/mapserv46?map=/usr/local/www/docs_ma
ps/mapserver_demos/tests46/query_persistent/test.map&program=/cgi-bin/ma
pserv46&htmlroot=/mapserver_demos/tests46&map_web_imagepath=/usr/local/w
ww/docs_maps/tmp/&map_web_imageurl=/tmp/
It's a test interface that shows how to use runtime substitutions to
make selected features persistent. It doesn't use query maps at all.
Rather it stores the key value (an ID) for the selected feature in a
hidden variable and uses that value to draw that feature in a
highlighted way.
Steve
>>> "Trimble, Beheen" <btrimble at SFWMD.GOV> 10/10/2006 10:01:01 AM >>>
Would someone please tell me how to change this page to highlite the
selected feature? I have the querymap in my mapfile.
If you please make the query string in the nueva function I appreciate.
Beheen
================
<html>
<FONT face="helvetica">
<head>
<title>Performance Measure Graphics Viewer</title>
</head>
<SCRIPT LANGUAGE="JavaScript">
function nueva(){
if (document.getElementById("mode").checked==false )
{ document.getElementById("mapserver").target="_blank";}
else
{ document.getElementById("mapserver").target="mapa"; }
}
function init(){
window.name="mapa";
}
</SCRIPT>
<body onLoad="init();" bgcolor="#ffffff">
<center><h2>LECSR North Palm Beach - 2000 </h2></center>
<hr>
<form method="GET" id="mapserver" action="[program]" name="mapserv">
<center>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td valign="top" align="center">
<table width="390" border="0" cellspacing="0" cellpadding="4"
align="center" bgcolor="#666666">
<tr>
<td align="center"><input type="image" name="img"
src="[img]"
width="[mapwidth]" height="[mapheight]" border="0" alt="this is the
map"
</td>
</tr>
<tr>
<td bgcolor="#666666">
<img title="scalebar (mi)" alt="scalebar (mi)"
src="[scalebar]">
</td>
</tr>
</table>
</td>
<td valign="top" bgcolor="#ffffff">
<table cellpadding="5" cellspacing="0" border="0"
bgcolor="#ffffff">
<tr>
<td>
<center><input type="submit"
value="Refresh/Query"></center>
<p>
<input type="radio" name="mode" value="browse" checked>
<b>Browse map</b><br>
<input type="radio" name="mode" value="query"
onClick="nueva();" > <b>Query feature</b><br>
<input type="radio" name="mode" value="nquery"
onClick="nueva();" > <b>Query multiple features</b>
<hr>
<p>
<b>Select Layers to Display: </b><br>
<select multiple name="layer" size=3>
<option value="lecsr_subareas" [lecsr_subareas_select]>
Lecsr Subareas
<option value="lecsr_budget" [lecsr_budget_select]>
Lecsr
Budget
<option value="lecsr_ir" [lecsr_ir_select]> Lecsr Ir
<option value="lecsr_strucflow"
[lecsr_strucflow_select]>
Lecsr Strucflow
<option value="lecsr_gwstage" [lecsr_gwstage_select]>
Lecsr Gwstage
</select>
<p>
Zoom In <input type=radio name=zoomdir value=1
[zoomdir_1_check]>
Pan <input type=radio name=zoomdir value=0
[zoomdir_0_check]>
Zoom Out <input type=radio name=zoomdir value=-1
[zoomdir_-1_check]>
<p>
Zoom Size <input type=text name=zoomsize size=4
value=[zoomsize]>
<p>
<b>Select a PMSet to Query: </b><br>
<select single name="pmset" size=2>
<option value="2000b 2050b alt2c alt2d"> 2000b 2050b
alt2c
alt2d
</select>
<p>
<font size=+1><b>Legend</b></font><br><hr>
<img src="[legend]"><hr>
<p>
<left><input name="ref" type="image" src="[ref]"
border="0"></left>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
<input type="hidden" name="imgxy" value="[center]">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="root" value="[root]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="program" value="[program]">
<input type="hidden" name="map_web_imagepath"
value="[map_web_imagepath]">
<input type="hidden" name="map_web_imageurl"
value="[map_web_imageurl]">
<input type="hidden" name="map_web_template"
value="[map_web_template]">
</form>
</font>
</body></html>
More information about the MapServer-users
mailing list