title: Show only an area using openlayer and OSM
body: <p>I found this Question <a href="https://stackoverflow.com/questions/28117281/show-only-united-states-when-using-leaflet-js-and-osm">Show only United States when using Leaflet.js and OSM</a> which is exactly what I'm looking for but the problem is I don't use leaflet. Currently using OpenLayers at the moment, saw some example <a href="https://openlayers.org/en/latest/examples/" rel="nofollow noreferrer">here</a> but no luck any ideas?</p>
  
  <pre><code>    &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()
        })
      ],
      view: new ol.View({
        center: ol.proj.fromLonLat([125.126012,6.066714]),
        zoom: 17,
        minZoom: 17,
        maxZoom: 18
      })
    });
  &lt;/script&gt;
  </code></pre>