Methods
(static) reproject(geometry, source, target) → {ol.geom.Geometry}
Gets a reprojected geometry without side effects (the original geometry is cloned).
Parameters:
Name | Type | Description |
---|---|---|
geometry |
ol.geom.Geometry | |
source |
ol.proj.Projection | string | The current (=original) projection of the geometry. |
target |
ol.proj.Projection | string | The target (=destination) projection to which the geometry will be transformed. |
- Source:
Returns:
The reprojected geometry as new independed Object.
- Type
- ol.geom.Geometry
Example
// Reprojects the given geometry from EPSG:31287 to EPSG:3875
const reprojectedGeom = reproject(myGeom, 'EPSG:31287','EPSG:3875');