OSM, OpenLayers and coordinates


Another newbie question…

I found out how to draw markers via a layer on an OSM map.
I have 2 markers and a line that is supposed to connect the 2 markers.
The markers stay in place for every zoomlevel. The line however only connects the markers at the most detailed zoonlevel. A line connecting Eindhoven with Leiden (both in Holland) finally ends up in England when zooming out.

var latEhv=51.44
var lonEhv=5.48
var latLdn=52.10
var lonLdn=4.29

// markers
var lonLatEhv = new OpenLayers.LonLat(lonEhv, latEhv).transform(new OpenLayers.Projection(“EPSG:4326”), map.getProjectionObject());
var lonLatLdn = new OpenLayers.LonLat(lonLdn, latLdn).transform(new OpenLayers.Projection(“EPSG:4326”), map.getProjectionObject());

layerMarkers.addMarker(new OpenLayers.Marker(lonLatEhv,icon1));
layerMarkers.addMarker(new OpenLayers.Marker(lonLatLdn,icon2));

// line
var points = [];
var p1 = new OpenLayers.Geometry.Point(610030, 6699496);
var p2 = new OpenLayers.Geometry.Point(477560, 6818226);
// create a line feature from a list of points
var lineString = new OpenLayers.Geometry.LineString(points);
var lineFeature = new OpenLayers.Feature.Vector(lineString, null, style_green);

map.addLayers([layerTilesAtHome, vectorLayer]);

Can anybody explain this behaviour?
Can somebody point to documentation regarding OpenLayers and handling of coordinates?
All the data I have is expressed in geocoordinates, like in the first 4 var’s mentioned.

Thanks in advance.

You probably need to set some projection settings on the points or on the vector. Not exactly sure which or how.