[mapserver-users] One-to-many join
Wim Blanken
w.blanken at geon.nl
Thu Jun 12 03:09:22 PDT 2008
Hi Berend,
Which version of mapserver are you using. I had the same problems with
version 5.x. In version 4.x the one-to-many join was functioning ok,
I also posted this to the list but got no response so far...
Best regards,
Wim Blanken
The Netherlands.
_____
Van: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] Namens Berend Veldkamp
Verzonden: Thursday, June 12, 2008 11:55 AM
Aan: mapserver-users at lists.osgeo.org
Onderwerp: [mapserver-users] One-to-many join
Hi,
I'm trying to get a one-to-many join in a Postgis db working. One-to-one is
working fine, but when I use one-to-many and add a template to the join
object, no joined records are returned. In fact, the join template seems to
be ignored altogether.
Does anyone have a working example? The documentation is limited to
"One-to-many joins: The more complex variant. If the join type is multiple
(one-to-many) the template is replaced by the set of header, template file
and footer specified in the mapfile.", and I'm not exactly sure what this
means. Do I need to specify where the "many" template(s) are inserted into
the "main" template?
Here's the layer definition from my mapfile, and the templates:
LAYER
NAME Provincies
TYPE polygon
CONNECTIONTYPE postgis
CONNECTION "host=localhost dbname=gisdb user=user password=pass"
DATA "the_geom from nl97"
STATUS on
CLASS
COLOR 0 128 128
OUTLINECOLOR 0 64 64
END
METADATA
"wms_title" "Provincies"
"wms_srs" "EPSG:28992"
END
JOIN
NAME "test"
CONNECTION "host=localhost dbname=gisdb user=user password=pass"
CONNECTIONTYPE ogr
TABLE "lookup"
FROM "provnr"
TO "provnr"
TYPE one-to-many
TEMPLATE join.html
END
HEADER header.html
FOOTER footer.html
TEMPLATE provincies.html
END
provincies.html:
<tr>
<td>Naam: [provincie]</td>
<td>Inwoners: [inwoners]</td>
<td>Inkomen: [inkomen]</td>
<td>Provcode: [provnr]</td>
</tr>
join.html:
<!-- Join starts here -->
<tr><td>Joined field: [joined]</td></tr>
<!-- Join ends here -->
No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 270.3.0/1498 - Release Date: 11-6-2008
19:13
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080612/bc0b4f99/attachment.htm>
More information about the MapServer-users
mailing list