[OpenLayers-Users] text markers
Eric Lemoine
eric.lemoine at camptocamp.com
Tue Mar 2 02:10:25 EST 2010
On Monday, March 1, 2010, Karina Guardado <kguardado at gmail.com> wrote:
> Hi,
>
> Is there a way to change the box of a text layer maker to one that has a close option like other popups. I mean when I click on one marker a box is opened but there is not option to close it just click again in the marker icon.
Hi.
What you want isn't supported.
Using a Layer.Vector and a Control.SelectFeature is recommended.
Although it would lead to more code on your side it would give you
more flexibility.
If you really want to use Layer.Text you can probably monkeypatch the
prototype of feature so popups are created with a closebox by default:
var _createPopup = OpenLayers.Feature.prototype.createPopup;
OpenLayers.Feature.prototype.createPopup = function() {
_createPopup.call(this, true);
};
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list