Query template bug with MapServer 4.8.1

Ricardo Sena sig at CM-ALBUFEIRA.PT
Fri Feb 10 06:38:30 EST 2006


Hi,

I think there’s a small bug on the query template with Mapserver 4.8.1.
When using the [shpxy] substitution string with no formatting options, the
result is the list of the feature coordinates with a coma (,) after the x
coordinate. According to the documentation the coma is used only as default
after the xy pair coordinates, and this was the behaviour on previous
versions (4.6.1).

My query template file is:

<record id='[shpidx]'>
  <fields>
     <field name="id" value='[id]' />
     <field name="extent" value='[shpext]' />
     <field name="geometry" value='[shpxy precision=3]' />
  </fields>
</record>

The cgi request  is:
http://localhost/scripts/mapserv.exe?
map=mapa.map&mode=itemnquery&map_querymap_size=561 358&mapsize=561
358&qlayer=streets&qitem=id&qstring=4190&mapext=shapes&layers=base


The response from the template is:

<layer name='streets'>
  <recordset count='1'>
    <record id='4190'>
      <fields>
         <field name='id' value='11395677371140' />
         <field name='extent' value='-9512.457539 -285709.456778 -
9465.472836 -285607.320406' />
         <field name='geometry' value='-9465.473,-285607.320 -9506.031,-
285709.457 -9512.458,-285706.544' />
      </fields>
    </record>
  </recordset>
</layer>

I get the correct result if I change the geometry formatting options in the
query template file to write a space after the x coordinate:

<field name="geometry" value='[shpxy xf=" " precision=3]' />

Is this a bug or the default values changed?

I’m using a Windows XP machine with IIS 5.0.

Thanks,

Ricardo Sena



More information about the mapserver-users mailing list