[OpenLayers-Users] changing Base layers
Christopher Schmidt
crschmidt at metacarta.com
Mon Oct 29 22:24:39 EDT 2007
On Tue, Oct 30, 2007 at 12:42:06PM +1100, bradleyspencer wrote:
> Chris,
>
> I guess I am really dumb but its never clear to me how these different
> methods are supposed to be used. I am not a trained OO programmer and find
> the documentation a little confusing (my problem :))
>
> So, I tried this: map.setBaseLayer(newBaseLayer)
>
> Where newBaseLayer is the name of the base layer set up at Load time.
So, if you add two base layers to the map, then doing that should work.
I assume by 'name' you mean 'variable name', rather than anything else.
If all else fails, looking at the code to the layerswitcher mouse
handling methods might help you.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list