[OpenLayers-Users] OSM base layer + WMS overlay

Eric Lemoine eric.lemoine at camptocamp.com
Sun Feb 26 11:01:08 EST 2012


On Thursday, February 23, 2012, François Van Der Biest wrote:

> Hi guys,
>
> This very simple code used to work :
>
> map = new OpenLayers.Map({
>    layers: [new OpenLayers.Layer.OSM()]
> });
> map.addLayers([
>    new OpenLayers.Layer.WMS("test", "/geoserver/wms", {
>        layers: "dept"
>    }, {
>        isBaseLayer: false
>    })
> ]);
>
> It does not anymore : the result is a WMS layer whose div is empty.
>
> To fix it, I've had to set the map maxExtent to new OpenLayers.Bounds(
>    -128 * 156543.03390625,
>    -128 * 156543.03390625,
>    128 * 156543.03390625,
>    128 * 156543.03390625
> )
>
> I find it redundant, since this maxExtent is already defined in
> OpenLayers.Layer.XYZ (which is extended by OpenLayers.Layer.OSM).
> Am I doing something wrong or is it a bug ?


This sounds like a serious regression, probably caused by
<https://github.com/openlayers/openlayers/pull/219>. Do you use a built
version of OL or do you observe the problem also when using OL's autoloader?



-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120226/cdcb662e/attachment.html


More information about the Users mailing list