Thanks, that makes sense. I included the code above my openlayers.js and it
seems to have fixed my measure tool to the right units except unfortunately
my layers do not display now. This is obviously because I am projecting my
map wrong but I am unsure how to correct this. I know this is the right
coordinate system we use as per http://spatialreference.org/ref/epsg/3776/
because our coordinate system in a different web application uses this
EPSG:3776 (3TM-114) for our coordinates of the province of Alberta in
Canada. Previously though I declared my map like so -
//Create Map
map = new OpenLayers.Map('map',{controls: [],
maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
20037508.34, 20037508.34),
maxResolution: 156543.0399,
numZoomLevels: 20,
units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
//Define Map Longitude/Latitude and Start zoom levels
startupLat = 52.27210;
startupLon = -113.80288;
startupLevel = 12;
lonLat = new OpenLayers.LonLat(startupLon,startupLat).transform(new
OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
So I'm guessing now I would have to modify this somehow to actually include
the right coordinate system? I don't really care if we can display google
layers properly or not as displaying our own data and being able to measure
correctly is way more important except when I add the ProjJS stuff the map
is obviously not correct anymore. Really appreciate any advice on how I can
change my map variables now to use the correct settings so my layers
display.
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Getting-the-right-results-from-Measure-tool-using-EPSG-3776-tp5786186p5789000.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users