<HTML>
<HEAD>
<TITLE>Re: [mapserver-users] RE: Highlight</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
<BR>
On 4/14/09 9:30 AM, &quot;Jay Kapalczynski&quot; &lt;<a href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Thanks for the help and response&#8230;.I think I am getting closer&#8230;<BR>
&nbsp;<BR>
I set up another php page&#8230;this page is getting the PID values sent to it via a session, I am using frames in this page<BR>
It was the only way I could get the queries to work, the table to build&#8230;etc<BR>
You can see the &#8220;session&#8221; code below&#8230;I echo it and all the correct PIDs are displayed so I know that I have passed to correctly.<BR>
I added your code example&#8230;<BR>
&nbsp;<BR>
<B>Note: the PID string is a comma delimited string of PID values<BR>
</B> <BR>
I am pointing the frame to the PHP page and I get this, but no image. &nbsp;So part of my code is working&#8230;.<BR>
&nbsp;<BR>
</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>String:0711922340036,0711922340038,0711922340039<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> Are your PIDs strings? &nbsp;If so, you will need your PIDs to have quotes around them when you query. &nbsp;</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>$qlayer-&gt;queryByAttributes(&#8220;PID&#8221;,&#8221;PID IN (&#8216;0711922340036&#8217;,&#8217;0711922340038&#8217;,&#8217;0711922340039&#8217;)&#8221;,MS_MULTIPLE); Note the double quotes.<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>But that&#8217;s it&#8230;.there is no jpeg&#8230;<BR>
Again I am very green to this&#8230;.this is my first attempt to actually return an image&#8230; here&#8230;<BR>
&nbsp;<BR>
I tried to add this : for my reference library for the ms_newMapObj but I get errors&#8230;<BR>
So I went back to the GeoMOOSE libraries&#8230;(As see below)<BR>
No errors but no image<BR>
&nbsp;<BR>
<BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>dl('php_mapscript.so');<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
I am going to try and post this on their site but help is hard to find&#8230;<BR>
Anyone else out here on the MapServer page mess around with GeoMOOSE&#8230;<BR>
&nbsp;<BR>
THANK YOU MOEN for your help it is very appreciated..<BR>
&nbsp;<BR>
<BR>
</SPAN><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>&lt;?php<BR>
session_start();<BR>
$varPIDValue = $_SESSION[&quot;PIDString&quot;];<BR>
&nbsp;<BR>
// Echo the session values &nbsp;<B>THIS GIVES ME A COMMA DELIMITED STRING OF PID VALUES<BR>
// MAYBE I HAVE TO EXPLODE THEM FIRST?<BR>
</B>echo &quot;String:&quot;.$varPIDValue;<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>You probably will want to comment this out, otherwise it will be output as text before the html and you won&#8217;t have proper html. &nbsp;If you find the error logs you can use<BR>
error_log(&quot;String:&quot;.$varPIDValue); to output it to the error logs instead of the standard output.<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'> <BR>
error_reporting(E_ERROR | E_PARSE);<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'> Find out where these errors are being logged. &nbsp;On unix they are usually /var/logs/apache2/error_log or /var/logs/httpd/error_log.<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'># Include the GeoMOOSE PHP Library Utilities<BR>
include('Configuration.php');<BR>
include('geomoose_php_util.php');<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
$map = ms_newMapObj('/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/select.map');<BR>
$map-&gt;selectOutputFormat('jpeg');<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>This should be before the draw.<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>$qlayer = $map-&gt;$map-&gt;getLayerByName('parcels');<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>You have $map twice here. Should be $qlayer =$map-&gt;getLayerByName('parcels');<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>$test = $qlayer-&gt;queryByAttributes('PID','PID IN ($PIDString)',MS_MULTIPLE);<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>Assign above to variable so you can compare it with MS_SUCCESS &nbsp;if($test == MS_SUCCESS) and check your error log for errors.<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><FONT SIZE="2"><SPAN STYLE='font-size:10pt'>$img = $map-&gt;drawQuery();<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><BR>
//</SPAN></FONT><FONT SIZE="2"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>header('Content-Type: image/jpeg');<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'>//</SPAN></FONT><FONT SIZE="2"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>$img-&gt;saveImage(&quot;&quot;);<BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>You don&#8217;t need the 2 prior lines if you are saving the image to a file and loading it via an image tag like you are below.<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>$image_url=$img-&gt;saveWebImage();<BR>
?&gt; <BR>
&nbsp;<BR>
&lt;HTML&gt;<BR>
&nbsp;&nbsp;&lt;HEAD&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;TITLE&gt;Displaying a map&lt;/TITLE&gt;<BR>
&nbsp;&nbsp;&lt;/HEAD&gt;<BR>
&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&lt;BODY&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;IMG SRC=&lt;?php echo $img; ?&gt; &gt;<BR>
&nbsp;&nbsp;&lt;/BODY&gt;<BR>
&lt;/HTML&gt;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
<B>From:</B> Moen, Paul T. [<a href="mailto:pmoen@nd.gov">mailto:pmoen@nd.gov</a>] <BR>
<B>Sent:</B> Monday, April 13, 2009 3:22 PM<BR>
<B>To:</B> Jay Kapalczynski<BR>
<B>Cc:</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 SIZE="2"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'><BR>
On 4/13/09 2:25 PM, &quot;Jay Kapalczynski&quot; &lt;<a href="jkapalczynski@ci.maple-grove.mn.us">jkapalczynski@ci.maple-grove.mn.us</a>&gt; wrote:<BR>
<B>I am messing around with this&#8230;.does any of this map sense?<BR>
</B>Yes, you have many errors. &nbsp;Check the error logs for php to help debugging with syntax.<BR>
<B>// THE QUERY HAPPENS BEFORE THIS&#8230;.JUST SHOWING THAT THE VARAIBLE HOLDING ALL THE PIS VALUES IS BELOW<BR>
</B><BR>
//===============================================================<BR>
//===============================================================<BR>
// BUILD A COMMAN DELIMITED LIST<BR>
&nbsp;<BR>
// if something already in $PIDString, append a comma <BR>
if (isset($PIDString)) <BR>
&nbsp;&nbsp;&nbsp;&nbsp;$PIDString .= ','; <BR>
&nbsp;<BR>
// Append the new value <BR>
<B>$PIDString</B> .= $PID; &nbsp;<BR>
//===============================================================<BR>
//===============================================================<BR>
&nbsp;<BR>
} // end while <BR>
&nbsp;<BR>
&nbsp;<BR>
//===============================================================<BR>
//===============================================================<BR>
&nbsp;<BR>
$map = ms_newMapObj(/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/select.map);<BR>
Won&#8217;t work because it requires a string, so you would need $map = ms_newMapObj(&#8216;/ms4w/apps/GeoMOOSE/Maple_Grove_GeoMoose/select.map&#8217;);<BR>
<BR>
$qlayer = $map-&gt;$map-&gt;getLayerByName(parcels);<BR>
Won&#8217;t work because it requires a string and the layer in your mapfile is Parcels, so you would need $qlayer = $map-&gt;getLayerByName(&#8216;Parcels&#8217;);<BR>
<BR>
$qlayer-&gt;queryByAttributes('PID','(<B>$PIDString</B>)',MS_MULTIPLE);<BR>
Won&#8217;t work because it needs to know how to query for the PID as in $qlayer-&gt;queryByAttributes('PID','PID IN (<B>$PIDString</B>)',MS_MULTIPLE);<BR>
<BR>
$img = $map-&gt;drawQuery();<BR>
Should set the output format to jpeg<BR>
$map-&gt;selectOutputFormat('jpeg');<BR>
<BR>
header('Content-Type: image/jpeg');<BR>
$img-&gt;saveImage(&quot;&quot;);<BR>
&nbsp;<BR>
&nbsp;<BR>
<B>Can I then test the jpeg in another window or something&#8230;<BR>
</B>You could set up your php file to accept $_GET variables and pass in the PIDs like below. &nbsp;<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. <BR>
<B>Is this all that I need code wise?<BR>
</B>That should give you the basics. &nbsp;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>. &nbsp;There is an abundance of good documentation on <a href="http://mapserver.org">http://mapserver.org</a>.<BR>
<B>HERE is the select.map file<BR>
</B><BR>
MAP<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME 'all layers'<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIZE 800 650<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;STATUS ON<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXTENT &nbsp;427632.500000 4893613.330000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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COLOR -1 -1 -1<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OUTLINECOLOR 255 255 0<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END<BR>
&nbsp;&nbsp;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>
&nbsp;<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. &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:<BR>
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>
<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>. &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>
<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> &lt;<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt; &lt;<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt; &lt;<a href="mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt; '<BR>
<B>Subject:</B> Highlight<BR>
<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</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>