[OpenLayers-Users] A problem about overlayers

geekjack geekjack at 163.com
Mon Aug 2 22:23:13 EDT 2010


I have got 2 layer groups(group A and B):
    The Group A(the overlayer) can match to the Google Sattelite Map(the
Baselayer) perfectly,but when I change the Group B as the overlayers to the
Google Sattelite Map,it just work like that:
http://geekjack.hostesr.com/bate.png  (The blue surface and the yellow line
are parts of Group B) .What I want to say is how can I align the Group B(the
overlayer) to the Google Sattelite Map(the Baselayer) to Eliminate the bias
and make it work well.
     Part of my codes:

function init(){  
  var options = {
  projection: new OpenLayers.Projection("EPSG:900913"),  
  displayProjection: new OpenLayers.Projection("EPSG:4326"),  
  units: "m", 
  maxResolution: 156543.0339,
  maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,
  20037508.34, 20037508.34)
  };  
 
map = new OpenLayers.Map('map', options);
  var gmap = new OpenLayers.Layer.Google(
  "Google Sattelite",
  {type: G_SATELLITE_MAP, 'sphericalMercator': true}
  );  
   
var test = new OpenLayers.Layer.WMS(
  "TOPP GroupB",  
  "http://localhost:8080/geoserver/wms?",  
  {
  layers: 'Group_B',  
  styles: '',  
  srs: 'EPSG:4326', 
  format: 'image/png', 
  tiled: 'true',  
  // tilesOrigin : "-60,-28", 
  transparent:false  
  },
  {
  'opacity': 0.2, 'isBaseLayer': true, 'wrapDateLine': true
  } 
  );
  map.addLayers([gmap,test]);
 } 
     

   By the way,i want to know:Does the "tilesorigin" work right in geoserver
2.0.2,it seems no changes when i use it in geoserver 2.0  bu it works in
geoserver 1.7.5.(my English is pool ,maybe i cannot discribe the problem
clearly,but i really need your help),thank you all! 
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/A-problem-about-overlayers-tp5366694p5366694.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list