The problem is the following. In the projection EPSG: 4326 WMS-layer generated by GeoServer, looks a bit wrong, as we would like (angle).
There is a projection, similar to the Cartesian coordinate system in which, for example, print the map?
Yes, I tried to use that projection, but because at some point it was decided to transfer shapefiles with ArcGis, the solution is not found right away - how to set the desired projection.
When using the Vaadin OpenLayers wrapper is done quite simply -
…
private OpenLayersMap openLayersMap;
…
openLayersMap.setJsMapOptions(
“{projection: “+
" new OpenLayers.Projection("EPSG:900913"),” +
" maxResolution: 156543.0339,units: "m",” +
" maxExtent: new OpenLayers.Bounds(-20037508, -20037508, " +
" 20037508, 20037508.34)" +
“}”
);
…
I have tried this code and it worked out for me. Hope it work for you also.
var options = {
projection: new OpenLayers.Projection(“EPSG:900913”),
units: “m”,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
20037508.34, 20037508.34)
};
map = new OpenLayers.Map(‘map’, options);
// To create Google Mercator layers
var gmap = new OpenLayers.Layer.Google(
“Google Streets”,
{‘sphericalMercator’: true,
‘maxExtent’: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)
}
);
// to create WMS layer
var wms = new OpenLayers.Layer.WMS(
“World Map”,
“”,
{‘layers’: ‘basic’, ‘transparent’: true}
);