[OpenLayers-Users] Popup closebox and formatting.

Eric Lemoine Eric.Lemoine at camptocamp.com
Sat Jun 2 17:00:23 EDT 2007


On 6/2/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Sat, Jun 02, 2007 at 03:13:53PM +0200, Eric Lemoine wrote:
> > On 5/31/07, kaka <drspencer at hotmail.com> wrote:
> > >
> > > I am trying to add a closebox to some markers, but I can??t get the close
> > > boxes to show up. See http://www.villageografica.com/test50/test.html for a
> > > test. The markers are located in
> > > http://www.villageografica.com/test50/ProjectLocations.txt . What am I doing
> > > wrong here?
> >
> > Unfortunatly I don' think you can have closeboxes with a Text layer.
> > Indeed, the Text layer uses feature.createPopup()  as opposed to
> > feature.createPopup(true). What you can do is create a class that
> > inherits from OpenLayers.Layer.Text and overrides the markerClick()
> > method - something along these lines (*untested*) :
>
> Just to throw my weight behind this: this is probably true at the
> moment, and Eric's suggested fix is about right (though I've similarly
> not tested it). I would consider this a bug though, and would take a
> patch to fix it.

Christopher, what's the actual rationale behind having OL providing a
default onclick callback for features of a Text layer? Wouldn't it be
better to have a more generic mechanism where the user can choose the
events (and associated callbacks) attached to its Text layer's
features? Perhaps at this point you just want to avoid breaking
backward compatibilty and therefore keep that default onclick callback
thing?

Thanks,


-- 
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