[OpenLayers-Users] new OpenLayers.Format.OSM and function onFeatureSelect(feature)

ph ttv ph.ttv at free.fr
Wed Nov 9 04:08:55 EST 2011


Hi all,

I do not know find documentation, simple and illustrated with examples
where I can fill my tooltip, and therefore I expose you my problem below:

Indeed, I try to get various information about a node in order to view
them in a tooltip, using "onFeatureSelect function (feature)."

If my crafts night allowed me to obtain, for example, the name of the
node (with feature.attributes.name) or the id of the node
(feature.osm_id) but :

-----------------------------------------------------------------------
how to extract the information "user" or even the date of last update
("timestamp")?
------------------------------------------------------------------------

I have run out of ... strategy (s) ...

(The file format is osm: format: new OpenLayers.Format.OSM ())

my last test is here:  http://mdl29.net/0j

and my data file. osm looks like this:


<node id="278511438" lat="47.9356738" lon="-4.0211462" version="2"
timestamp="2011-04-03T12:06:59Z" changeset="7753311" uid="155442"
user="FPH">
    <tag k="amenity" v="recycling"/>
    <tag k="recycling:clothes" v="no"/>
    <tag k="recycling:glass" v="yes"/>
    <tag k="recycling:paper" v="yes"/>
  </node>

Thanks for your help !
Titivi


More information about the Users mailing list