I found the problem - I was using a bigint value for the unique key in the
layer definition and it was not a primary key or have any unique constraint on
it. I brought in a "gid" (int4) from the joined table with geometry that was
in the temp view and used that as the unique value in the map layer definition
and it works perfectly. I found this out by attempting to access the PostGIS
view through Quantum GIS. I am still kind of confused why this is, but it
works.
David - Thanks for the help!
Dara
----- Original Message -----
From: Dara Olson
To: Fawcett, David (MPCA) ; [email protected]
Sent: Tuesday, August 16, 2011 1:19 PM
Subject: Re: [mapserver-users] Web application error. Malformed template name
An absolute path did not help. I increased MapServer Debug to 5 and I still
don't get any more information. Is there a way to track down where exactly the
problem is happening? I thought by creating the view to remove the multiple
records by waterbody this would remove this error (so it wouldn't get more than
one result from the URL request), but no such luck. Any other suggestions would
be greatly appreciated.
Dara
----- Original Message -----
From: Fawcett, David (MPCA)
To: Dara Olson ; [email protected]
Sent: Tuesday, August 16, 2011 11:55 AM
Subject: RE: [mapserver-users] Web application error. Malformed template
name
Dara,
I am pretty sure that relative paths work for templates, but for testing
purposes, try using the absolute path to the template.
David.
From: Dara Olson [mailto:[email protected]]
Sent: Tuesday, August 16, 2011 10:03 AM
To: Fawcett, David (MPCA); [email protected]
Subject: Re: [mapserver-users] Web application error. Malformed template
name
It is below. I am running a web mapping site with GeoMoose(2.0) and
MapServer(5.2.1), but I can't seem to find a way to figure out what I am doing
wrong or why I am ending up with the error. Any help would be greatly
appreciated.
Miigwech!
Dara
MAP
SIZE 1920 1920
MAXSIZE 10000
EXTENT -20614760.777156 1751325.1919492 -1927436.1053437 7915207.1517617
UNITS meters
SYMBOLSET "..\symbols\glifwc_symbol.sym"
FONTSET "..\fonts\fonts.list"
CONFIG "MS_ERRORFILE" "d:/Logs/Mapserver/MapServerDEVELSITE.log"
OUTPUTFORMAT
NAME 'agg/png'
DRIVER AGG/PNG
IMAGEMODE RGBA
FORMATOPTION "TRANSPARENT=TRUE"
END
IMAGETYPE AGG/PNG
TRANSPARENT ON
IMAGECOLOR -1 -1 -1
DEBUG 3
############################### ---- LEGEND ----
###############################
LEGEND
STATUS on
TRANSPARENT on
END
############################### ---- Map projection ----
###############################
PROJECTION
"init=epsg:900913"
END
############################### ---- LAYERS ----
###############################
LAYER # MN Ogaa Harvest LBS
NAME "mn_ogaa_harvest_lbs"
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION "host=zzzzzzz user=zzzzzz password=zzzzzz dbname=zzzzzz"
PROCESSING "CLOSE_CONNECTION=DEFER"
DATA "the_geom900913 from inland.mn_ogaa_harvest_lbs_spatial using
unique new_id using srid=900913"
PROJECTION
"init=epsg:900913"
END
METADATA
"wms_title" "MN Ogaa Harvest Lakes"
END
CLASS
NAME "MN Ogaa Harvest Lakes"
STYLE
SYMBOL 0
SIZE 6
OUTLINECOLOR -1 -1 -1
COLOR 182 177 145
END
TEMPLATE
"../identify/ogaa_harvest/mn_ogaa_harvest_lbs_identify.html"
END
END # MN Ogaa Harvest LBS
END #map file
My HTML identify template used to display results is,
<!-- MapServer Template-->
<tbody>
<tr>
<th colspan="2">MN Ogaa Harvest in Pounds</th>
</tr>
<tr>
<td align="left">Lake:</td>
<td>[lake]</td>
</tr>
<tr>
<td align="left">2011 Harvest:</td>
<td>[_2011_harvest]</td>
</tr>
...
</tbody>
<tr><td colspan="2"><hr></td></tr>
----- Original Message -----
From: Fawcett, David (MPCA)
To: Dara Olson ; [email protected]
Sent: Tuesday, August 16, 2011 9:42 AM
Subject: RE: [mapserver-users] Web application error. Malformed template
name
Dara,
Can you share the part of your mapfile that describes this layer?
David.
From: [email protected]
[mailto:[email protected]] On Behalf Of Dara Olson
Sent: Tuesday, August 16, 2011 9:01 AM
To: [email protected]
Subject: [mapserver-users] Web application error. Malformed template name
Good morning. I am having some problems identifying a layer through
MapServer and I seem to be stuck.
I have a flat table of harvest by waterbody by year by individual in
PostgreSQL/PostGIS. I created a "temporary view" of the sum harvested by
waterbody by year and joined in geometry which I then made into a crosstab so
that each lake would be listed and columns across with harvest by year. It
draws successfully in my web mapping application (and view looks fine in
postgres), but when I try to use the Identify feature on the website (Mapserver
GET URL request) I get the following error in MapServer,
[Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error.
Malformed template name ().
[Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no
results. No matching record(s) found.
Before doing the crosstab I was getting this error, but I assumed that it
didn't like the multiple records linked to the same geometry and that's why I
did the crosstab. But still nothing works.
Does anyone have any idea of where to begin to debug? Any help would be
greatly appreciated.
Thanks!
Dara Olson, GLIFWC
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users