You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>OpenLayers has an ability to display raster data from WMS, WMTS, static images and many other sources in a different coordinate system than delivered from the server.
74
-
Transformation of the map projections of the image happens directly in a web browser.
73
+
<p>OpenLayers can display raster data from WMS, WMTS, static images, and many other sources in a different coordinate system than delivered from the server. In cases where the source projection differs from the map view projection, source data can be reprojected on the client (in the browser).</p>
74
+
<p>OpenLayers comes with built-in support for transforming coordinates (and reprojecting rasters) between a handful of projections or coordinate reference systems.</p>
75
+
<p>The built-in reprojection support applies to the following projections:</p>
<li>WGS 84 / Web or Spherical Mercator (<code>EPSG:3857</code>)</li>
79
+
<li>WGS 84 / Universal Transverse Mercator (<code>EPSG:32601</code> through <code>EPSG:32660</code> and <code>EPSG:32701</code> through <code>EPSG:32760</code>)</li>
80
+
</ul>
81
+
<p>For transforms between other, non-built-in projections, the Proj4js library can be used.</p>
82
+
<p>Transformation of the map projections of the image happens directly in a web browser.
75
83
The view in any Proj4js supported coordinate reference system is possible and previously incompatible layers can now be combined and overlaid.</p>
76
84
<h1id="usage">Usage</h1>
77
-
<p>The API usage is very simple. Just specify proper projection (e.g. using<ahref="https://epsg.io">EPSG</a>code) on <code>ol/View</code>:</p>
85
+
<p>The API usage for built-in projection support involves specifying the projection identifier on the source and the view. String<ahref="https://epsg.io">EPSG codes</a>can be used to identify the projections:</p>
78
86
<pre><codeclass="language-js">import Map from 'ol/Map.js';
79
87
import TileLayer from 'ol/layer/Tile.js';
80
88
import TileWMS from 'ol/source/TileWMS.js';
<p>The easiest way to use a custom projection is to add the <ahref="http://proj4js.org/">Proj4js</a> library to your project and then define the projection using a proj4 definition string. It can be installed with</p>
120
+
<p>The easiest way to use a custom projection (one that doesn't have built-in support) is to add the <ahref="http://proj4js.org/">Proj4js</a> library to your project and then define the projection using a proj4 definition string. It can be installed with</p>
113
121
<pre><code>npm install proj4
114
122
</code></pre>
115
123
<p>Following example shows definition of a <ahref="https://epsg.io/27700">British National Grid</a>:</p>
0 commit comments