<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;}
/* 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;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{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><o:p> </o:p></p>
<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> </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><o:p> </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…<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…<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> </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…<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….<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'>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’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> </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…<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…<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…<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I don’t really know…<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'>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> </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> </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 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> </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->$map->getLayerByName(NAME OF PARCEL LAYER);<br>
$qlayer->queryByAttributes(‘PID’,’PID IN (<b><span style='color:red'>MY
COMMA DELIMITED STRING VARIABLE</span></b>’)’,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->drawQuery();<br>
header('Content-Type: image/jpeg');<br>
$img->saveImage("");<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><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><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>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> </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. 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:</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…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>
</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>.
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>
</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>
<<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>>
'<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>
<br>
I can grab a unique identifier but can figure out how to highlight it…<br>
<br>
THanks<br>
<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>