title: Receiving Blank MapServer Tiles in OpenLayers 3
body: <p>I’m using OL3 with mapserver…the problem I’m having is that MapServer seems to be running fine,
  I have a .map file say for “States” like this…</p>
  
  <pre><code>MAP
  IMAGETYPE      PNG24
  CONFIG "PROJ_LIB" "C:/Program Files/MapServer/projlib/"
  EXTENT         -180 -90 180 90
  SIZE           256 256
  FONTSET "E:/RCIS/Web/MapServerDlls/content/fontset.txt"
  IMAGECOLOR     255 255 255
  TRANSPARENT ON
  PROJECTION 
   AUTO
  END
              LAYER
                              GROUP "Base"
                              NAME "States"
                              TYPE POLYGON
                              STATUS ON
                              LABELCACHE ON 
                              PROCESSING 'LABEL_NO_CLIP=1' 
                              CONNECTIONTYPE PLUGIN
                              PLUGIN "msplugin_mssql2008.dll"
                              CONNECTION     "server=stbisqlr3.dvcorp.rcis.com,5208;uid=Mapping01D;pwd=9GreenSnap#4D;Initial Catalog=NATIONALDB;Integrated Security=False"
                              DATA "shape(geography),ST_NAME_MC from    NATIONALDB.sde.STATES USING INDEX STATES_SIDX USING UNIQUE STATES_ID USING   SRID=4269"
                              LABELITEM    "ST_NAME_MC"
                              CLASS
                                              STYLE                                     
                                               OUTLINECOLOR 000 153 000
                                              WIDTH 3
                                              END
                                              LABEL
                                                              COLOR 000 153 000
                                                              TYPE TRUETYPE
                                                              FONT Arial 
                                                              SIZE 12
                                                              ANTIALIAS FALSE
                                                              POSITION AUTO
                                                              PARTIALS FALSE
                                                              MINDISTANCE 2000
                                                              MINSCALEDENOM   20.00                                                               
                                              END
                              END                       
              PROJECTION 
                               AUTO
              END
              END       
  END
  </code></pre>
  
  <p>And I build my map like so in OL3…</p>
  
  <pre><code>control.map = new ol.Map({
          target: 'map',
          renderer: 'canvas',
          layers: [],
          view: new ol.View({
              projection: 'EPSG:4326',
              center: [0, 0],
              zoom: 12
          })
      });
  </code></pre>
  
  <p>Create a vector layer that determines the extent, creates the view, and shows vector objects…which works!!</p>
  
  <pre><code>vectorObjs.promise.then(function () {
          //Create empty extent
          var extent = ol.extent.createEmpty();
          //Loop through vector layers to add them to map and determine extent
  
  
          var totalExtent = ol.extent;
  
          angular.forEach(webMapValues.vectorFieldLayer, function (Field, key) {                
  
              control.map.addLayer(Field);
              extent = Field.getSource().getExtent();
              totalExtent = ol.extent.extend(extent, totalExtent);
          })
  
          control.map.getView().fit(totalExtent, control.map.getSize());
  
  
  
          var view = new ol.View({
              center: control.map.getView().getCenter(),
              zoom: 8,
              minZoom: 1,
              maxZoom: 19
  
          });
          control.map.view = view;
  </code></pre>
  
  <p>Then I try to add the states layer to the map and everything seems like it’s working but I don’t see any state tiles?</p>
  
  <pre><code>var States = new ol.layer.Tile({
              name: 'States',
              extent: totalExtent,
              source: new ol.source.TileWMS({
                 url: 'http://dvfmweb2:80/mapserver/mapserv.exe?map=E:/RCIS/Web/Mapfiles/MappingBase.map&amp;',
                  params: { 'LAYERS': 'States', 'BBOX': totalExtent, 'TILED': true }
  
              })
          });
  
          control.map.addLayer(States);
  </code></pre>
  
  <p>When I execute the call I see several line items in Chrome dev tools indicating state tiles i.e. </p>
  
  <p>When I get tiles back in chrome this is the full information.
  1.  Request URL:</p>
  
  <p>http://<em>servername</em>/mapserver/mapserv.exe?      map=E:/RCIS/Web/Mapfiles/MappingStates.map&amp;&amp;SERVICE=WMS&amp;VERSION=1.3.0&amp;REQUEST=GetMap&amp;FORMAT=image%2Fpng&amp;TRANSPARENT=true&amp;LAYERS=States&amp;BBOX=47.318115234375%2C-109.423828125%2C47.3291015625%2C-109.412841796875&amp;TILED=true&amp;WIDTH=256&amp;HEIGHT=256&amp;CRS=EPSG%3A4326&amp;STYLES</p>
  
  <ol start="2">
  <li><p>Request Method:
  GET</p></li>
  <li><p>Status Code:
  200 OK</p></li>
  </ol>
  
  <p><strong>Additional Information!!!</strong></p>
  
  <p>When I paste one of the links in that get a "200 Ok" return code I can see an error that says...</p>
  
  <pre><code>&lt;ServiceException code="InvalidSRS"&gt;
  msWMSLoadGetMapParams(): WMS server error. Invalid CRS given : CRS must be  valid for all requested layers.
  &lt;/ServiceException&gt;
  </code></pre>
  
  <p>However I just see white?</p>
  
  <p>Any help is greatly appreciated, I’ve been banging my head on this too long!!</p>
  
  <p>-Bob</p>