Query template bug with MapServer 4.8.1
Steve Lime
steve.lime at DNR.STATE.MN.US
Fri Feb 10 12:09:10 PST 2006
I believe the defaults have changed to match the the specs for an image map, which
seems to be the most common use of the shpxy tag. I'll review the source and update
the documentation when I get a moment. I've created a bug (#1656) to make sure it
get's done...
Steve
>>> Ricardo Sena <sig at CM-ALBUFEIRA.PT> 02/10/06 5:38 AM >>>
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