<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<?smaller><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><FONT face=Arial color=#0000ff size=2><SPAN class=015480223-26012005>I 
found&nbsp;the parcels I'm sending in&nbsp;but they are not highlighting as 
defined in the QUERYMAP;&nbsp; it seems I don't have an association linking the 
QUERYMAP defined in the map file with parcel layer that I'm querying, ie to mark 
them as to be highlighted.&nbsp; I can't find the appropriate method to link the 
layer with the querymap (if I need to do)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=015480223-26012005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=015480223-26012005>How do 
I associate the QUERYMAP definition in the map file with the parcel layer in the 
PHP code (or in the map file?)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=015480223-26012005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=015480223-26012005>Abe 
had a last second thought ..</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=015480223-26012005><FONT 
face="Times New Roman" color=#000000 size=3>Now that I look at it, the last 
thing you may have been missing was the mapObj::queryMap() method. Anyhow, I 
hope this helps.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=015480223-26012005><FONT 
face=Arial color=#0000ff size=2></FONT></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=015480223-26012005><FONT 
face="Times New Roman" color=#000000 size=3>But I'm not sure what to do with 
this </FONT></DIV>
<DIV><BR></DIV></SPAN></FONT>
<DIV>&nbsp;</DIV>
<P><FONT size=2>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</FONT> </P>
<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 1:45 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>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><?/x-tad-bigger><?x-tad-bigger>EXTENT xmin ymin xmax 
  ymax<BR>SIZE 300 300<BR>SHAPEPATH "/data_path"<BR><?/x-tad-bigger><?x-tad-bigger>IMAGETYPE png<BR>IMAGECOLOR 255 
  255 
  255<?/x-tad-bigger></TT><?smaller><BR><BR><?/smaller><TT><?x-tad-bigger>QUERYMAP<BR>STYLE 
  hilite<BR>COLOR 255 0 
  0<BR>END<?/x-tad-bigger></TT><?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></BODY></HTML>