[OpenLayers-Users] OpenLayers and Projections

Erik Uzureau euzuro at gmail.com
Thu Jul 13 12:49:39 CDT 2006


Hi Scott,

The default projection in OpenLayers is EPSG:4326.
But you can overrride that by specifying a 'projection' value in the
layer options (or the map options, if you wish)

example:

            var map = new OpenLayers.Map( $('map') );
            var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                    "http://labs.metacarta.com/wms/vmap0",
                    {layers: 'basic'}
                    {projection: 'chicken'});
            map.addLayer(layer);


If this doesn't work, please write back. And please include either a
link to live code or
some code snippets and detailed errors. :-)

-Erik


On 7/13/06, Scott Knutti <sknutti at sanz.com> wrote:
> Hi,
>
> I am wondering how OpenLayers handles projections.  I have some
> shapefile data in an Albers Equal Area Conic projection that does not
> show up in the EPSG database.  How do I specify that projection in
> OpenLayers?  I have used the Proj WKT in my mapfile, but I get an
> invalid SRS given when I try to use it with OpenLayers. How can I get my
> data to display in the projection it is already in?
>
> Thanks,
> Scott Knutti
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://mailman-viper.python-hosting.com/listinfo/users
>


More information about the Users mailing list