AW: [OpenLayers-Users] Showing EPSG:25832 Map via OpenLayers

Arnd Wippermann arnd.wippermann at web.de
Wed Apr 6 12:33:07 EDT 2011


Hi,

I have missed displayProjection. For that you need also proj4.js. OpenLayers
can only transform between EPSG:4326 and EPSG:900913.

By the way "buffer" is an option and not a param for the wms request. You
should move it to the option object.

    }, {
        buffer: 1,
        isBaseLayer: true,
        visibility: true
    });

I'm not sure, but buffer=1 instead of buffer=5 should be a good value.

Further good luck

Arnd

-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von jpvalappil
Gesendet: Mittwoch, 6. April 2011 09:33
An: users at openlayers.org
Betreff: Re: AW: [OpenLayers-Users] Showing EPSG:25832 Map via OpenLayers

Thanks Arnd, your description and example guided me to the right direction. 

I have edited my map file and specified the PROJECTION section in my map
file to the following value (for EPSG:25832) (earlier also I had set but may
missed something):

PROJECTION
	"proj=utm"
	"zone=32"
	"ellps=GRS80"
	"units=m"
	"no_defs"
END

and then removed the displayProjection setting from the options during the
map object initialization and suddenly everything started to work. Modified
code snippet is below

var map, l1;
window.onload = function () {
    var options = {
        projection: new OpenLayers.Projection("EPSG:25832"),        
        units: 'm',
        maxExtent: new OpenLayers.Bounds(644773, 5093382, 681804, 5113322),
        maxResolution: 'auto'
    };
    map = new OpenLayers.Map("map", options);
    l1 = new OpenLayers.Layer.WMS("a",
"http://192.168.0.14:8080/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/map_
demo_5.0/FarSystems_5_0.map",
{
        layers: 'ortofoto2009',
        buffer: 5,
        transparent: 'true',
        format: 'image/png'
    }, {
        isBaseLayer: true,
        visibility: true
    });

    map.addLayer(l1);
    map.zoomToMaxExtent()
}


Once again I thank you for your precious help.

I hope the code provided here may help others to solve their similar issues.

-----
Thanks in advance

Jayaprakash

India
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Showing-EPSG-25832-Map-via-OpenLayers
-tp6242243p6245002.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list