[OpenLayers-Users] Popup Attributes
Shawn Oatley
shawn at niagarafalls.ca
Tue Jun 23 16:20:12 EDT 2009
I've had similar issues where my functions don't return what I am expecting. Usually the DOM tool in Firebug helps out because I can see all the properties.
Shawn
>>> On 6/23/2009 at 4:16 PM, Nicholas Efremov-Kendall <n.e.kendall at gmail.com> wrote:
Hi all,
Another newbie question here. I've successfully created popups, but now I'm having trouble reading the GML attributes and formating the text. I can't seem to figure out the dom structure of the GML. feature.id returns OpenLayers.FeatureVector_210, which I'm pretty sure is OL's feature ID.
When I use this formatting the text only feature.attribures returns this "[object Object]", the others return "undefined."
"<div style='font-size:.8em'>Site_ID: " +
feature.attributes.title +"<hr />
Locality: " + feature.attributes.title+"<br/>
Description: " +feature.attributes+"<br/>
This should do something else</div>",
here's the structure of my GML
<gml:featureMember>
<ogr:site2000 fid="F0">
<ogr:geometryProperty><gml:Point srsName="EPSG:32632"><gml:coordinates>683247.00000048568,3736338.9999997145</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:NEWSITE_>14811205</ogr:NEWSITE_>
<ogr:UTM_E>683247</ogr:UTM_E>
<ogr:UTM_N>3736339</ogr:UTM_N>
</ogr:site2000>
</gml:featureMember>
Any suggestions on how to read the gml attributes, rather than OL's feature descriptions?
Sorry for the poorly articulated question.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090623/a4372566/attachment.html
More information about the Users
mailing list