AW: [OpenLayers-Users] What's wrong with my OSM + MapServer layers?

Arnd Wippermann arnd.wippermann at
Wed Feb 8 12:16:02 EST 2012

You have to set the correct maxExtent for your spericalMercator map

var bounds4326   = new OpenLayers.Bounds(14.840581, 39.863640, 17.361026,
var bounds900913 = bounds4326.transform(new
OpenLayers.Projection("EPSG:4326"), new

map = new OpenLayers.Map( 'map', {
            new OpenLayers.Control.Navigation(),
            new OpenLayers.Control.PanZoomBar(),
            new OpenLayers.Control.ScaleLine(),
            new OpenLayers.Control.Permalink('permalink'),
            new OpenLayers.Control.MousePosition(),                    
            new OpenLayers.Control.Attribution()
        maxExtent: bounds900913,
        maxResolution: 156543.0399,
        numZoomLevels: 19,
        units: 'm',
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326")


-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at
[mailto:openlayers-users-bounces at] Im Auftrag von Andrea.Z
Gesendet: Mittwoch, 8. Februar 2012 17:02
An: openlayers-users at
Betreff: [OpenLayers-Users] What's wrong with my OSM + MapServer layers?

Hi everybody.

I'm trying to set up a map with the Open Streets background, on which I
would like to add some layers I created in a MapFile. I can easily create
the OSM background; I am also able to display, in a separate map, my
MapServer's layer his correct reference system, the WGS84 (EPSG: 4236).
But, when I try to merge the two layers in the same map, I'm not able to see
the overlay, the MapServer's layer. I read a lot about the OSM projection,
and I found how should I write my map, but there is no way to make it work.
As long as I am new at using OpenLayers, probably I am doing something
wrong; but I really cannot understand what, and I am not able to find the
solution on the web.

Here it is my map's html:

I will be grateful to anyone who will try to help me. 

View this message in context:
Sent from the OpenLayers Users mailing list archive at
Users mailing list
Users at

More information about the Users mailing list