Re: [OpenLayers-Users] Layer Switcher Question

2008-01-25 Thread Christian López Espínola
And you should listen to the changebaselayer event...

Something like

this.map.events.register("changebaselayer", this, updateActiveLayerName);

and

function updateActiveLayerName(evt) {
document.getElementById("mylbl").innerText = map.baseLayer.name;
}


This code is untested (written directly on the mail), but gives you a hint.

On Jan 26, 2008 12:09 AM, Eric Lemoine <[EMAIL PROTECTED]> wrote:
> On Jan 25, 2008 7:01 PM, D. Eric Keefauver <[EMAIL PROTECTED]> wrote:
> > Hello all,
> >
> > I apologize if this should be a developer post but I am curious as to how
> > one might capture the base layer name that is active base layer within the
> > layer switcher and place it on the map page once the user collapses the
> > layer switcher. We want to have a visual place holder for the active base
> > layer name so users are aware and always reminded of what they are
> > viewing.
>
> The base layer is referenced in the map object. For example to get the
> name of the base layer you do map.baseLayer.name.
>
> Hope I'm answering your question...
>
> --
> Eric
>
> ___
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Regards,

Christian López Espínola
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Layer Switcher Question

2008-01-25 Thread Eric Lemoine
On Jan 25, 2008 7:01 PM, D. Eric Keefauver <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I apologize if this should be a developer post but I am curious as to how
> one might capture the base layer name that is active base layer within the
> layer switcher and place it on the map page once the user collapses the
> layer switcher. We want to have a visual place holder for the active base
> layer name so users are aware and always reminded of what they are
> viewing.

The base layer is referenced in the map object. For example to get the
name of the base layer you do map.baseLayer.name.

Hope I'm answering your question...

--
Eric
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


[OpenLayers-Users] Layer Switcher Question

2008-01-25 Thread D. Eric Keefauver
Hello all,

I apologize if this should be a developer post but I am curious as to how
one might capture the base layer name that is active base layer within the
layer switcher and place it on the map page once the user collapses the
layer switcher. We want to have a visual place holder for the active base
layer name so users are aware and always reminded of what they are
viewing.

Has anyone down this before?

Thank you in advance,

Eric


Eric Keefauver
Research Scientist
Michigan Tech Research Institute (MTRI)

___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users