Hi,
I have tried that before but I just get INFO_FORMAT application/vnd.ogc.gml is
invalid. Not sure if this is a problem related to my actual WMS service. Here
is my entire code for the getfeatureinfo control -
//Define hotspot for Parcels
info_parcels = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'http://localhost/WebServices/Request.aspx',
title: 'Identify features by clicking',
queryVisible: false,
//infoFormat: 'text/xml',
infoFormat: 'application/vnd.ogc.gml',
layers: [layer_Parcels_Hotspot],
maxFeatures: 1,
hover:false
});
-----Original Message-----
From: Eric Lemoine [mailto:[email protected]]
Sent: December 22, 2010 9:37 AM
To: Andrew Stewart
Cc: [email protected]
Subject: Re: [OpenLayers-Users] WMSGetFeatureInfo with grouped layers
On Wednesday, December 22, 2010, Andrew Stewart
<[email protected]> wrote:
> Yes I am definitely having an issue with the output from this. If I change my
> code to output 'text/xml' the e.text comes out as -
>
> <?xml version="1.0"?><FeatureCollection
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://www.intergraph.com/geomedia/gml"
> xmlns:gml="http://www.opengis.net/gml"
> xmlns:xlink="http://www.w3.org/1999/xlink"><gml:featureMember><Layer
> Name="Parcels"><Attribute Name="ADDRESS_NODE_ID">14608</Attribute><Attribute
> Name="ASSESSMENT_PARCEL_ID">1234</Attribute><Attribute Name="Orig_AddrKey">12
> ST 3213</Attribute><Attribute Name="TaxRoll">123456</Attribute><Attribute
> Name="Apt"></Attribute><Attribute Name="House">3213</Attribute><Attribute
> Name="Street">12 ST</Attribute><Attribute Name="Lot">11</Attribute><Attribute
> Name="Block">1</Attribute><Attribute Name="CondoPlan"></Attribute><Attribute
> Name="PlanNo">123456</Attribute><Attribute
> Name="MainLot">11</Attribute><Attribute
> Name="MainBlock">1</Attribute><Attribute
> Name="MainPlan">123456</Attribute><Attribute
> Name="PrimeOwner"></Attribute><Attribute Name="PrimeOwnerName">123
> Someone</Attribute><Attribute Name="OwnerAddr1">123 Somewhere DR
> SE</Attribute><Attribute Name="OwnerAddr2">SOMEWHERE, AB 111
> 111</Attribute><Attribute Name="OwnerAddr3"></Attribute><Attribute
> Name="OwnerAddr4"></Attribute><Attribute Name="OwnerPostCode">111
> 111</Attribute><Attribute Name="ATS_DESCR">12¼ 32 34 32-21-23, NW¼ 31 31
> 31-31-31</Attribute><Attribute
> Name="TotAssVal">12345678</Attribute><Attribute
> Name="CAMast_YearBuilt">2001</Attribute><Attribute
> Name="AssmtCode">123</Attribute><Attribute
> Name="LincNo">123456</Attribute><Attribute
> Name="ASSOCIATEDPARCEL_ID">12345</Attribute><Attribute Name="Parcel_Address">
> 3213 12 ST</Attribute></Layer></gml:featureMember></FeatureCollection>
>
>
> Except when I navigate to e.features there is only 1 item e.features[0] -
> which contains only 1 attribute and it seems to be pulling data from only the
> very last <attribute> tag because it is set to 3213 12 ST (value of the last
> attribute tag). Appreciate assistance obviously something is incorrect when
> navigating through to pull the attributes. When I have it set to output as
> 'text/html' it is properly formatted into a table with all the attributes.
> And not sure if this is right but when I change it to 'text/gml' it says
> INFO_FORMAT text/gml is invalid.
Have you tried "application/vnd.ogc.gml"?
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
[This message has been scanned for security content threats and viruses.]
[The City of Red Deer I.T. Services asks that you please consider the
environment before printing this e-mail.]
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users