[OpenLayers-Users] Openlayers displa.. size of the map very
small.
ptang83 at yahoo.com
ptang83 at yahoo.com
Tue Apr 15 16:50:19 EDT 2008
> If I use openlayers to display, it looks like this.
>
> http://www.imagewoof.com/view_image/2ba4e1329/oplayers-display.bmp
Image URL:http://localhost/cgi-bin/mapserv.exe?map=C%3A%2FProgram%20Files%2Fms4w%2FApache%2Fhtdocs%2FMSrecipes%2Fusa1.map&mode=map&map_imagetype=png&mapext=-180+-90+0+90&imgext=-180+-90+0+90&map_size=256+256&imgx=128&imgy=128&imgxy=256+256
-------------------
>
> If I don't use openlayers then it looks like this.
>
> http://www.imagewoof.com/view_image/daacb1312/withoutopenlayers.JPG
Image URL: http://localhost/tmp/48051462_2c10_0.png
Thanks!
--- On Tue, 4/15/08, ptang83 at yahoo.com <ptang83 at yahoo.com> wrote:
> From: ptang83 at yahoo.com <ptang83 at yahoo.com>
> Subject: [OpenLayers-Users] Openlayers displa.. size of the map very small.
> To: users at openlayers.org
> Date: Tuesday, April 15, 2008, 3:06 PM
> I downloaded a demo which display a nice map through
> mapserver. The image is like this.
> http://www.mobilegeographics.com/mapserver/usa1.phtml
>
> The image is big and nice.
>
> When I changed it to display throught openlayers. The
> openlayer map only display a blank windows with all
> controls. If I change the "proj=lcc" to
> "proj=latlong" , then it display a map but the
> size of the map is very small and only occupied the upper
> lift corner of the openlayers div. Is there any way to make
> display fit the windows?
>
> Would like to take any suggestion. Thanks in advance!
>
> =========
> usa1.html
> ===========
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> // <title>My Test MapServer Layer</title>
> <style type="text/css">
> #map {
> width: 800px;
> height: 500px;
> border: 1px solid black;
> }
> </style>
>
> <script type="text/javascript"
> src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script>
>
> <script
> src="http://openlayers.org/dev/lib/OpenLayers.js"></script>
> <script type="text/javascript">
> <!--
> var map, layer;
>
> function init(){
> map = new OpenLayers.Map( 'map' );
> layer = new OpenLayers.Layer.MapServer(
> "OpenLayers WMS",
>
> "http://localhost/cgi-bin/mapserv.exe",
> {map: 'C:/Program
> Files/ms4w/Apache/htdocs/MSrecipes/usa1.map'} );
> // {map: 'C:/Program
> Files/ms4w/Apache/htdocs/usa1.map'} );
>
> map.addLayer(layer);
> map.zoomToMaxExtent();
> }
> // -->
> </script>
> </head>
> <body onload="init()">
> <div id="map"></div>
> </body>
> </html>
>
>
> ============
> map file
> ==============
>
> MAP
> NAME USA1
> STATUS ON
> SIZE 800 500
> IMAGETYPE PNG
> IMAGECOLOR 240 240 240
> SHAPEPATH "C:\oatdir\statesp020.tar"
> EXTENT -8000000 300000 5000000 1500000
> UNITS METERS
> PROJECTION
> "proj=latlong" "lat_1=32"
> "lat_2=44" "lat_0=38"
> "lon_0=-100" "x_0=0" "y_0=0"
> "ellps=GRS80" "datum=NAD83"
> END
> WEB
> IMAGEPATH "C:\Program
> Files\ms4w\Apache\htdocs\tmp\"
> IMAGEURL "/tmp/"
> END
>
> LAYER
> NAME "US state boundaries"
> TYPE POLYGON
> STATUS DEFAULT
> DATA
> 'C:\oatdir\statesp020.tar\statesp020'
>
> PROJECTION
> "proj=latlong"
> "ellps=GRS80"
> "datum=NAD83"
> END
> CLASS
> NAME "US states"
> OUTLINECOLOR 60 60 60
> COLOR 255 255 0
> SYMBOL 0
> END
> END
>
>
>
> END
>
>
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
More information about the Users
mailing list