Hi Guys,<div><br></div><div>I've tried to overlay the lance-modis daily wms image with openlayers, but i've got the tiles position are not correct like seen on the picture below.</div><div><img src="cid:ii_13ba7ca42ac0cc45" alt="Inline image 1"> </div>
<div>and my code to initiate the layer are :</div><div><div>var Terra250_721 = new OpenLayers.Layer.MapServer( "Terra250m_MODIS-bands7,2,1", </div><div>            <span class="Apple-tab-span" style="white-space:pre">       </span>"<a href="http://lance-modis.eosdis.nasa.gov/cgi-bin/mapserv.cgi?map_layer[Terra250_721]=DATA+terr_721">http://lance-modis.eosdis.nasa.gov/cgi-bin/mapserv.cgi?map_layer[Terra250_721]=DATA+terr_721</a>"+ "_2012348" + ".vrt",</div>
<div>            <span class="Apple-tab-span" style="white-space:pre">  </span>{</div><div>            <span class="Apple-tab-span" style="white-space:pre">                </span>layers:"Terra250_721",</div><div>            <span class="Apple-tab-span" style="white-space:pre">         </span>format: "image/jpeg;mode=24bit",</div>
<div>            <span class="Apple-tab-span" style="white-space:pre">          </span>map: 'rrglobal_terra250_721.map',</div><div>            <span class="Apple-tab-span" style="white-space:pre">                </span>// srsName : 'EPSG:900913',</div>
<div>            <span class="Apple-tab-span" style="white-space:pre">          </span>transparent: true</div><div>            <span class="Apple-tab-span" style="white-space:pre">                </span></div><div>            <span class="Apple-tab-span" style="white-space:pre"> </span>},{</div>
<div>            <span class="Apple-tab-span" style="white-space:pre">          </span>isBaseLayer: false,</div><div>            <span class="Apple-tab-span" style="white-space:pre">              </span>opacity : 0.5,</div><div>            <span class="Apple-tab-span" style="white-space:pre">           </span>getURL : getwmsurl</div>
<div>            <span class="Apple-tab-span" style="white-space:pre">  </span>});</div><div><span class="Apple-tab-span" style="white-space:pre">          </span>    </div><div><span class="Apple-tab-span" style="white-space:pre">         </span>    </div>
<div><span class="Apple-tab-span" style="white-space:pre">              </span>    APP.map.addLayer(Terra250_721);</div><div><span class="Apple-tab-span" style="white-space:pre">          </span>    APP.map.addControl( new OpenLayers.Control.LayerSwitcher() );</div>
</div><div><br></div><div><br></div><div><br></div><div><div>function getwmsurl(bounds){</div><div><span class="Apple-tab-span" style="white-space:pre">                          </span>// console.log(bounds);</div><div><span class="Apple-tab-span" style="white-space:pre">                              </span>// console.log(this.map.getResolution());</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>bounds.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));</div><div><span class="Apple-tab-span" style="white-space:pre">                              </span>// console.log(parseFloat(bounds.left).toFixed(2)+"+"+parseFloat(bounds.bottom).toFixed(2)+"+"+parseFloat(bounds.right).toFixed(2)+"+"+parseFloat(bounds.top).toFixed(2));</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>var url = this.url;</div><div><span class="Apple-tab-span" style="white-space:pre">                          </span>url += "&layers="+this.params.layers;</div><div>
<span class="Apple-tab-span" style="white-space:pre">                         </span>url += "&map="+this.params.map;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>url += "&mode="+this.params.mode;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>url += "&map_imagetype="+this.params.map_imagetype;</div><div><span class="Apple-tab-span" style="white-space:pre">                            </span>url += "&mapext="+parseFloat(bounds.left).toFixed(2)+"+"+parseFloat(bounds.bottom).toFixed(2)+"+"+parseFloat(bounds.right).toFixed(2)+"+"+parseFloat(bounds.top).toFixed(2);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>url += "&imgext="+parseFloat(bounds.left).toFixed(2)+"+"+parseFloat(bounds.bottom).toFixed(2)+"+"+parseFloat(bounds.right).toFixed(2)+"+"+parseFloat(bounds.top).toFixed(2);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>url += "&map_size=256+256";</div><div><span class="Apple-tab-span" style="white-space:pre">                            </span>url += "&imgx=128";</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>url += "&imgy=128";</div><div><span class="Apple-tab-span" style="white-space:pre">                            </span>url += "&imgxy=256+256";</div>
<div><span class="Apple-tab-span" style="white-space:pre">                              </span>return url;</div><div><span class="Apple-tab-span" style="white-space:pre">                  </span>}</div></div><div><br></div><div>any idea what wrong with that?</div>
<div><br></div><div>Thanks,</div><div><br></div>