<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=656472816-13052008><FONT face=Arial 
color=#0000ff size=2>Hi Chen,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=656472816-13052008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=656472816-13052008><FONT face=Arial 
color=#0000ff size=2>try this</FONT></SPAN></DIV>
<DIV dir=ltr align=left>var gsat = new OpenLayers.Layer.Google("Google 
Satellite", {type: G_SATELLITE_MAP,<SPAN class=656472816-13052008> 
</SPAN>'sphericalMercator': true});&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</DIV>
<DIV><SPAN 
class=656472816-13052008></SPAN>instead&nbsp;of&nbsp;your&nbsp;line</DIV>
<DIV>
<DIV dir=ltr align=left>var gsat = new OpenLayers.Layer.Google("Google 
Satellite", {type: G_SATELLITE_MAP, },{'sphericalMercator': 
true});&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </DIV><SPAN 
class=656472816-13052008></SPAN><BR><!-- Converted from text/plain format -->
<P><FONT size=2>Mit freundlichen Grüssen<BR><BR>Arnd Wippermann<BR><A 
href="http://gis.ibbeck.de/ginfo/">http://gis.ibbeck.de/ginfo/</A><BR><BR></FONT></P></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> eiclkun@gmail.com 
[mailto:eiclkun@gmail.com] <BR><B>Gesendet:</B> Dienstag, 13. Mai 2008 
16:14<BR><B>An:</B> Arnd Wippermann<BR><B>Cc:</B> 
users@openlayers.org<BR><B>Betreff:</B> Re: [OpenLayers-Users] Set extent for 
mapserver's layer with gmap(Chen kuja)<BR></FONT><BR></DIV>
<DIV></DIV>Thanks for the better code. But things getting weird here. my mapfile 
displayed pretty well as epsg900913(i can see the different from epsg 4326) 
under the "map.setCenter(new 
OpenLayers.LonLat(12728934.108387556,3564373.2839840306), 15);" -- as it should 
be, it's 900913. However, as for the gmap, it seems require "&nbsp;&nbsp; 
map.setCenter(new OpenLayers.LonLat( 114.350503, 30.475874), 10);" --- the 
normal lon&amp;lat, not google's own coordinate system. It dizzied my for hours. 
with this, it is impossible for me to integrate those two map.<BR><BR>I can't 
find much example like local mapserver file and gmap, so I wonder in which steps 
i did wrong?<BR>here is the code<BR>&nbsp; &lt;script 
type="text/javascript"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
var map, layer;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
function init() {<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; var options = 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
projection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 
"EPSG:900913",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
maxExtent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : new 
OpenLayers.Bounds(-120037508.34, -120037508.34, 120037508.34, 
120037508.34),<BR>&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp; 
maxExtent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : new 
OpenLayers.Bounds(12727216.047735045, 3563238.963082024, 12731224.662598498, 
3566021.113954254),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
maxResolution&nbsp;&nbsp;&nbsp;&nbsp; : 
156543.0339,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
maxZoomLevel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 
35,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
numZoomLevels&nbsp;&nbsp;&nbsp;&nbsp; : 
35,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
units&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 
"m",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
controls&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 
[]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = 
new OpenLayers.Map( 
'map',options);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//&nbsp;&nbsp;&nbsp;&nbsp; var base = new OpenLayers.Layer.MapServer( "Base 
Layer", "<A 
href="http://127.1/cgi-bin/mapserv.exe">http://127.1/cgi-bin/mapserv.exe</A>?",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gsat 
= new OpenLayers.Layer.Google("Google Satellite", {type: G_SATELLITE_MAP, 
},{'sphericalMercator': true});&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; var gsat = 
new OpenLayers.Layer.Google("Google Satellite",{type: G_SATELLITE_MAP, 
});<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.addLayers([gsat]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//&nbsp; 
map.addLayers([gsat]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
map.addControl(new OpenLayers.Control.PanZoomBar(), new 
OpenLayers.Pixel(2,30));<BR>&nbsp;&nbsp;&nbsp; map.addControl(new 
OpenLayers.Control.LayerSwitcher());<BR>&nbsp;&nbsp;&nbsp; map.addControl(new 
OpenLayers.Control.MouseDefaults());<BR>&nbsp;&nbsp;&nbsp; map.addControl(new 
OpenLayers.Control.MousePosition({element:document.getElementById("rota"), 
numdigits:3}));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp; map.setCenter(new 
OpenLayers.LonLat(12728934.108387556,3564373.2839840306), 15);<BR>&nbsp;&nbsp; 
map.setCenter(new OpenLayers.LonLat( 114.350503, 30.475874), 
10);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp; &lt;/script&gt;<BR><BR>ps. Last afternoon, a earthquake 
stroke South Sichuan, China. It's about 1000km away from my university, but 
still I can felt the terrible shaking for 1 minute. It even spread to my home in 
Shanghai. I spent 3 hours, tyring to call my friends in Chengdu&amp;Chongqing. 
Luckily, they are all alright. But I know ,&nbsp; 10 thousands had died, more 
still buried. GOD BLESS THEM<BR></BODY></HTML>