<!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> </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});
</DIV>
<DIV><SPAN
class=656472816-13052008></SPAN>instead of your line</DIV>
<DIV>
<DIV dir=ltr align=left>var gsat = new OpenLayers.Layer.Google("Google
Satellite", {type: G_SATELLITE_MAP, },{'sphericalMercator':
true}); </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 "
map.setCenter(new OpenLayers.LonLat( 114.350503, 30.475874), 10);" --- the
normal lon&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> <script
type="text/javascript"><BR>
var map, layer;<BR>
function init() {<BR> <BR> var options =
{<BR>
projection :
"EPSG:900913",<BR>
maxExtent : new
OpenLayers.Bounds(-120037508.34, -120037508.34, 120037508.34,
120037508.34),<BR> //
maxExtent : new
OpenLayers.Bounds(12727216.047735045, 3563238.963082024, 12731224.662598498,
3566021.113954254),<BR>
maxResolution :
156543.0339,<BR>
maxZoomLevel :
35,<BR>
numZoomLevels :
35,<BR>
units :
"m",<BR>
controls :
[]<BR>
};<BR> map =
new OpenLayers.Map(
'map',options);<BR>
// 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>
<BR> var gsat
= new OpenLayers.Layer.Google("Google Satellite", {type: G_SATELLITE_MAP,
},{'sphericalMercator': true});
<BR>
<BR> // var gsat =
new OpenLayers.Layer.Google("Google Satellite",{type: G_SATELLITE_MAP,
});<BR>
map.addLayers([gsat]);<BR>
//
map.addLayers([gsat]);<BR>
map.addControl(new OpenLayers.Control.PanZoomBar(), new
OpenLayers.Pixel(2,30));<BR> map.addControl(new
OpenLayers.Control.LayerSwitcher());<BR> map.addControl(new
OpenLayers.Control.MouseDefaults());<BR> map.addControl(new
OpenLayers.Control.MousePosition({element:document.getElementById("rota"),
numdigits:3}));<BR> // map.setCenter(new
OpenLayers.LonLat(12728934.108387556,3564373.2839840306), 15);<BR>
map.setCenter(new OpenLayers.LonLat( 114.350503, 30.475874),
10);<BR> };<BR>
<BR> </script><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&Chongqing.
Luckily, they are all alright. But I know , 10 thousands had died, more
still buried. GOD BLESS THEM<BR></BODY></HTML>