On Mon, Jul 25, 2011 at 12:13 PM, kapuch <[email protected]> wrote: > Hi Everybody. > > I'm looking for answer how to set feature id. > > I'm creating feature like this: > > var f = new OpenLayers.Feature.Vector( > new > OpenLayers.Geometry.Point(15.24346,52.72433).transform(geographic, > mercator), > { > title: "nananana", > description: "lalalala" > } > ); > > and then trying to set the id property on the object. > > f.id = "my-featureid-1"; > > But when I add this to the layer the feature id is for example: > <image id="OpenLayers.Geometry.Point_189" ... cursor="pointer"></image> > > Is there any way to change the featureId?
Have you tried f.geometry.id = "your_id" ? -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
