Thanks for your helpful tip. I saw this format from a old post, so i thought it might be the right way to do with mapfile. Anyway, after changing the code, the worldmap file(from tutorial) works pretty well. But my file's output turned into an odd way. like in this screenshot<br>
<a href="http://img.album.pchome.net/00/06/47/89/4450279983314c88777d269a340264a6.png">http://img.album.pchome.net/00/06/47/89/4450279983314c88777d269a340264a6.png</a><br> Within the border, only a little dot exits.<br><br>
Projection issue, I know this from FAQ and some old posts. But still, I can't understand. My shp files were built under WGS84. And I want to integrate my base map and google earth's hybid image. So I chose longitude&latitude as my extend. Openlayer's default projection type is epsg 4326 which matches WGS84, right?<br>
<br>Besides, the extent vaules in either my mapfile or worldmap's is in latitude&longitude format. <br>this is image link of my mapfile's <br><a href="http://127.1/cgi-bin/mapserv.exe?layers=Shp_Lakes&map=%2Fms4w%2Fapps%2Fmap.map&mode=map&map_imagetype=png&mapext=112.5+22.5+123.75+33.75&imgext=112.5+22.5+123.75+33.75&map_size=256+256&imgx=128&imgy=128&imgxy=256+256">http://127.1/cgi-bin/mapserv.exe?layers=Shp_Lakes&map=%2Fms4w%2Fapps%2Fmap.map&mode=map&map_imagetype=png&mapext=112.5+22.5+123.75+33.75&imgext=112.5+22.5+123.75+33.75&map_size=256+256&imgx=128&imgy=128&imgxy=256+256</a><br>
and the mapfile<br><br>MAP<br> NAME hzau<br> # Map image size<br> SIZE 800 800<br> <br> EXTENT 114.327181 30.454108 114.363140 30.495525<br> PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br>
'no_defs'<br><br>world map's<br><a href="http://127.1/cgi-bin/mapserv.exe?layers=Shp_Lakes&map=%2Fms4w%2Fapps%2F123.map&mode=map&map_imagetype=png&mapext=-90+0+-45+45&imgext=-90+0+-45+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256">http://127.1/cgi-bin/mapserv.exe?layers=Shp_Lakes&map=%2Fms4w%2Fapps%2F123.map&mode=map&map_imagetype=png&mapext=-90+0+-45+45&imgext=-90+0+-45+45&map_size=256+256&imgx=128&imgy=128&imgxy=256+256</a><br>
also the mapfile<br>NAME world<br> # Map image size<br> SIZE 800 800<br><br> EXTENT -179.999900 -90 179.999900 90<br> PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br>
'no_defs'<br><br>I guess with the openlayer's default extent, the export image should be a little small, not a dot(still a dot after zooming for 5 times)<br>Or I should just set extent manually?<br><br>best wish<br>
<br><div class="gmail_quote">2008/5/6 Christian López Espínola <<a href="mailto:penyaskito@gmail.com">penyaskito@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Chen,<br>
<div class="Ih2E3d"><br>
On Tue, May 6, 2008 at 8:31 AM, Chen kuja <<a href="mailto:eiclkun@gmail.com">eiclkun@gmail.com</a>> wrote:<br>
> map = new OpenLayers.Map( 'map' );<br>
> layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS",<br>
> "<a href="http://127.1/cgi-bin/mapserv.exe" target="_blank">http://127.1/cgi-bin/mapserv.exe</a>?", { layers:<br>
> 'Shp_Lakes',<br>
> map: 'map=/ms4w/apps/map.map'} );<br>
> map.addLayer(layer);<br>
<br>
</div>Try with<br>
<div class="Ih2E3d">> map: '/ms4w/apps/map.map'} );<br>
> map.addLayer(layer);<br>
<br>
<br>
</div>--<br>
Regards,<br>
<font color="#888888"><br>
Christian López Espínola<br>
</font></blockquote></div><br>