Customizing the view is not a hard task; it manly consists of considerations regarding the nature of the project and expected outcome. For our application, wrapping the map around the x axis is completely needless. Also, we can restrict the extent to the projection's extent. In the first example, called ch06_customize
, we make such modifications in our application. First, we disable the layer wrapping in our base layers:
var map = new ol.Map({ […] new ol.layer.Tile({ source: new ol.source.TileWMS({ […] wrapX: false […] new ol.layer.Vector({ source: new ol.source.Vector({ […] wrapX: false }),