When i try to publish whit <a href="http://trac.openlayers.org/wiki/MappingYourData">http://trac.openlayers.org/wiki/MappingYourData</a> i get all the thin ok<br>But when i try whit my own data i only get solid gray.<br>I tray whit WMS instead of mapserver layer and the same result.
<br><br><br>this query <a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&LAYERS=Ciudad&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-22.5%2C33.75%2C-11.25%2C45&WIDTH=256&HEIGHT=256">
http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&LAYERS=Ciudad&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-22.5%2C33.75%2C-11.25%2C45&WIDTH=256&HEIGHT=256
</a><br>Return an gray box<br>when i erase BBOX=-22.5%2C33.75%2C-11.25%2C45<br><a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&LAYERS=Ciudad&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&WIDTH=256&HEIGHT=256">
http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&LAYERS=Ciudad&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&WIDTH=256&HEIGHT=256
</a><br>I get a map.<br><br>Can any one help me?.<br><br><br>my .map<br><br># Map file created from QGIS project file /var/www/mapa/unc.qgs<br># Edit this file to customize for your map interface<br>MAP<br> NAME mapa<br>
# Map image size<br> SIZE 800 600<br> UNITS METERS<br><br> EXTENT -64.196055 -31.444185 -64.179119 -31.430301<br> PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br>
'no_defs'<br> END<br><br> # Background color for the map canvas -- change as desired<br> IMAGECOLOR 192 192 192<br> IMAGEQUALITY 95<br> IMAGETYPE png<br> OUTPUTFORMAT<br> NAME png<br> DRIVER 'GD/PNG'
<br> MIMETYPE 'image/png'<br> #IMAGEMODE PC256<br> EXTENSION 'png'<br> END<br> # Legend<br> LEGEND<br> IMAGECOLOR 255 255 255<br> STATUS ON<br> KEYSIZE 18 12<br> LABEL<br> TYPE BITMAP
<br> SIZE MEDIUM<br> COLOR 0 0 89<br> END<br> END<br><br> # Web interface definition. Only the template parameter<br> # is required to display a map. See MapServer documentation<br> WEB<br> # Set IMAGEPATH to the path where MapServer should
<br> # write its output.<br> IMAGEPATH '/tmp/'<br><br> # Set IMAGEURL to the url that points to IMAGEPATH<br> # as defined in your web server configuration<br> IMAGEURL '/tmp/'<br><br> # WMS server settings
<br> METADATA<br> 'wms_title' 'mapa'<br> 'wms_onlineresource' '<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&">http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&
</a>'<br> 'wms_srs' 'EPSG:4326'<br> END<br><br> #Scale range at which web interface will operate<br> # Template and header/footer settings<br> # Only the template parameter is required to display a map. See MapServer documentation
<br> END<br><br> LAYER<br> NAME 'Ciudad'<br> TYPE POLYGON<br> DATA '/var/www/mapa/uncdata/Ciudad.shp'<br> METADATA<br> 'wms_title' 'Ciudad'<br> END<br> STATUS DEFAULT
<br> TRANSPARENCY 100<br> PROJECTION<br> 'proj=longlat'<br> 'ellps=WGS84'<br> 'datum=WGS84'<br> 'no_defs'<br> END<br> CLASS<br> NAME Ciudad <br> STYLE<br>
SYMBOL 0 <br> SIZE 6 <br> OUTLINECOLOR 0 0 0<br> COLOR 161 59 179<br> END<br> END<br> END<br><br> <br><br>END<br><br><br>My html<br><html xmlns="<a href="http://www.w3.org/1999/xhtml">
http://www.w3.org/1999/xhtml</a>"><br> <head><br> <style type="text/css"><br> #map {<br> width: 800px;<br> height: 475px;<br> border: 1px solid black;
<br> }<br> </style><br> <script src="<a href="http://openlayers.org/dev/lib/OpenLayers.js">http://openlayers.org/dev/lib/OpenLayers.js</a>"></script><br> <script type="text/javascript">
<br> <!--<br> var lon = 5;<br> var lat = 40;<br> var zoom = 5;<br> var map, layer;<br><br> function init(){<br> map = new OpenLayers.Map( 'map' );<br> layer = new
OpenLayers.Layer.WMS( "OpenLayers WMS", <br> "<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&">http://localhost/cgi-bin/mapserv?map=/var/www/mapa/unc.map&</a>
", {layers: 'Ciudad'} );<br> map.addLayer(layer);<br><br> map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);<br> map.addControl( new OpenLayers.Control.LayerSwitcher() );<br>
}<br> <br> // --><br> </script><br> </head><br> <body onload="init()"><br> <div id="map"></div><br> </body><br></html><br><br>
<br clear="all"><br>-- <br>Pablo PDA<br><a href="http://www.pablopda.com.ar/blog">http://www.pablopda.com.ar/blog</a>