[OpenLayers-Users] How to have overlays off by default

Raja_Kajiev raja.kajiev at gmail.com
Sun Jul 5 14:43:33 EDT 2009


I don't have the OL code by my hand right now to check it out, but if
for some reason there is a setter defined for a property it is better
to use that setter instead of changing property directly.
There may be nothing critical for, say, GeoRSS layer, but handling
Google layer may be more complicated than just "now we draw this, now
we don't": it may reflect a tile loading, zoom level selection and so
on.
So, I'm doing this just in case :)

dixi

2009/7/2 HKChad (via Nabble) <ml-user+183155-121512562 at n2.nabble.com>:
> Why is that better? Is it another way? Sure. Is it better? Not so sure, Why?
> The solution I posted just shows how to set the visibility at time of Layer
> construction. So if you do it 'your way' and set visibility prior to adding
> the layer to the map, it makes no difference. Just curious as to why you
> think it's 'better'.

> Raja_Kajiev wrote:
> IMO, better way is to use setter:
>
> ce.setVisibility(false);
>
> Barker, Doug wrote:
> Hi,
> How do I have the overlays in a map turned off when the map starts up?
> ...
>
> ________________________________
> This email is a reply to your post @
> http://n2.nabble.com/How-to-have-overlays-off-by-default-tp3191421p3195235.html
> You can reply by email or by visting the link above.
>
>



-- 
LinkedIn: http://www.linkedin.com/pub/aleksey-smirnov/13/598/3b3

-- 
View this message in context: http://n2.nabble.com/How-to-have-overlays-off-by-default-tp3191421p3208739.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090705/49c87803/attachment.html


More information about the Users mailing list