<HTML>
<HEAD>
<TITLE>Re: [mapserver-users] RE: Highlight</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
Yes, that looks feasible.<BR>
<BR>
On 4/9/09 3:49 PM, "Jay Kapalczynski" <<a href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>That’s what I was figuring….right now I have some code that is in a while loop building the table from the query…<BR>
I think maybe here I can build a list of PID values that can be sent to a PHP page<BR>
Once at the PHP page I can then write code that will highlight the features in the map based off of the Parcels Shapefile…<BR>
<BR>
Does that make sense?<BR>
Is that feasible???<BR>
<BR>
Something like this?<BR>
<BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
THANKS<BR>
<BR>
<BR>
</SPAN><FONT SIZE="1"><SPAN STYLE='font-size:9pt'><?php <BR>
<BR>
$conn=odbc_connect('PDS_Access_db','','');<BR>
<BR>
<BR>
switch ($varPropertyFactor)<BR>
{<BR>
case 'lessthan':<BR>
$sql_str="SELECT * FROM dbo_DISPLAY_RESIDENTIAL_CHARS WHERE Dwelling_Type = '$varPropertyType' AND FF_GBA < $varPriceArea ORDER BY PID";<BR>
//echo $sql_str;<BR>
break;<BR>
} <BR>
<BR>
<BR>
$rs=odbc_exec($conn,$sql_str); <BR>
if (!$conn)<BR>
{exit("Connection Failed: " . $conn);}<BR>
if (!$rs)<BR>
{exit("Error in SQL");}<BR>
<B> <BR>
<BR>
<BR>
</B>while (odbc_fetch_row($rs))<BR>
{<BR>
$PID=odbc_result($rs,1);<BR>
$AssessmentYr=odbc_result($rs,2);<BR>
$YrBuilt=odbc_result($rs,109);<BR>
$Bedrooms=odbc_result($rs,116);<BR>
$DwellingType=odbc_result($rs,8);<BR>
$Style=odbc_result($rs,7);<BR>
$Construction=odbc_result($rs,10);<BR>
$Exterior=odbc_result($rs,11);<BR>
$RoofType=odbc_result($rs,14);<BR>
$Air=odbc_result($rs,19);<BR>
$GarageCars=odbc_result($rs,29);<BR>
$SqFootage=odbc_result($rs,142);<BR>
$Electric=odbc_result($rs,48);<BR>
$Heating=odbc_result($rs,49);<BR>
$Path=odbc_result($rs,147);<BR>
$Image=odbc_result($rs,149);<BR>
$Print=odbc_result($rs,150);<BR>
<BR>
<BR>
echo "<BR>
<tbody class='scrollContent bodyFormat' style='height:160px;'><BR>
<tr class='alternateRow'><BR>
<td align=Center>$PID</td><BR>
<td align=Center>$AssessmentYr</td><BR>
<td align=Center>$YrBuilt</td><BR>
<td align=Center>$Bedrooms</td><BR>
<td align=Center>  $DwellingType  </td><BR>
<td align=Center>  $Style  </td><BR>
<td align=Center><strong><a href='$Path' target='main'>Map</a></strong></td><BR>
<td align=Center><strong><a href='$Print' target='_blank'>Print</a></strong></td><BR>
<td align=Center><a href='javascript:Map.itemQueryLayer('Highlight', 'Parcels', 'PID', '$PID', '/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/select.map'); Map.zoomToViewString(([shpminx]-100)+','+([shpminy]-100)+','+([shpmaxx]+100)+','+([shpmaxy]+100))'><img src='../shared/images/view.png' border='0' title='Click to Zoom Map to PID'></a></td><BR>
</tr><BR>
</tbody><BR>
";<BR>
<BR>
<BR>
</SPAN></FONT><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><B>BUILD THE COMMA DELIMITED LIST RIGHT HERE<BR>
</B></SPAN></FONT><FONT SIZE="1"><SPAN STYLE='font-size:9pt'> <BR>
<BR>
} // end while <BR>
<BR>
<BR>
</SPAN></FONT><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><B>AFTER ALL HAVE BEEN SELECTED and THE LIST BUILT<BR>
SEND THE LIST TO ANOTHER PHP PAGE TO HANDLE THE HIGHLIGHTING OF THE FEATURES</B></SPAN></FONT><FONT SIZE="1"><SPAN STYLE='font-size:9pt'> <BR>
<BR>
?><BR>
<BR>
<BR>
<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'> <BR>
<BR>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><B>From:</B> Fawcett, David [<a href="mailto:David.Fawcett@state.mn.us">mailto:David.Fawcett@state.mn.us</a>] <BR>
<B>Sent:</B> Thursday, April 09, 2009 3:34 PM<BR>
<B>To:</B> Jay Kapalczynski; Moen, Paul T.; <a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><BR>
<B>Subject:</B> RE: [mapserver-users] RE: Highlight<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>Or a string variable containing a comma-delimited list of the ID numbers that you really want?<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>David.<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>-----Original Message-----<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>Jay Kapalczynski<BR>
<B>Sent:</B> Thursday, April 09, 2009 3:31 PM<BR>
<B>To:</B> 'Moen, Paul T.'; <a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><BR>
<B>Subject:</B> RE: [mapserver-users] RE: Highlight<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'>Thanks for your response…<BR>
<BR>
$qlayer->queryByAttributes(‘PID’,’PID IN (1, 2,7,9,23,87)’,MS_MULTIPLE);<BR>
<BR>
Is the 1, 2,7,9,23,87 examples of PID values, if so I assume that these can be replaced with variables?<BR>
<BR>
Thanks again<BR>
<BR>
<BR>
<BR>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><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>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><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>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><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>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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><FONT SIZE="2"><SPAN STYLE='font-size:10pt'><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>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><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></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
Paul</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><BR>
</SPAN></FONT></BLOCKQUOTE></BLOCKQUOTE>
</BODY>
</HTML>