Thanks all - I have a solution now (after freaking out breifly) and it’s fine. I even managed to fix a couple of outstanding bugs in the app, seeing as I was poking around in that area.
From: josh.marcus@anonymised.com [mailto:josh.marcus@anonymised.com] On Behalf Of Josh Marcus
Sent: Tuesday, 25 November 2008 2:44 PM
To: Murray, Paul
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] GetFeatureInfo - INFO_FORMAT: ‘text/html’ [SEC=UNCLASSIFIED]
Hey Paul,
If someone else set up your first layer, it might be that someone used GetFeatureInfo templates to generate JSON from a layer.
Here’s a general reference:
http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates
If you look in your installation, it’s possible that there’s a header.ftl like this:
{
“features”:
[
and a footer.ftl like this:
]
}
and a content.ftl that defines each of the individual feature javascript objects. I’d poke around and see if something like that has been created. I’ve used this concept to generate JSON responses to a GetFeatureInfo request in MapServer, but never using GeoServer – but I’d assume it would work just fine.
–j
On Sun, Nov 23, 2008 at 11:44 PM, Murray, Paul <Paul.Murray@anonymised.com> wrote:
Well, it was working fine a few days ago.
I have a geoserver with two layers in it. GetFeatureInfo was working
fine a couple of days back, but now it fails on one of the layers. The
layer that is working ok, when I ask for feature info (in response to a
mouse click), returns a chunk of JavaScript that looks like this:
{
“features”:
[
{
“fid”:“imcra4_pb_wgs_1984.22”,
“fname”:“imcra4_pb_wgs_1984”,
“fdesc”:“IMCRA”,
“data”:
{
“name”:“Central Western Province”,
“code”:“6”,
“code_field”:“PB_NUM”
}
},
{
“fid”:“imcra4_pb_wgs_1984.27”,
“fname”:“imcra4_pb_wgs_1984”,
“fdesc”:“IMCRA”,
“data”: {
“name”:“Southwest Shelf Transition”,
“code”:“30”,
“code_field”:“PB_NUM”
}
}
]
}
We do a javascript “eval” and determine that the user has selected IMCRA
regions 6 and 30. No worries.
But when I send a nearly identical request, executed by the same code,
for the IBRA layer, this stuff that used to work before is now returning
an HTML page with a table. Is there any reason why the two responses
should be so different?
If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.
Please consider the environment before printing this email.
This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Geoserver-users mailing list
Geoserver-users@anonymised.comts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.
Please consider the environment before printing this email.