<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2>Abe:</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff size=2>Thanks 
again for the help.&nbsp; I ended up getting the highligting to work -- with 
your suggestions, though I thought I would be smart and change the QUERYMAP 
style to selected -&nbsp;not so smart, after reading the STYLE options for 
QUERYMAP it highlighted the found parcels&nbsp;just as it did not&nbsp;found 
parcels as defined in the layer definition...&nbsp;so for quite awhile I did not 
see that I had found the 2 shapes it has said it found (the selected sytle 
option defaults to layer queried definition - and thus it just rendered the 
green line as it did for the other parcels not found in the query, but as found 
in the layer itself).&nbsp; Anyway, changed that back to hilight as you said and 
it worked fine.</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff size=2>I 
searched the emails pretty hard to find a way to render the highlighted shapes a 
little better,&nbsp;Ken from DNR was the only post I could 
find.</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff size=2>Then I 
thought about it some more and&nbsp;derived a much&nbsp;simpiler solution ... 
set up a new layer, create a class with an expression, then send in the 
expression variable or set the expression in PHP however you choose to operate 
(i.e. cgi or scripting).&nbsp; i.e.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2>CLASSITEM ID</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2>CLASS</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff size=2>&nbsp; 
EXPRESSION /%list%/&nbsp;&nbsp;&nbsp;&nbsp; #NOTE var set in via CGI&nbsp;would 
be list --&gt; &nbsp;...&amp;list=1|2|3&amp;..</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2>or</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2>$new_expression = "/".$list."/";</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2>$class-&gt;setexpression($new_expression);</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005></SPAN><SPAN class=343304313-27012005><FONT 
face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff size=2>No 
querymap needed and much&nbsp;better control of layer formatting.&nbsp; 
Additionally, I can continue to pass the variable $list around (containing list 
of parcels) and then let the user browse my map with the list of parcels 
highlighted and peek and poke at other data.&nbsp; And of course add to the list 
or cull from the list.</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff size=2>Thanks 
again for the help of this tremendous list!</FONT></SPAN></DIV>
<DIV><SPAN class=343304313-27012005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=343304313-27012005>S</SPAN>teven Lehr<BR>Assistant 
Professor<BR>Freshmen Program<BR>College of Engineering<BR>Embry-Riddle 
Aeronautical University (LB159)<BR>600 S. Clyde Morris Blvd.<BR>Daytona Beach, 
FL 32114-3900<BR>386-226-7740</FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> UMN MapServer Users List 
  [mailto:MAPSERVER-USERS@LISTS.UMN.EDU]<B>On Behalf Of </B>Abe 
  Gillespie<BR><B>Sent:</B> Sunday, January 23, 2005 2:39 AM<BR><B>To:</B> 
  MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> Re: [UMN_MAPSERVER-USERS] PHP 
  Highlight list of Parcels Passed In<BR><BR></FONT></DIV>Um ... yeah, it's late 
  and I'm tired. Please replace "ampersand" with "at symbol" at the appropriate 
  place. :)<BR><BR>-Abe<BR><BR>On Jan 23, 2005, at 1:44 AM, Abe Gillespie 
  wrote:<BR><BR>
  <BLOCKQUOTE><?smaller>Ok, since this list has been so helpful and generous 
    to me in the past, here is an exhaustive example. I hope this will finally 
    get you going. Disclaimer: I'm doing this all from memory and w/o testing so 
    there may be a few errors.<BR><BR>Setup a map file like this:<BR><BR>MAP<BR><?/smaller><TT><?x-tad-bigger>NAME "Parcel 
    Query"<BR>STATUS on<BR>EXTENT xmin ymin xmax ymax<BR>SIZE 300 
    300<BR>SHAPEPATH "/data_path"<BR>IMAGETYPE png<BR>IMAGECOLOR 255 255 255<?/x-tad-bigger></TT></BLOCKQUOTE>
  <BLOCKQUOTE><?smaller><BR><BR><?/smaller><TT><?x-tad-bigger>QUERYMAP<BR>STYLE 
    hilite<BR>COLOR 255 0 0<BR>END<?/x-tad-bigger></TT></BLOCKQUOTE>
  <BLOCKQUOTE><?smaller><BR><BR>LAYER<BR>NAME "Parcels"<BR>DATA 
    "parcels"<BR>CLASS<BR>OUTLINECOLOR 0 255 0<BR>END<BR>TEMPLATE 
    "x"<BR>END<BR>END<BR><BR>Setup a web page like 
    this:<BR><BR>&lt;html&gt;<BR>&lt;head&gt;<BR>&lt;?<BR>$parcel_ids = 
    "1|2|3|4|5";<BR><BR>if (PHP_OS == "WINNT" || PHP_OS == 
    "WIN32")<BR>dl("php_mapscript.dll");<BR>else<BR>dl("php_mapscript.so");<BR><BR>$map 
    = ms_newMapObj("parcels.map");<BR>$layer = 
    $map-&gt;getLayerByName("parcels");<BR><BR>// 
    Query.<BR>$layer-&gt;queryByAttributes("", "/".$parcel_ids."/", 
    MS_MULTIPLE);<BR>// If you want to avoid errors when no matches are found 
    use the ampersand<BR>// in the above statement like this: 
    @$layer-&gt;queryByAttributes();<BR><BR>// Render an image and get its 
    URL.<BR>$img = $map-&gt;drawQuery();<BR>$url = $img-&gt;saveWebImage(MS_PNG, 
    1, 1, 
    0);<BR>$img-&gt;free();<BR>?&gt;<BR>&lt;/head&gt;<BR>&lt;body&gt;<BR>&lt;img 
    src="&lt;? echo $url; ?&gt;" /&gt;<BR>&lt;?<BR>if 
    ($layer-&gt;getNumResults() &gt; 0)<BR>echo $layer-&gt;getNumResults()." 
    parcels found.";<BR>else<BR>echo "No parcels 
    found.";<BR>?&gt;<BR>&lt;/body&gt;<BR>&lt;/html&gt;<BR><BR>Now that I look 
    at it, the last thing you may have been missing was the mapObj::queryMap() 
    method. Anyhow, I hope this helps.<BR><BR>-Abe<BR><?/smaller><BR>On Jan 22, 
    2005, at 10:07 PM, Steve Lehr wrote:<BR><BR>
    <BLOCKQUOTE>Abe:<BR><BR>I appreciate the help, still not getting it 
      though. I'm wondering if I need<BR>to draw out the map after rendering? 
      I've sceen other posts but no real<BR>solutions...<BR><BR>I'll start from 
      scratch rather then trying to reuse something I have. If<BR>anyone else 
      has a more complete example I'd really appreciate seeing 
      it.<BR><BR>Thanks<BR><BR>Steven Lehr<BR>Assistant Professor<BR>Freshmen 
      Program<BR>College of Engineering<BR>Embry-Riddle Aeronautical University 
      (LB159)<BR>600 S. Clyde Morris Blvd.<BR>Daytona Beach, FL 
      32114-3900<BR>386-226-7740<BR><BR>-----Original Message-----<BR>From: UMN 
      MapServer Users List [mailto:MAPSERVER-USERS@LISTS.UMN.EDU]On<BR>Behalf Of 
      Abe Gillespie<BR>Sent: Saturday, January 22, 2005 8:22 PM<BR>To: 
      MAPSERVER-USERS@LISTS.UMN.EDU<BR>Subject: Re: [UMN_MAPSERVER-USERS] PHP 
      Highlight list of Parcels Passed<BR>In<BR><BR><BR>Something else I 
      noticed. You shouldn't even have to setup a separate<BR>layer to show 
      queried parcels (though there are ways to do this). I<BR>suggest starting 
      out with one layer that renders queried and<BR>non-queried parcels at the 
      same time. Once you get the hang of that<BR>then you can do two different 
      layers (if you still even want to). Make<BR>the layer like 
      this:<BR><BR>LAYER<BR>NAME "parcels"<BR>DATA "parcels"<BR>STATUS 
      on<BR>TYPE polygon<BR>CLASS<BR>OUTLINECOLOR 0 255 0<BR>END<BR>TEMPLATE "x" 
      # Must be present to query on (though "x" means<BR>absolutely 
      nothing).<BR>END<BR><BR>The above layer will render all your parcels green 
      outline with hollow<BR>fill. Then when you use the PHP code to query it 
      will render your<BR>queried parcels red. This assumes you have QUERYMAP 
      setup correctly.<BR><BR>-Abe<BR><BR>On Jan 22, 2005, at 7:12 PM, Steve 
      Lehr wrote:<BR><BR>
      <BLOCKQUOTE>Abe I've never used the QUERY MAP before, I tried putting it 
        in the<BR>layer<BR>and it did not like that?<BR><BR>My initial layer 
        looks like:<BR><BR>I changed my code to pass Pipe delimited.<BR><BR>But 
        I'm not quite certian I'm still getting what I need to do to 
        my<BR>.map.<BR><BR>Thanks for the help..below is the layer repeated my 
        EXPRESSION is<BR>trashed I<BR>realize.<BR><BR>
        <BLOCKQUOTE>LAYER<BR>NAME "selected_parcels"<BR>DATA parcels<BR>STATUS 
          DEFAULT<BR>TYPE POLYGON<BR>CLASSITEM QPID<BR>CLASS<BR>EXPRESSION 
          "/%parcels%/"<BR>COLOR 255 0 
        0<BR>END<BR>END<BR></BLOCKQUOTE><BR><BR>Steven Lehr<BR>Assistant 
        Professor<BR>Freshmen Program<BR>College of Engineering<BR>Embry-Riddle 
        Aeronautical University (LB159)<BR>600 S. Clyde Morris Blvd.<BR>Daytona 
        Beach, FL 32114-3900<BR>386-226-7740<BR><BR>-----Original 
        Message-----<BR>From: UMN MapServer Users List 
        [mailto:MAPSERVER-USERS@LISTS.UMN.EDU]On<BR>Behalf Of Abe 
        Gillespie<BR>Sent: Saturday, January 22, 2005 7:05 PM<BR>To: 
        MAPSERVER-USERS@LISTS.UMN.EDU<BR>Subject: Re: [UMN_MAPSERVER-USERS] PHP 
        Highlight list of Parcels Passed<BR>In<BR><BR><BR>For the red you need 
        to setup the QUERYMAP. For the PHP it will be<BR>something like 
        this:<BR><BR>$target = 
        use_appropriate_string_func_to_conver_semi_to_pipe($parcels);<BR>// 
        $target should look like "1|2|3|4" ... where the numbers are 
        the<BR>IDs.<BR>$layer = 
        $map-&gt;getLayerByName("parcels");<BR>$layer-&gt;queryByAttributes("parcel_id_field", 
        "/".$target."/",<BR>MS_MULTIPLE);<BR><BR>Also, don't forget to add the 
        TEMPLATE "x" tag in your LAYER<BR>definition.<BR><BR>I'm not a RegEx 
        expert, so someone please put me in check if I'm<BR>leading Steven 
        astray.<BR><BR>-Abe<BR><BR>On Jan 22, 2005, at 6:37 PM, Steve Lehr 
        wrote:<BR><BR>
        <BLOCKQUOTE>I'm trying to write some PHP that I can send extents and 
          list of<BR>parcels to<BR>get it to highlight the parcels.<BR><BR>I'd 
          like to highlight all the found parcels in RED.<BR><BR>My php gets a 
          variable by post called parcels and contains at this<BR>time a<BR>semi 
          colon delimited list of ids in the attribute column QPID of 
          the<BR>parcels.dbf.<BR><BR>LAYER<BR>NAME "selected_parcels"<BR>DATA 
          parcels<BR>STATUS DEFAULT<BR>TYPE POLYGON<BR>CLASSITEM 
          QPID<BR>CLASS<BR>EXPRESSION "/%parcels%/"<BR>COLOR 255 0 
          0<BR>END<BR>END<BR><BR><BR>I've got my extents. I've got the list of 
          parcels. Now I want to<BR>highlight<BR>the list of parcels with 
          something like the below. But I have to do<BR>something in php to take 
          that ; delimited list and the turn on all the<BR>matching attributes. 
          (I belive its a QUERYMAP with MULTIPLE_SELECT)<BR>but I'm<BR>having 
          trouble getting my brain around what I need to code - 
          might<BR>someone<BR>have a sample.<BR><BR>Thanks<BR><BR>Steven 
          Lehr<BR>Assistant Professor<BR>Freshmen Program<BR>College of 
          Engineering<BR>Embry-Riddle Aeronautical University (LB159)<BR>600 S. 
          Clyde Morris Blvd.<BR>Daytona Beach, FL 
          32114-3900<BR>386-226-7740<BR><BR></BLOCKQUOTE><BR></BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>