Hi,
I have created a map which uses the following code to get linear measurements.
var length = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, {
eventListeners: {
measure: function(evt) {
Ext.MessageBox.show(
{title: 'Length'
,buttons: Ext.MessageBox.OK
,width:200
,msg:"Length: " +evt.measure + evt.units,
fn: check
});
}
}
});
I am using geoext to present the map.
The data is transformed using this.
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
var epsg900913 = new OpenLayers.Projection("EPSG:900913");
var mapCenter = new OpenLayers.LonLat(1169180, 6843865);
mapCenter.transform(epsg4326, epsg900913);
map.setCenter(mapCenter, 9);
Could anyone shed some light on why the measurements are drastically wrong.
They
are inaccurate to about 15 meters/ km over small distances
Yours,
Robert
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users