The origin of that is that OpenLayers only includes the EPSG4326 and EPSG90013 projections. If you use another one, you'll have to include it using the proj4js library.
You can see all the necessary documentation in:
http://trac.osgeo.org/Here there are the steps I followed:openlayers/wiki/Documentation/ Dev/proj4js
- First of all, I downloaded the most recent version of Proj4js.
- Then, I included the corresponding Javascript file in my HTML page:
<script type="text/javascript" src="proj4js/proj4js- compressed.js></script>
- In my case, the desired projection is not defined by default in Proj4js, so I looked for it in http://spatialreference.org/:
Proj4js.defs["EPSG:23029"] = "+proj=utm +zone=29 +ellps=intl +units=m +no_defs";
- Finally, I copied the Proj4 format of the projection in a Javascript file which I also included in my page:
<script type="text/javascript" src="proj4js/defs/EPSG23029. js></script>
And now all the operations over projections with the projection EPSG23029 work well.