<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)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<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;}
 /* 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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
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:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>FORGOT MY CODE<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>THANKS<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</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"'> Jay Kapalczynski <br>
<b>Sent:</b> Monday, April 13, 2009 11:18 AM<br>
<b>To:</b> 'Moen, Paul T.'; 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>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>So say I have a Database that I am querying&#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I get the results back with a PID number (unique)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This number exists in the Parcels Shapefile so I can go after
that field.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I have a map file that is set up for the Parcels, but this is
just there to draw the Parcels&#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I assume that I would have to modify this one for this to work?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I am just a bit confused on how to get this to work&#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>When I run the code that creates the Table below I want the parcels
to also highlight in the map&#8230;.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Attached is my code that I am using to get the resulting PID
Values, build the table, and populate the last frame showing the Comma
Delimited String.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I just don&#8217;t know how to apply that to my map?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I attached my code from my PHP page which I hope that someone
can at least put their eyes on&#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Towards to bottom you will see highlighted in RED the code that
I am building a comma delimited string to populate a variable with all the PID
numbers&#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I assume that I would not need the comma delimited string as I
could place the highlighting code inside the while loop to get the parcels
highlighted&#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I don&#8217;t really know&#8230;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Any thoughts?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This inside the while loop????<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>$map
= ms_newMapObj(PATH TO YOU MAPFILE);<br>
$qlayer = $map-&gt;$map-&gt;getLayerByName(NAME OF PARCEL LAYER);<br>
$qlayer-&gt;queryByAttributes(&#8216;PID&#8217;,&#8217;PID IN (<b><span style='color:red'>MY
COMMA DELIMITED STRING VARIABLE</span></b>&#8217;)&#8217;,MS_MULTIPLE);<span
style='color:#1F497D'><o:p></o:p></span></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>$img
= $map-&gt;drawQuery();<br>
header('Content-Type: image/jpeg');<br>
$img-&gt;saveImage(&quot;&quot;);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><img width=768 height=435 id="Picture_x0020_1"
src="cid:image001.jpg@01C9BC29.BB89C8A0"><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</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>Moen, Paul
T.<br>
<b>Sent:</b> Thursday, April 09, 2009 3:15 PM<br>
<b>To:</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>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif"'><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. &nbsp;I know nothing about GeoMOOSE but I know
it can be done with php-mapscript. &nbsp;<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-&gt;$map-&gt;getLayerByName(NAME OF PARCEL LAYER);<br>
$qlayer-&gt;queryByAttributes(&#8216;PID&#8217;,&#8217;PID IN (1, 2,7,9,23,87)&#8217;,MS_MULTIPLE);<br>
You will then need to create the output image from query using something like<br>
$img = $map-&gt;drawQuery();<br>
header('Content-Type: image/jpeg');<br>
$img-&gt;saveImage(&quot;&quot;);<br>
<br>
I can&#8217;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, &quot;Jay Kapalczynski&quot; &lt;<a
href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>&gt;
wrote:</span><o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif"'>Dang I misspoke&#8230;I am sorry&#8230;<br>
&nbsp;<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>
&nbsp;<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>
&nbsp;<br>
If that makes any sense&#8230;<br>
&nbsp;<br>
If I am in a PHP file and have the records returned from the query
(database)&#8230;what would I have to do next to take those records and run a query
to highlight the parcels (PID to PID)?<br>
&nbsp;<br>
Can all of this be accomplished in the PHP file?<br>
&nbsp;<br>
Thanks&#8230;and sorry for my ignorance&#8230;<br>
<br>
<br>
&nbsp;<br>
<br>
</span><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Calibri","sans-serif"'> <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>
</span><br>
<span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Set the
mapfile QUERYMAP style to highlight <a
href="http://mapserver.org/mapfile/querymap.html">http://mapserver.org/mapfile/querymap.html</a>.
&nbsp;&nbsp;Draw the map using drawQuery() instead of draw().<br>
<br>
$img = $map-&gt;drawQuery();<br>
header('Content-Type: image/jpeg');<br>
$img-&gt;saveImage(&quot;&quot;);<br>
<br>
On 4/9/09 1:31 PM, &quot;Jay Kapalczynski&quot; &lt;<a
href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>&gt;
wrote:<br>
Basically what I have is a query that runs on a shapefile&#8230;<br>
It returns the records into a table, which I then have the option to zoom to.<br>
&nbsp;<br>
I am looking for a bit more&#8230;.after I run the query (php) I want the returned
records to highlight in the map&#8230;<br>
I can get the Unique identifier but don&#8217;t know if I can write some code in PHP
to highlight those features<br>
&nbsp;<br>
I don&#8217;t even know where to start here&#8230;<br>
<br>
The query and returning records into the table, as well as, the zoom to work
great&#8230;just need the highlight part<br>
&nbsp;<br>
Thanks<br>
&nbsp;<br>
&nbsp;<br>
<br>
</span><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Calibri","sans-serif"'> 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>
&lt;<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;
'<br>
<b>Subject:</b> Highlight<br>
</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><br>
Any way to highlight a feature in my map in PHP?<br>
&nbsp;<br>
I can grab a unique identifier but can figure out how to highlight it&#8230;<br>
&nbsp;<br>
THanks<br>
&nbsp;<br>
<br>
Paul</span> <o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><br>
Paul</span><o:p></o:p></p>

</div>

</body>

</html>