PHP/MapScript processQueryTemplate Help

Rene Teniere TENIERER at GOV.NS.CA
Tue Dec 14 07:55:58 EST 2004


Hi,

Just trying to get info functionality working in our site using
PHP/Mapscript. It seems to get stalled while processing the template. Am
I doing this wrong?

  LAYER
    NAME "Rivers"
    GROUP "Base Data"
    STATUS ON
    TEMPLATE "c:/Inetpub/wwwroot/template/rivers_template.html"
    TYPE LINE
    TILEINDEX "coindex"
    TILEITEM "lorivers"
    CLASSITEM "rivers_id"
    MAXSCALE 500000
    TOLERANCE 10
    TOLERANCEUNITS PIXELS
    CLASS
      EXPRESSION /./
      STYLE
        SYMBOL 0
        COLOR 0 0 230
        SIZE 1
        MINSIZE 1
        MAXSIZE 100
      END
    END
  END

Template:
<table border=1 cellpadding=0 cellspacing=0 width="100%"
bgcolor="#FFFFFF">
  <tr>
    <td>[LRIS_FCODE] &nbsp;</td>
    <td>[RIVERS_ID] &nbsp;</td>
    <td>[LENGTH]</td>
  </tr>
</table>

MapScript Code:
  $image = $map->draw();
  $queryImage = $map->drawQuery();
  $query_url = $queryImage->saveWebImage();
  $array[0] = '';

  if($qRectRes == 'MS_SUCCESS' || $qPtRes == 'MS_SUCCESS')
  {
    $image_url = $query_url;
    //$queryHTML = $map->processQueryTemplate($array,MS_FALSE);
    //echo($queryHTML);
    //error_log($queryHTML);
  }
  else
    $image_url = $image->saveWebImage();



Rene J.R. Teniere - BSc., D.GIS
GIS Programmer/Analyst
Nova Scotia Department of Natural Resources
Forestry Division (GIS) - Truro

Phone: (902) 893-5655
Mobile: (902) 209-8956
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041214/1c6bf17c/attachment.html


More information about the mapserver-users mailing list