[GIS] How to use OpenLayers OSM-Layer with degrees instead of meters

coordinate systemopenlayers-2openstreetmap

I have an OSM-Layer as a base layer. When I create a vector I have to define the coordinates in meter.
Is there a way to use degrees right a way without reprojecting them beforehand to meters?

var p0 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(13.39, 52.5));

Best Answer

You can Transform on the fly, using the following code:

var geographic = new OpenLayers.Projection("EPSG:4326");
var mercator = new OpenLayers.Projection("EPSG:900913");
var p0 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(13.39, 52.5).transform(geographic,mercator));