hi,<br>&nbsp;&nbsp;&nbsp; I&#39;ve tried to set the extend for my map all the night, but failed.<br>&nbsp;&nbsp;&nbsp; I set google map, world map and my own map as base maps, than i can select one from the control box. But the problem is , my map is too small——it&#39;s my university&#39;s map, and other two maybe too large. With the default setting of extent from a tutorial, I have to zoom at least 20 times to find my dormitory, else all my campus is a pixel. I&#39;ve tried &quot;SphericalMercator.forwardMercator&quot;, it failed too. Maybe I understand it in the wrong way. Here is the stuff:<br>
&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; var map;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function init() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map(&#39;map&#39;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ext1 = OpenLayers.Layer.SphericalMercator.forwardMercator(114.330527, 30.46327);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ext2 = OpenLayers.Layer.SphericalMercator.forwardMercator(114.366537, 30.48481);&nbsp;&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var options = {<br>&nbsp;&nbsp;&nbsp; projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>&nbsp;&nbsp;&nbsp; units: &quot;m&quot;,<br>
&nbsp;&nbsp;&nbsp; maxResolution: 156543.0339,<br>&nbsp;&nbsp; // maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxExtent: new OpenLayers.Bounds(ext1.lon, ext1.lat, ext2.lon, ext2.lat)<br><br>};<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map1 = new OpenLayers.Layer.MapServer( &quot;OpenLayers WMS&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="http://kuja.oicp.net/cgi-bin/mapserv.exe">http://kuja.oicp.net/cgi-bin/mapserv.exe</a>?&quot;, { <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- &lt;script type=&quot;<a href="http://127.1/cgi-bin/mapserv.exe">http://127.1/cgi-bin/mapserv.exe</a>?&quot;, { ##for local--&gt;<br>&nbsp;map: &#39;/ms4w/hzau/maps/map.map&#39;} );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map2 = new OpenLayers.Layer.MapServer( &quot;OpenLayers WMS&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="http://kuja.oicp.net/cgi-bin/mapserv.exe">http://kuja.oicp.net/cgi-bin/mapserv.exe</a>?&quot;, { <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- &lt;script type=&quot;<a href="http://127.1/cgi-bin/mapserv.exe">http://127.1/cgi-bin/mapserv.exe</a>?&quot;, { ##for local--&gt;<br>
&nbsp;map: &#39;/ms4w/hzau/maps/123.map&#39;} );<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gsat = new OpenLayers.Layer.Google(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Google Satellite&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {type: G_SATELLITE_MAP}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br><br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayers([map1, map2, gsat]);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.setCenter(new OpenLayers.LonLat(114.349125, 30.475885), 2);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br><br>Did I set sth wrong? Otherwise I have to calculate the extent with calc.exe, silly way but may effects.<br>
Besides, i added <br>&#39;wms_srs&#39;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;EPSG:4326 EPSG:900913&#39;<br>to all my mapfiles , and &lt;900913...&gt; to proj.&nbsp; , but still it seem to be a little drift-- 0.3 cm on my screen,&nbsp; i missed sth ?<br>
<br>Any helpful information will be appreciated. Tks in advance.<br><br>ps. this is my site, but it won&#39;t be available all the time, i share a adsl 2m with my roommates<br><a href="http://kuja.oicp.net">http://kuja.oicp.net</a><br>
<br>the testpage, mapserver&#39;s layer with gmap (which bothered me the whole night)<br><a href="http://kuja.oicp.net/lite4.html">http://kuja.oicp.net/lite4.html</a><br>