[OpenLayers-Users] Pop-up and GML/KML/ ... layers

Jacolin Yves yjacolin at free.fr
Wed Feb 6 10:38:25 EST 2008


Thanks for this tips. Here is a snapshoot of my GML:
  <gml:featureMember>
    <gml:elmProperty>
      <gml:Property name="CODEFICHE">001</gml:Property>
      <gml:Property name="LIBFICHE">001-Lyon 1 Nord</gml:Property>
      <gml:Property name="MONOFICHE">002</gml:Property>
      <gml:Property name="FICHE">001</gml:Property>
      <gml:Property name="CODEFICHEF">1</gml:Property>
    </gml:elmProperty>
    <gml:Point>
      <gml:coordinates>537171.089628033,5743668.39683698</gml:coordinates>
    </gml:Point>
  </gml:featureMember>

I tried feature.attributes.CODEFICHE, but undefined is displayed.

Any idea? Thank :)

Y.
Le Wednesday 06 February 2008 15:02:55 Jean Pommier (IGE), vous avez écrit :
> Hi Yves,
> Yes, you can. The syntax is feature.attributes.<fieldName>, you'll get the
> field value for the current feature
> Is it OK ?
> If you need an example, i have one not so far...
> Jean
>
> 2008/2/6, Jacolin Yves <yjacolin at free.fr>:
> > Hi Pierre,
> >
> > Following this example, I have to parse my GML to find the data somewhere
> > I
> > want to show on my tooltips. Is it the "normal" way? Is it possible to
> > get it
> > with  something like "feature.data.<fieldName>" to display it in the
> > pop-up ?
> >
> > Am I clear? I hope so :)
> >
> > Y.
> >
> > Le Wednesday 06 February 2008 14:02:48 Pierre GIRAUD, vous avez écrit :
> > > Are you drawing features in a Vector-type layer ?
> > > If so, is this example usefull ?
> > > http://openlayers.org/dev/examples/select-feature-openpopup.html
> > >
> > > Regards,
> > > Pierre
> > >
> > > On Feb 6, 2008 1:02 PM, Jacolin Yves <yjacolin at free.fr> wrote:
> > > > Hi list,
> > > >
> > > > I would like to test the pop-up feature in openlayers. If I add a
> > > > GML, KML or some other type of layer. How can I easily retrieve data
> > > > from
> >
> > the
> >
> > > > GML, KML, after clicking on the map ?
> > > >
> > > > Do I need to retrieve the latLong from the click event, then parse
> > > > the GML, and then build the content of the pop-up? Or can I retrieve
> > > > data from the GML layer loaded in OL? An another method?
> > > >
> > > > Could you provide some easy exemple for this?
> > > >
> > > > Sorry if my question seems obvious. I am new in Javascript OO :)
> > > >
> > > > Regards,
> > > >
> > > > Y.
> > > > --
> > > > Yves Jacolin
> > > > ---
> > > > http://softlibre.gloobe.org
> > > > _______________________________________________
> > > > Users mailing list
> > > > Users at openlayers.org
> > > > http://openlayers.org/mailman/listinfo/users
> >
> > --
> > Yves Jacolin
> > ---
> > http://softlibre.gloobe.org
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users



-- 
Yves Jacolin
---
http://softlibre.gloobe.org



More information about the Users mailing list