This example shows how to reproject vector features within OpenLayers. The baselayer shows Germany in the projection EPSG:31467 (GK 3). When one clicks on the buttons, features with geometries originally in EPSG:4326 will be transformed to the projection of the map on-the-fly.
The features are internally reprojected with the JavaScript library Proj4JS. Please note that usually you would not inlude Proj4JS the way it is done in this example. In a production environment you would furthermore have a local copy of the Proj4JS-projection definition that is hotlinked in this example (see Graticule example for how to do this).