<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19328"></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV dir=ltr align=left><SPAN class=984304017-12112012><FONT color=#0000ff 
size=2 face=Arial>if you display your track on google maps (add the url of your 
kmlfile in the search), it's at the same place.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984304017-12112012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984304017-12112012><FONT color=#0000ff 
size=2 face=Arial>So if that is the wrong place, then the coordinates of the 
track are misplaced.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=984304017-12112012><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=984304017-12112012><FONT color=#0000ff 
size=2 face=Arial>Arnd</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>Riggi 
Valerio<BR><B>Gesendet:</B> Montag, 12. November 2012 10:10<BR><B>An:</B> 
openlayers-users@lists.osgeo.org<BR><B>Betreff:</B> [OpenLayers-Users] 
Gauss-Boaga track shifted to North!<BR></FONT><BR></DIV>
<DIV></DIV>Hi, I'm trying to display a KML track from WGS84 to Gauss-Boaga using 
the proj4js library but the track result shifted like 500 meters north...what is 
wrong?<BR><BR><B>This is the page</B>: <A 
href="http://www.intornoamessina.it/tracking/image-layer2.html">http://www.intornoamessina.it/tracking/image-layer2.html</A><BR><BR><B>And 
this is the code</B>:<BR><BR><style><BR>.olControlAttribution { bottom: 
0px!important }<BR></style><BR><BR><script type="text/javascript" 
src="OpenLayers.js"></script><BR><BR><script type="text/javascript" 
src="proj4js/lib/proj4js-compressed.js"></script><BR><script 
type="text/javascript" 
src="proj4js/lib/projCode/tmerc.js"></script><BR><script 
type="text/javascript" 
src="proj4js/lib/projCode/merc.js"></script><BR><script 
type="text/javascript" 
src="proj4js/lib/defs/EPSG3004.js"></script><BR><script 
type="text/javascript" 
src="proj4js/lib/defs/EPSG900913.js"></script><BR><BR><script 
type="text/javascript"><BR>    Proj4js.libPath = 
"./proj4js/lib/";<BR></script><BR><BR><BR><script 
type="text/javascript"><BR><BR>/* area of 
interest<BR>EPSG:3004<BR>GEOMETRYCOLLECTION(POLYGON((2556348.9846319 
4227924.438,2563754.843 4227924.438,2563754.843 4233595.0653626,2556348.9846319 
4233595.0653626,2556348.9846319 
4227924.438)))<BR><BR>EPSG:4326<BR>GEOMETRYCOLLECTION(POLYGON((15.415108753542293 
38.197099410930804,15.499681620107433 38.19676993127058,15.5000312968338 
38.24787310414907,15.415399250825338 38.2482031851047,15.415108753542293 
38.197099410930804)))<BR>*/<BR><BR>var mercator = new 
OpenLayers.Projection("EPSG:3004"); <!-- Gauss-Boaga --><BR>var geographic 
= new OpenLayers.Projection("EPSG:4326"); <!-- WGS84 --><BR><BR>var 
map;<BR><BR>function init()<BR>{<BR><BR>    var esriSatellite = 
new OpenLayers.Layer.ArcGIS93Rest("ESRI Satellite", <A 
class=moz-txt-link-rfc2396E 
href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/export?f=image">"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/export?f=image"</A>,<BR>        
{   "format" 
:'png24',<BR>            
"layers" :'show:0'<BR>        
},<BR>        {   
"isBaseLayer":true,<BR>            
"opacity":1,<BR>            
"attribution": "Provided by <a href=\<A class=moz-txt-link-rfc2396E 
href="http://www.esri.com/software/arcgis/arcgisonline/index.html\">"http://www.esri.com/software/arcgis/arcgisonline/index.html\"</A> 
target=\"_new\">ESRI</a>",<BR>            
"visibility":true<BR>        
});<BR><BR>    map = new 
OpenLayers.Map({<BR>        div: 
"map",<BR>        projection: 
mercator,<BR>        maxExtent: new 
OpenLayers.Bounds(2000000,3900000,3000000,4500000),<BR>        
maxScale: 3145, 
//0.84686783985005,<BR>        layers: 
[esriSatellite, new OpenLayers.Layer.PointTrack("Tracks", 
{<BR>                
projection: 
geographic,<BR>                
strategies: [new 
OpenLayers.Strategy.Fixed()],<BR>                
protocol: new 
OpenLayers.Protocol.HTTP({<BR>                    
url: 
"-track.kml",<BR>                    
format: new 
OpenLayers.Format.KML()<BR>                
}),<BR>                
styleMap: new OpenLayers.StyleMap({fillColor: "darkred", strokeColor: "red", 
strokeWidth: 4, strokeOpacity: 0.5, pointRadius: 
5}),<BR>                
//next two lines have no 
effect?!<BR>                
//dataFrom: 
OpenLayers.Layer.PointTrack.TARGET_NODE,<BR>                
//styleFrom: 
OpenLayers.Layer.PointTrack.TARGET_NODE,<BR>                
eventListeners: 
{<BR>                    
"beforefeaturesadded": function(e) 
{<BR>                        
// group the tracks by fid and create one track 
for<BR>                        
// every 
fid<BR>                        
var fid, points = [], 
feature;<BR>                        
for (var i=0, len=e.features.length; i<len; i++) 
{<BR>                            
feature = 
e.features[i];<BR>                            
if ((fid && feature.fid !== fid) || i === len-1) 
{<BR>                                
this.addNodes(points, {silent: 
true});<BR>                                
points = 
[];<BR>                            
} else 
{<BR>                                
points.push(feature);<BR>                            
}<BR>                            
fid = 
feature.fid;<BR>                        
}<BR>                        
return 
false;<BR>                    
}<BR>                
}<BR>            
})<BR>        
],<BR>        center: new 
OpenLayers.LonLat(15.4385912418365,38.2424157857895).transform(geographic, 
mercator),<BR>        zoom: 
13<BR>    });<BR><BR>    map.addControl(new 
OpenLayers.Control.Attribution());<BR>    map.addControl(new 
OpenLayers.Control.LayerSwitcher());<BR>}<BR></script><BR><BR></head><BR><body 
onload="init();"><BR><BR><p 
style="font-size:20px;font-family:Arial;">OpenLayers.Layer.PointTrack, 
Gauss-Boaga-Projection and proj4js</p><BR><div id="map" 
style="width:768px;height:512px;border:1px solid 
blue;"></div><BR><div><BR><a href=<A 
class=moz-txt-link-rfc2396E 
href="http://trac.osgeo.org/proj4js/">"http://trac.osgeo.org/proj4js/"</A>>proj4js</a>&nbsp;<a 
href=<A class=moz-txt-link-rfc2396E 
href="http://trac.osgeo.org/proj4js/">"http://trac.osgeo.org/proj4js/"</A> 
target="_new"><img src=<A class=moz-txt-link-rfc2396E 
href="http://gis.ibbeck.de/ginfo/apps/OLExamples/index/nw.gif">"http://gis.ibbeck.de/ginfo/apps/OLExamples/index/nw.gif"</A> 
title="new window" border="0"></a><BR><a href=<A 
class=moz-txt-link-rfc2396E 
href="http://trac.osgeo.org/openlayers/wiki/Documentation/Dev/proj4js">"http://trac.osgeo.org/openlayers/wiki/Documentation/Dev/proj4js"</A>>OpenLayers 
and proj4js</a>&nbsp;<a href=<A class=moz-txt-link-rfc2396E 
href="http://trac.osgeo.org/openlayers/wiki/Documentation/Dev/proj4js">"http://trac.osgeo.org/openlayers/wiki/Documentation/Dev/proj4js"</A> 
target="_new"><img src=<A class=moz-txt-link-rfc2396E 
href="http://gis.ibbeck.de/ginfo/apps/OLExamples/index/nw.gif">"http://gis.ibbeck.de/ginfo/apps/OLExamples/index/nw.gif"</A> 
title="new window" 
border="0"></a><BR></div><BR></body><BR><BR>Thanks<BR>Valerio<BR></BODY></HTML>