Mmmh, are you sure of the syntax of your GML. What did you use to generate it ?<br>I'm not so used to GML, but it looks quite weird : elmProperty is REALLY a conform gml tag ??<br>Mine (ogr2ogr generated GML, then i changed a few minor things) looks like this : <br>
<gml:featureMember><br> <ogr:allcircuits fid="ID1"><br> <ogr:geometryProperty><br> <gml:LineString><br> <gml:coordinates>9.468016813294355,24.571030547444423 6.003057388645857,23.697212985408044 6.002689662946409,23.696395817186783 6.00264880453534,23.695742082609684 6.00264880453534,23.694965772799492</gml:coordinates><br>
</gml:LineString><br> </ogr:geometryProperty><br> <ogr:Id>1</ogr:Id><br> <ogr:tId>DJ-TA-1</ogr:tId><br> <ogr:itineraire><![CDATA[circuit2]]></ogr:itineraire><br>
<ogr:categorie><![CDATA[Grandes traversées]]></ogr:categorie><br> <ogr:url><![CDATA[mon url]]></ogr:url><br> <ogr:duree>8</ogr:duree><br> <ogr:mode>1</ogr:mode><br>
</ogr:allcircuits><br> </gml:featureMember><br><br>You could also use firebug to explore your javascript objects : maybe you'll find the right path...<br><br><div><span class="gmail_quote">2008/2/6, Jacolin Yves <<a href="mailto:yjacolin@free.fr">yjacolin@free.fr</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks for this tips. Here is a snapshoot of my GML:<br> <gml:featureMember><br> <gml:elmProperty><br> <gml:Property name="CODEFICHE">001</gml:Property><br> <gml:Property name="LIBFICHE">001-Lyon 1 Nord</gml:Property><br>
<gml:Property name="MONOFICHE">002</gml:Property><br> <gml:Property name="FICHE">001</gml:Property><br> <gml:Property name="CODEFICHEF">1</gml:Property><br>
</gml:elmProperty><br> <gml:Point><br> <gml:coordinates>537171.089628033,5743668.39683698</gml:coordinates><br> </gml:Point><br> </gml:featureMember><br><br>I tried feature.attributes.CODEFICHE, but undefined is displayed.<br>
<br>Any idea? Thank :)<br><br>Y.<br>Le Wednesday 06 February 2008 15:02:55 Jean Pommier (IGE), vous avez écrit :<br>> Hi Yves,<br>> Yes, you can. The syntax is feature.attributes.<fieldName>, you'll get the<br>
> field value for the current feature<br>> Is it OK ?<br>> If you need an example, i have one not so far...<br>> Jean<br>><br>> 2008/2/6, Jacolin Yves <<a href="mailto:yjacolin@free.fr">yjacolin@free.fr</a>>:<br>
> > Hi Pierre,<br>> ><br>> > Following this example, I have to parse my GML to find the data somewhere<br>> > I<br>> > want to show on my tooltips. Is it the "normal" way? Is it possible to<br>
> > get it<br>> > with something like "feature.data.<fieldName>" to display it in the<br>> > pop-up ?<br>> ><br>> > Am I clear? I hope so :)<br>> ><br>> > Y.<br>> ><br>
> > Le Wednesday 06 February 2008 14:02:48 Pierre GIRAUD, vous avez écrit :<br>> > > Are you drawing features in a Vector-type layer ?<br>> > > If so, is this example usefull ?<br>> > > <a href="http://openlayers.org/dev/examples/select-feature-openpopup.html">http://openlayers.org/dev/examples/select-feature-openpopup.html</a><br>
> > ><br>> > > Regards,<br>> > > Pierre<br>> > ><br>> > > On Feb 6, 2008 1:02 PM, Jacolin Yves <<a href="mailto:yjacolin@free.fr">yjacolin@free.fr</a>> wrote:<br>> > > > Hi list,<br>
> > > ><br>> > > > I would like to test the pop-up feature in openlayers. If I add a<br>> > > > GML, KML or some other type of layer. How can I easily retrieve data<br>> > > > from<br>
> ><br>> > the<br>> ><br>> > > > GML, KML, after clicking on the map ?<br>> > > ><br>> > > > Do I need to retrieve the latLong from the click event, then parse<br>> > > > the GML, and then build the content of the pop-up? Or can I retrieve<br>
> > > > data from the GML layer loaded in OL? An another method?<br>> > > ><br>> > > > Could you provide some easy exemple for this?<br>> > > ><br>> > > > Sorry if my question seems obvious. I am new in Javascript OO :)<br>
> > > ><br>> > > > Regards,<br>> > > ><br>> > > > Y.<br>> > > > --<br>> > > > Yves Jacolin<br>> > > > ---<br>> > > > <a href="http://softlibre.gloobe.org">http://softlibre.gloobe.org</a><br>
> > > > _______________________________________________<br>> > > > Users mailing list<br>> > > > <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> > > > <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>
> ><br>> > --<br>> > Yves Jacolin<br>> > ---<br>> > <a href="http://softlibre.gloobe.org">http://softlibre.gloobe.org</a><br>> > _______________________________________________<br>> > Users mailing list<br>
> > <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>> > <a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br><br><br><br>--<br>Yves Jacolin<br>
---<br><a href="http://softlibre.gloobe.org">http://softlibre.gloobe.org</a><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Information Géographique et Environnement<br>39 chemin Canto Laouzeto<br>31100 Toulouse<br>France<br> <br>Port +33 6 09 23 21 36<br>Fax +33 5 61 86 09 23<br>
Mail : <a href="mailto:jean.pommier@ige.fr">jean.pommier@ige.fr</a><br>Site web : <a href="http://www.ige.fr">www.ige.fr</a><br>Suivez de près l'actualité d'IGE grâce à notre fil RSS : <a href="http://www.ige.fr/actualites/rss.php">http://www.ige.fr/actualites/rss.php</a>