[OpenLayers-Dev] More attributes for OpenLayers.Layer.Text

Jachym Cepicky jachym.cepicky at gmail.com
Fri Nov 9 18:50:06 EST 2007


Hi,

we needed attribute "id" for each object in the input textfile, so we
could write our custom methods for "click" events, when user click on
the icon.

I was thinking about mechanism, which would enable this and I think, the
best way is to enable *any* number of custom columns.

The patch was only few lines, and you can associate any attribute you
want to each icon from the vector layer.

Ticket added to the trac [1]
Patch for Text.js as well as test/data_Layer_Text_textfile.txt and
eventually examples/textfile.txt added as well [2].

Looking forward to your comments :-)

Good night

Jachym

[1] http://trac.openlayers.org/ticket/1135
[2]
http://trac.openlayers.org/attachment/ticket/1135/Text_with_any_attribute.diff
-- 
Jachym Cepicky
e-mail: jachym.cepicky at gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
	=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
	=?ISO-8859-1?Q?_zpr=E1vy?=
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20071110/9a85b52d/attachment.bin


More information about the Dev mailing list