title: How do I add WMS to OpenLayers 5.3.0?
body: <p>I am trying to integrate a WMS overlay onto my default OpenLayers map. Using just the <code>ol.source.OSM({})</code> layer the map renders fine, but when I add the WMS layer to the <code>layers: []</code> array it just gives me a blank map. I am using the following code but it isn't working, what do I need to change?
  </p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css" type="text/css"&gt;
      &lt;style&gt;
        .map {
          height: 100%;
          width: 100%;
        }
      &lt;/style&gt;
      &lt;script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"&gt;&lt;/script&gt;
      &lt;title&gt;OpenLayers example&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;h2&gt;WMS Map&lt;/h2&gt;
      &lt;div id="map" class="map"&gt;&lt;/div&gt;
      &lt;script type="text/javascript"&gt;
        var map = new ol.Map({
          target: 'map',
          layers: [
              new ol.layer.Tile(
                  {
                      source: new ol.source.OSM({})
                  }),
              new ol.layer.ImageWMS(
                  {
                      source: new ol.source.ImageWMS(
                      {
                          url: 'http://www.igeo.pt/WMS/Geologia/CGP1M'
                      })
                  })
          ],
          view: new ol.View(
              {
                  center: ol.proj.fromLonLat([37.41, 8.82]),
                  zoom: 4
              })
        });
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>