[OpenLayers-Dev] alt or title text on Layer.Marker
Jachym Cepicky
jachym.cepicky at gmail.com
Thu Nov 1 15:58:02 EDT 2007
Hi,
I have updated #751 and it would be nice, if somebody could test it and
and if it would appear in the trunk.
Other proposed changes:
OpenLayers/Layer/Text.js:
-------------------------
data['overflow'] = overflow || "auto";
+ data.label = title;
OpenLayers/Feature.js:
-------------------------
- this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon);
+ if (this.data.label) {
+ this.marker = new OpenLayers.Marker.Label(this.lonlat,
this.data.icon, this.data.label,{mouseOver:true});
+ }
+ else {
+ this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon);
+
and of course
OpenLayers.js
-------------
+ "OpenLayers/Marker/Label.js",
working example:
http://www.bnhelp.cz/mapserv/pokusy/openlayers/cr/
turn layer group "Turistika" on and "mouseover" the icons.
thanks
jachym
Ezequiel Gonzalez Rial píše v Čt 25. 10. 2007 v 10:03 -0300:
> Jachym,
> I've developed something arround that (Ticket #751) wich is not yet on
> the trunk, it's a label that apperars next to the marker (by css you
> can set it above, below or wherever you want), as it inheritance from
> marker you don't loose anything you have already coded.
>
> --
> Best Regards,
> Ezequiel Gonzalez Rial (gonrial at gmail.com)
>
> 2007/10/25, Jachym Cepicky <jachym.cepicky at gmail.com>:
> > Hi,
> >
> > maybe, it would be good to have option for OpenLayers.Layer.Marker,
> > which would enable displaying alt text of icons on mouse over. The alt
> > attribute could be e.g. Title of OL.Layer.Text
> >
> > Is there such possibility, which would display alt or other attribute,
> > while moving with mouse over icon?
> >
> > thanks
> >
> > jachym
> >
> > --
> > 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
> >
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at openlayers.org
> > http://openlayers.org/mailman/listinfo/dev
--
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/20071101/bc3f966c/attachment.bin
More information about the Dev
mailing list