[OpenLayers-Users] Popup Attributes

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Tue Jun 23 16:16:27 EDT 2009


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/9398794d/attachment.html


More information about the Users mailing list