On Thursday, August 20, 2009, Ivan Grcic <ivan.gr...@geofoto.hr> wrote:
> Hi, quick question:
>
> whenever we have to exam layer's visibility we have to test inRange param.
>
> I saw that calculateInRange is called every time in map.moveTo() fn,
> and it sets layer.inRange param accordingly.

Is it also called from Layer.redraw(), itself called from setVisibility().


>
> Is it safe to just take inRange param, or its better to call
> calculateInRange() every time?

AFAICT Map.moveTo() and Layer.redraw() take care of calling
calculateInRange when it makes sense, so it should be safe to rely on
the inRange value elsewhere. But this needs to be considered on a case
by case basis.

Cheers,
_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

Reply via email to