[OpenLayers-Users] How To: Positionate WGS84 tracks into Gauss-Boaga Map

Riggi Valerio vash.84 at virgilio.it
Fri Nov 2 13:55:51 PDT 2012


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
             );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121102/5a49217e/attachment.html>


More information about the Users mailing list