[OpenLayers-Dev] Cannot set Feature popupClass.

Erik Uzureau euzuro at gmail.com
Mon Feb 25 13:09:44 EST 2008


OK sorry. just checked the documentation and in fact there is no
'options' parameter to the Feature class's constructor.

So what you will have to do is:

feature = new OpenLayers.Feature(layer, new OpenLayers.LonLat(lng,lat));
feature.popupClass = OpenLayers.Popup;



e

On 2/25/08, Leandro R <learonco at gmail.com> wrote:
> Hi
> Thanks for your quick answer, but I had already tried that and did not work.
> What else could be?
> Thanks
>
>
> 2008/2/25, Erik Uzureau <euzuro at gmail.com>:
> > I think the problem here is that you are specifying the class in
> > quotes as a string.
> > It should just be:
> >
> >
> > > feature = new OpenLayers.Feature(layer, new OpenLayers.LonLat(lng,lat),
> >
> > > {popupClass:OpenLayers.Popup});
> >
> >
> >
> > ---e
> >
> >
> > 2008/2/25 Leandro R <learonco at gmail.com>:
> >
> > > Hello all !!!
> > >
> > > I need to change the popup class of a Feature object. I've tried to do
> it as
> > > the following, but it has not worked.
> > >
> > > feature = new OpenLayers.Feature(layer, new OpenLayers.LonLat(lng,lat),
> > > {popupClass:'OpenLayers.Popup'});
> > >
> > > I don't want to change that from the file Feature.js.
> > >
> > > Can anyone help me?
> > > Thanks
> > > Leandro
> > >
> > >
> >
> > > _______________________________________________
> > > Dev mailing list
> > > Dev at openlayers.org
> > > http://openlayers.org/mailman/listinfo/dev
> > >
> > >
> >
>
>



More information about the Dev mailing list