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 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());
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);
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.