[OpenLayers-Users] get current base map?

Tom tom at ukbassline.co.uk
Mon Jun 11 10:22:39 EDT 2007


That might be just what I need, thanks.

On 6/11/07, Christian López Espínola <penyaskito at gmail.com> wrote:
>
> Hi Tom,
> Maybe you want to apply the patch attached at ticket #103
> (http://trac.openlayers.org/ticket/103)
>
> Usage:
> var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
>         "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},
>         {attribution:'Layer provided by OpenLayers});
>
> map.addControl(new OpenLayers.Control.Attribution());
>
> The attribution field can display html.
>
> Hope this helps.
>
>
> On 6/11/07, Tom <tom at ukbassline.co.uk> wrote:
> > Hi,
> >
> > Hopefully this is an easy one...
> >
> > I have added a license to my page which needs to change if the base map
> > changes and I have an array with all the license numbers in.  I've
> > registered a function to the event: changebaselayer:
> > map.events.register("changebaselayer", map, function(e) {
> >                  document.getElementById("licensebox").innerHTML =
> > licenses[?];
> >                 });
> >
> > but I need to be able to get the newly selected basemap name in order to
> > lookup the correct license text in the array.  Is there a way to find
> this
> > easily or will I have to subclass layer.WMS in order to use the setMap()
> > function?
> >
> > regards,
> >
> > Tom
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
> >
>
>
> --
> Regards,
>
> Christian López Espínola
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070611/920c6a00/attachment.html


More information about the Users mailing list