if you want reproject feature coordinates from EPSG:4326 (WGS84) to other projection than EPSG:900913 (SphericalMercator), then you have to add the proj4js javascript library to your application. By the way: How did you manage to show a tif in your browser? Arnd
_____ Von: [email protected] [mailto:[email protected]] Im Auftrag von Riggi Valerio Gesendet: Freitag, 2. November 2012 21:56 An: [email protected] Betreff: [OpenLayers-Users] How To: Positionate WGS84 tracks intoGauss-Boaga Map Hi, I'm tring to track some gps data into a Gauss-Boaga map, but I don't manage to put the track on the right place, how can I do? This is the Track layer: new OpenLayers.Layer.PointTrack("Tracks", { projection: geographic, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: "track.kml", format: new OpenLayers.Format.KML({ extractTracks: true, extractStyles: true }) }), dataFrom: OpenLayers.Layer.PointTrack.TARGET_NODE, styleFrom: OpenLayers.Layer.PointTrack.TARGET_NODE, eventListeners: { "beforefeaturesadded": function(e) { // group the tracks by fid and create one track for // every fid var fid, points = [], feature; for (var i=0, len=e.features.length; i<len; i++) { feature = e.features[i]; if ((fid && feature.fid !== fid) || i === len-1) { this.addNodes(points, {silent: true}); points = []; } else { points.push(feature); } fid = feature.fid; } return false; } } }) And this is the Gauss-Boaga Projection: var options = { isBaseLayer: true, maxResolution: '0.84686783985005', strategies: [new OpenLayers.Strategy.Fixed()], displayInLayerSwitcher: true, size: new OpenLayers.Size(8745, 6696), numZoomLevels: 20 }; var gauss = new OpenLayers.Layer.Image( 'Gauss-Boaga', 'CTR588140.tif', new OpenLayers.Bounds(2556348.9846319141797721, 4227924.4383069388568401, 2563754.8438914027065039,4233595.0653625745326281), <?php //left,bottom,right,top ?> new OpenLayers.Size(8745, 6696), options );
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
