[OpenLayers-Users] Pink Tile Killing Me

Lee Keel lee_keel at trimble.com
Fri Jan 18 10:22:53 EST 2008


Hello all.  I have been working with the mapserver list still trying to figure out this problem.  Here is where I am at and I am hoping some one can help.
 
If I use http://webserver/cgi-bin/mapserv.exe?map=/mapserver/pc/gas.map&layers=basemap+basemap_anno <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/pc/gas.map&layers=basemap+basemap_anno> ) then all of my layers seem to be working at any zoom level.  But if I go to my openlayers application, they don't always work.  If you get a layer not working in the OL app and check the URL, it doesn't seem to be incorrect.  So what is the difference between OL requesting from mapserver based on a bbox and the HTML below requesting an image from mapserver?
 
Thanks,
LK
 
URL that does work:
http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1590156.159945,431001.073325,1592973.40603875,432515.7217625&WIDTH=1023&HEIGHT=550 <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1590156.159945,431001.073325,1592973.40603875,432515.7217625&WIDTH=1023&HEIGHT=550>  <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1590156.159945,431001.073325,1592973.40603875,432515.7217625&WIDTH=1023&HEIGHT=550 <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1590156.159945,431001.073325,1592973.40603875,432515.7217625&WIDTH=1023&HEIGHT=550> >

URL that does not work:
http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1591212.6272301562,431569.0664890625,1591916.9387535937,431947.7285984375&WIDTH=1023&HEIGHT=550 <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1591212.6272301562,431569.0664890625,1591916.9387535937,431947.7285984375&WIDTH=1023&HEIGHT=550>  <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1591212.6272301562,431569.0664890625,1591916.9387535937,431947.7285984375&WIDTH=1023&HEIGHT=550 <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/panamacity/gas.map&LAYERS=basemap_anno&TRANSPARENT=true&FORMAT=image%2Fgif&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2238&BBOX=1591212.6272301562,431569.0664890625,1591916.9387535937,431947.7285984375&WIDTH=1023&HEIGHT=550> >

For the URL that does not work, here is the response:
<html><head><title>Error</title></head><body><head><title>Error in CGI Application</title></head>
<body><h1>CGI Error</h1>The specified CGI application misbehaved by not returning a complete set of HTTP
 headers.</body></body></html>

 
Map File Settings for WEB:
 WEB
  TEMPLATE  'gas.html'
  IMAGEPATH "d:/ms4w/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
  LOG "gas.log"
  METADATA
   wms_title "WMS"
   wms_onlineresource "http://webserver/cgi-bin/mapserv.exe?map=/mapserver/pc/gas.map <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/pc/gas.map>  <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/pc/gas.map <http://webserver/cgi-bin/mapserv.exe?map=/mapserver/pc/gas.map> > &"
   "wms_srs" "EPSG:2238"
   "WMS_FEATURE_INFO_MIME_TYPE" "text/html"
  end
 END

Gas.HTML File that is being used:
<html xmlns="http://www.w3.org/1999/xhtml <https://portal.trimble.com/exchweb/bin/redir.asp?URL=http://www.w3.org/1999/xhtml>  <http://www.w3.org/1999/xhtml <https://portal.trimble.com/exchweb/bin/redir.asp?URL=http://www.w3.org/1999/xhtml> > ">
<head>
  <meta name="generator" content="HTML Tidy for Windows (vers 1st June 2004), see www.w3.org <http://www.w3.org <https://portal.trimble.com/exchweb/bin/redir.asp?URL=http://www.w3.org> > " />
  <title>MapServer Workshop (panamacity)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
</head>
<body bgcolor="#FFFFFF" text="#000000">
  <h3></h3>
  <!-- START OF MAPSERVER FORM -->
  <form name="mapserv" method="get" action="http://webserver/cgi-bin/mapserv.exe <http://webserver/cgi-bin/mapserv.exe>  <http://webserver/cgi-bin/mapserv.exe <http://webserver/cgi-bin/mapserv.exe> > " id="mapserv">
    <!-- HIDDEN MAPSERVER CGI VARIABLES -->
    <input type="hidden" name="map" value="[map]" />
 <input type="hidden" name="imgext" value="[mapext]" />
 <input type="hidden" name="imgxy" value="199.5 149.5" />

    <table>
      <tr>
        <td>
          <!-- SPECIFY MAP MODE -->
          <div align="center">Map Mode:
            <select name="mode">
     <option value="browse">Browse</option>
     <option value="map">Map</option>
            </select>
            Layers: <input type="TEXT" name="layers" value="[layers]" />
          </div>
        </td>
        <td>
          <!-- FORM SUBMIT BUTTON -->
          <div align="center">
            <input type="submit" name="submit" value="Refresh" />
          </div>
        </td>
        <td>
          <!-- ZOOM/PAN CONTROLS -->
          <div align="center">Map Control:
            <select name="zoom">
              <option value="4" [zoom_4_select]>Zoom In 4x</option>
              <option value="3" [zoom_3_select]>Zoom In 3x</option>
              <option value="2" [zoom_2_select]>Zoom In 2x</option>
              <option value="1" [zoom_1_select]>Recenter</option>
              <option value="-2" [zoom_-2_select]>Zoom Out 2x</option>
              <option value="-3" [zoom_-3_select]>Zoom Out 3x</option>
              <option value="-4" [zoom_-4_select]>Zoom Out 4x</option>
            </select>
          </div>
        </td>
        <td rowspan="2" valign="top">
          <!-- <p>Reference:<br />
           <img name="ref" src="[ref]" id="ref" />
    </p> -->
    <p>Legend:<br />
           <img name="legend" src="[legend]" id="legend" />
    </p>
        </td>
      </tr>
      <tr>
        <!-- DISPLAY THE MAPSERVER-CREATED MAP IMAGE -->
        <td colspan="3" align="center" valign="top">
          <input type="image" name="img" src="[img]" width="800" height="600" border="0" />
          <table border="0" width="600" align="center">
            <!-- DISPLAY THE SCALE BAR -->
            <tr>
              <td align="right"><!-- <img src="[scalebar]" /> --></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>

 <input name="mapxy" type="text" value="[mapx] [mapy]" />
  </form>
 
  <p>Map scale 1:[scale]</p>
  <p>Pixel size [cellsize]</p>
  <p>Extents [minx], [miny], [maxx], [maxy]</p>
  <p>Map size (screen) [mapsize]</p>
  <p>Map width [mapwidth]</p>
  <p>Map height [mapheight]</p>
  <p>Map [map]</p>
  <p>Layers [layers]</p>
</body>
</html>
<plaintext>


________________________________

From: users-bounces at openlayers.org on behalf of Andrew de klerk
Sent: Wed 1/16/2008 2:30 AM
To: users at openlayers.org
Subject: Re: [OpenLayers-Users] Pink Tile Killing Me




To add to what Chris said. If you right click on the image and choose
properties and then copy the url and paste it into a new browser window -
what happens - do you get an error returned or an image?. That will allow
you to test it outside openlayers and determine if it is a mapserver
problem.

Andrew





More information about the Users mailing list