<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<title>Re: [mapserver-users] RE: Highlight</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
line-height:120%;
background:#F8F8F8;
font-size:11.5pt;
font-family:Consolas;
letter-spacing:.2pt;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
letter-spacing:.2pt;
background:#F8F8F8;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Alright I am getting a return now…but it is returning everything
selected…so it seems that my query is not working for some reason…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>If I uncomment </span><span style='font-size:10.0pt;font-family:
"Calibri","sans-serif";color:#632423'>if($test == MS_SUCCESS)</span><span
style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> then
I get an error…so the query is not working<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>What can be causing this?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>What am I doing wrong here…is there a piece that I am missing….<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I echo the query string and I get a “1” ??????<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>echo "Query:".$test;<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This line returns<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>“Query: 1”<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>PHP CODE:<o:p></o:p></span></b></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'># Include the GeoMOOSE PHP Library Utilities<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>include('Configuration.php');<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>include('geomoose_php_util.php');<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>$map =
ms_newMapObj('/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/select_Highlight.map');<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>$map->selectOutputFormat('jpeg');<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>$qlayer = $map->getLayerByName('Parcels');<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'><o:p> </o:p></span></p>
<p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>$test = $qlayer->queryByAttributes("PID","PID
IN ('1211922220012',1211922220003)",MS_MULTIPLE);<o:p></o:p></span></b></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>//if($test == MS_SUCCESS) <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'><o:p> </o:p></span></p>
<p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>echo "Query:".$test;<o:p></o:p></span></b></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>$img = $map->drawQuery();<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>$image_url=$img->saveWebImage();<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Select_highlight.map file<o:p></o:p></span></b></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'>LAYER # Parcels Polygon Layer<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> NAME 'Parcels'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> DATA 'parcels/parcels.shp'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> STATUS ON<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> TYPE POLYGON<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> TEMPLATE
'parcels/select_parcels.html'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> FILTERITEM 'PID'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> #FILTER /^%id%/<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> METADATA<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> qstring_validation_pattern '.'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> END<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> HEADER 'parcels/select_header.html'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> TEMPLATE 'parcels/select_parcel.html'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> FOOTER 'parcels/select_footer.html'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> TOLERANCE 0<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> CLASS<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> SYMBOL 'plainline'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> SIZE 3<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> COLOR -1 -1 -1<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> OUTLINECOLOR 255 255 0<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> END<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri","sans-serif";
color:#632423'> END<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Jay
Kapalczynski<br>
<b>Sent:</b> Tuesday, April 14, 2009 9:30 AM<br>
<b>To:</b> 'Moen, Paul T.'<br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> RE: [mapserver-users] RE: Highlight<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks for the help and response….I think I am getting closer…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I set up another php page…this page is getting the PID values
sent to it via a session, I am using frames in this page<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It was the only way I could get the queries to work, the table to
build…etc<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>You can see the “session” code below…I echo it and all the
correct PIDs are displayed so I know that I have passed to correctly.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I added your code example…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Note: the PID string is a comma delimited string of PID values<o:p></o:p></span></b></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I am pointing the frame to the PHP page and I get this, but no
image. So part of my code is working….<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal>String:0711922340036,0711922340038,0711922340039<span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>But that’s it….there is no jpeg…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Again I am very green to this….this is my first attempt to
actually return an image… here…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I tried to add this : for my reference library for the
ms_newMapObj but I get errors…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>So I went back to the GeoMOOSE libraries…(As see below)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>No errors but no image<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:solid #CCCCCC 1.0pt;padding:6.0pt 6.0pt 6.0pt 6.0pt'>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:240.0pt;
margin-bottom:0in;margin-left:60.0pt;margin-bottom:.0001pt;line-height:120%;
background:#F8F8F8'><span style='font-size:10.0pt;line-height:120%;font-family:
Consolas;color:black;letter-spacing:.2pt'>dl('php_mapscript.so');<o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I am going to try and post this on their site but help is hard
to find…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Anyone else out here on the MapServer page mess around with
GeoMOOSE…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>THANK YOU MOEN for your help it is very appreciated..<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#943634'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#943634'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#943634'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#943634'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";
color:#943634'><o:p> </o:p></span></p>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Moen, Paul T.
[mailto:pmoen@nd.gov] <br>
<b>Sent:</b> Monday, April 13, 2009 3:22 PM<br>
<b>To:</b> Jay Kapalczynski<br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-users] RE: Highlight<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.0pt;
font-family:"Calibri","sans-serif"'><br>
On 4/13/09 2:25 PM, "Jay Kapalczynski" <<a
href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>>
wrote:</span><o:p></o:p></p>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>I
am messing around with this….does any of this map sense?</span></b><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>Yes,
you have many errors. Check the error logs for php to help debugging with
syntax.</span><o:p></o:p></p>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>//
THE QUERY HAPPENS BEFORE THIS….JUST SHOWING THAT THE VARAIBLE HOLDING ALL THE
PIS VALUES IS BELOW<br>
</span></b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><br>
//===============================================================<br>
//===============================================================<br>
// BUILD A COMMAN DELIMITED LIST<br>
<br>
// if something already in $PIDString, append a comma <br>
if (isset($PIDString)) <br>
$PIDString .= ','; <br>
<br>
// Append the new value <br>
<b>$PIDString</b> .= $PID; <br>
//===============================================================<br>
//===============================================================<br>
<br>
} // end while <br>
<br>
<br>
//===============================================================<br>
//===============================================================<br>
<br>
$map = ms_newMapObj(/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/select.map);</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>Won’t
work because it requires a string, so you would need $map =
ms_newMapObj(‘/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/select.map’);</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><br>
$qlayer = $map->$map->getLayerByName(parcels);</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>Won’t
work because it requires a string and the layer in your mapfile is Parcels, so
you would need $qlayer = $map->getLayerByName(‘Parcels’);</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><br>
$qlayer->queryByAttributes('PID','(<b>$PIDString</b>)',MS_MULTIPLE);</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>Won’t
work because it needs to know how to query for the PID as in
$qlayer->queryByAttributes('PID','PID IN (<b>$PIDString</b>)',MS_MULTIPLE);</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><br>
$img = $map->drawQuery();</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>Should
set the output format to jpeg</span><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>$map->selectOutputFormat('jpeg');<br>
<br>
header('Content-Type: image/jpeg');<br>
$img->saveImage("");<br>
<br>
<br>
<b>Can I then test the jpeg in another window or something…</b></span><o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.0pt;
font-family:"Calibri","sans-serif"'>You could set up your php file to accept
$_GET variables and pass in the PIDs like below. <br>
<a href="http://yourserver.com/phpfilename.php?PID=1%2C2%2C3%2C4%2C5">http://yourserver.com/phpfilename.php?PID=1%2C2%2C3%2C4%2C5</a>,
which should give you a png image after making changes above. </span><o:p></o:p></p>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>Is
this all that I need code wise?</span></b><o:p></o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>That
should give you the basics. You will also need to load the php_mapscript
library before any of the above functions will be recognized. Check out <a
href="http://mapserver.org/mapscript/php/by_example.html">http://mapserver.org/mapscript/php/by_example.html</a>.
There is an abundance of good documentation on <a
href="http://mapserver.org">http://mapserver.org</a>.</span><o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;
font-family:"Calibri","sans-serif"'>HERE is the select.map file<br>
</span></b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><br>
MAP<br>
NAME
'all layers'<br>
SIZE
800 650<br>
STATUS
ON<br>
EXTENT
427632.500000 4893613.330000 560300.922104 5015936.680000<br>
UNITS
METERS<br>
<br>
SYMBOLSET
'symbols/symbol.sym'<br>
<br>
TRANSPARENT
TRUE<br>
IMAGETYPE
PNG<br>
<br>
QUERYMAP<br>
STATUS
ON<br>
STYLE
SELECTED<br>
#STYLE
HILITE<br>
END<br>
<br>
WEB<br>
IMAGEPATH
"/ms4w/tmp/ms_tmp/"<br>
IMAGEURL "/ms_tmp/"<br>
#EMPTY '../geomoose/query_miss.html'<br>
END<br>
<br>
<br>
<br>
LAYER # Parcels Polygon Layer<br>
NAME
'Parcels'<br>
DATA
'parcels/parcels.shp'<br>
STATUS
ON<br>
TYPE
POLYGON<br>
<br>
#TEMPLATE
'parcels/identify_parcels.html'<br>
#FILTERITEM
'PID'<br>
#FILTER
/^%id%/<br>
<br>
METADATA<br>
qstring_validation_pattern
'.'<br>
END<br>
HEADER
'parcels/select_header.html'<br>
TEMPLATE
'parcels/select_parcel.html'<br>
FOOTER
'parcels/select_footer.html'<br>
TOLERANCE
0<br>
CLASS<br>
SYMBOL
'plainline'<br>
SIZE
3<br>
COLOR
-1 -1 -1<br>
OUTLINECOLOR
255 255 0<br>
END<br>
END<br>
<br>
<b>From:</b> <a href="mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
[<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Moen, Paul T.<br>
<b>Sent:</b> Thursday, April 09, 2009 3:15 PM<br>
<b>To:</b> <a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] RE: Highlight<br>
<br>
<br>
If the database that you are querying has the same attributes as the shape
file, you can query the Layer that points to the shape file and display the
highlighted results on your map. I know nothing about GeoMOOSE but I know
it can be done with php-mapscript. <br>
<br>
Regardless of what you are using, you need a map file layer for the shape file
with the parcels.<br>
You will then need to use php-mapscript to query that layer with something like<br>
$map = ms_newMapObj(PATH TO YOU MAPFILE);<br>
$qlayer = $map->$map->getLayerByName(NAME OF PARCEL LAYER);<br>
$qlayer->queryByAttributes(‘PID’,’PID IN (1, 2,7,9,23,87)’,MS_MULTIPLE);<br>
You will then need to create the output image from query using something like<br>
$img = $map->drawQuery();<br>
header('Content-Type: image/jpeg');<br>
$img->saveImage("");<br>
<br>
I can’t give you specifics without knowing how GeoMOOSE works, so the best
thing is to look at the documentation for GeoMOOSE if that is what you are
using.<br>
<br>
On 4/9/09 2:17 PM, "Jay Kapalczynski" <<a
href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>>
wrote:<br>
Dang I misspoke…I am sorry…<br>
<br>
I am querying a Database for records, these records have a PID (unique Number).<br>
These are the records that show up in the Table.<br>
<br>
As this happens I have to take the results and run the query against the
parcels to get the features in the Shapefile, then highlight..<br>
<br>
If that makes any sense…<br>
<br>
If I am in a PHP file and have the records returned from the query
(database)…what would I have to do next to take those records and run a query
to highlight the parcels (PID to PID)?<br>
<br>
Can all of this be accomplished in the PHP file?<br>
<br>
Thanks…and sorry for my ignorance…<br>
<br>
<br>
<br>
<br>
<b>From:</b> <a href="mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
[<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Moen, Paul T.<br>
<b>Sent:</b> Thursday, April 09, 2009 1:57 PM<br>
<b>To:</b> <a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] RE: Highlight<br>
<br>
Set the mapfile QUERYMAP style to highlight <a
href="http://mapserver.org/mapfile/querymap.html">http://mapserver.org/mapfile/querymap.html</a>.
Draw the map using drawQuery() instead of draw().<br>
<br>
$img = $map->drawQuery();<br>
header('Content-Type: image/jpeg');<br>
$img->saveImage("");<br>
<br>
On 4/9/09 1:31 PM, "Jay Kapalczynski" <<a
href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>>
wrote:<br>
Basically what I have is a query that runs on a shapefile…<br>
It returns the records into a table, which I then have the option to zoom to.<br>
<br>
I am looking for a bit more….after I run the query (php) I want the returned
records to highlight in the map…<br>
I can get the Unique identifier but don’t know if I can write some code in PHP
to highlight those features<br>
<br>
I don’t even know where to start here…<br>
<br>
The query and returning records into the table, as well as, the zoom to work
great…just need the highlight part<br>
<br>
Thanks<br>
<br>
<br>
<br>
<b>From:</b> Jay Kapalczynski <br>
<b>Sent:</b> Thursday, April 09, 2009 1:03 PM<br>
<b>To:</b> <a href="mapserver-users@lists.osgeo.org">'mapserver-users@lists.osgeo.org</a>
<<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>>
<<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>>
'<br>
<b>Subject:</b> Highlight<br>
<br>
Any way to highlight a feature in my map in PHP?<br>
<br>
I can grab a unique identifier but can figure out how to highlight it…<br>
<br>
THanks</span><o:p></o:p></p>
</div>
</body>
</html>