[mapserver-users] JOIN Does Not Appear To Work in Ver. 3.5
Tom Cadman
Tom.Cadman at region.durham.on.ca
Wed Mar 20 09:40:41 PST 2002
I have had no problem using JOINS and complex query templates in version 3.4 but have had no luck in getting anything to display in version 3.5. I've checked the users list and tried the advice given - with no luck. All I've been able to display is either the JOIN variable name "[subdjoin]" in my template or the following message:
"msQueryByPoint(): Search returned no results. No matching record(s) found"
I'm using the demo 35 interface and the same data files I used in Version 3.4 ... so I know there is a match in the files and the JOIN works there fine. Is there something additional I have to do for version 3.5 - i.e. set a filter and filteritem? Below is a copy of the map file, header, footer and template file code I'm using.
Maybe someone send me a sample of the map file and template files they use with thier joins. Thanks.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
MAP FILE:
NAME DEMO
STATUS ON
SIZE 600 600
UNITS METERS
EXTENT 621658.000091 4845664.964209 707750.058591 4936873.000506
SHAPEPATH "data"
SYMBOLSET symbols/symbols.sym
FONTSET fonts/fonts.list
........
......
...
..
.
QUERYMAP
SIZE 200 200
STATUS ON
STYLE HILITE
COLOR 255 0 0
END
........
....
.
################ LAYERS #############
LAYER # subdivision plans
NAME "subdivisions"
TYPE POLYGON
DATA subdivision_condo_plans_region
STATUS default #OFF
CLASS
JOIN
TYPE single
TEMPLATE "subd_query_result.html"
NAME subdjoin
TABLE "subcondo.dbf" # filename of.dbf to be joined with shapefile .dbf
FROM SUBDIVISIO # field in shapefile .dbf file
TO TFILE # field to join on in lookup .dbf file
END
OUTLINECOLOR 0 81 255
COLOR 76 163 255
END # end class
HEADER "subd_header.html"
FOOTER "subd_footer.html"
END
::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
SUBD_HEADER FILE:
<html>
<head><title>MapSurfer Header Page</title>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<font size+1><b>Layer: subdivisions</b></font><p>
<TABLE cellpadding=5 cellspacing=2 border=0>
<TR bgcolor=#CCCCCC>
<th>File Number</th>
</TR>
<!--[subdjoin]--> <!-- Tried it here! ...doesn't work-->
::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::
TEMPLATE FILE:
[subdjoin] <!-- tried it here! ...won't work -->
<TR>
<!-- [subdjoin] --> <!-- tried it here! ...doesn't work -->
<td>[SUBDIVISIO]</td> <!-- field in shape file .dbf ... won't even display it-->
</TR>
<TR>
<td>[TFILE</td><td>[APPLICANT]</td> <!-- fields from joined .dbf -- >
</TR>
::::::::::::::::
::::::::::::::::::::::::::::::::::::::::
SUBD_FOOTER FILE:
</TABLE>
</body>
</html>
More information about the MapServer-users
mailing list