[OpenLayers-Users] Openlayers with mapserv
Christopher Schmidt
crschmidt at metacarta.com
Mon Aug 20 17:34:20 EDT 2007
On Mon, Aug 20, 2007 at 05:13:47PM -0400, Paul Spencer wrote:
> James,
>
> I think your units might need to be lower case ('dd') and your
> maxResolution is missing a decimal after the 1 (it should be 1.46095).
The former wouldn't actually matter (scale, by default, is the only
thing affected by units) but the latter definitely would.
-- Chris
> Cheers
>
> Paul
>
> On 20-Aug-07, at 4:12 PM, James McManus McManus wrote:
>
> > I am attempting to use OpenLayers with mapserver. I have been able
> > to bring up the OL zoom and directional buttons, but my maps are
> > not appearing. Somethings is incorrect in how I am trying to access
> > mapserver and the mapfile. However, I am not getting any server
> > errors. The same mapfile works outside of OpenLayers. When I
> > configured mapserver, I specified --with-wmsclient. Is there
> > something else I have to do to setup mapserver or the mapfile, so
> > It can be access through OpenLayers? Below is my html file:
> >
> > <html xmlns="http://www.w3.org/1999/xhtml">
> > <head>
> > <style type="text/css">
> > v\:* {
> > behavior:url(#default#VML);
> > }
> > </style>
> > <meta http-equiv="Content-Type" content="text/html;
> > charset=iso-8859-1" />
> > <script src="lib/OpenLayers.js"></script>
> > </head>
> > <body>
> > <div id="map" style="width: 400px; height: 400px"></div>
> > <script defer="defer" type="text/javascript">
> > var map = new OpenLayers.Map( 'map', {'projection':'EPSG:
> > 4326', 'units':'DD',
> > 'maxExtent': new OpenLayers.Bounds(-68.50,
> > 44.117, -68.00, 44.615),
> > 'maxResolution': 146095 } );
> > var wmsurl = "http://www.aratasystems.com/cgi-bin/mapserv?
> > map=\\mapdata\\MDI.map&"
> > var wmsmdi = new OpenLayers.Layer.WMS( "MDI", wmsurl,
> > {layers: "DEM30,ponds,streams,roads",
> > transparent:"true",format: "image/png"},
> > {tileSize: new OpenLayers.Size(400, 400),
> > buffer: 1 },
> > {'isBaseLayer':true} );
> > map.addLayer(wmsmdi);
> >
> > var MDI = new OpenLayers.LonLat(-68.5, 44.63);
> > map.setCenter(MDI, 3);
> > map.addControl(new OpenLayers.Control.LayerSwitcher());
> > </script>
> > </body>
> > </html>
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
>
> +-----------------------------------------------------------------+
> |Paul Spencer pspencer at dmsolutions.ca |
> +-----------------------------------------------------------------+
> |Chief Technology Officer |
> |DM Solutions Group Inc http://www.dmsolutions.ca/ |
> +-----------------------------------------------------------------+
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list