From 75a3adccce4ec3c59f469db85fa7fdf0d7f7c6b9 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 14 Feb 2022 14:09:49 +0100 Subject: [PATCH] Add useGeographic() and setUserProjection() to the API --- src/ol/proj.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ol/proj.js b/src/ol/proj.js index fb19ed996a..9071ef9360 100644 --- a/src/ol/proj.js +++ b/src/ol/proj.js @@ -539,18 +539,17 @@ let userProjection = null; /** * Set the projection for coordinates supplied from and returned by API methods. - * Note that this method is not yet a part of the stable API. Support for user - * projections is not yet complete and should be considered experimental. + * This includes all API methods except for those interacting with tile grids. * @param {ProjectionLike} projection The user projection. + * @api */ export function setUserProjection(projection) { userProjection = get(projection); } /** - * Clear the user projection if set. Note that this method is not yet a part of - * the stable API. Support for user projections is not yet complete and should - * be considered experimental. + * Clear the user projection if set. + * @api */ export function clearUserProjection() { userProjection = null; @@ -561,15 +560,16 @@ export function clearUserProjection() { * Note that this method is not yet a part of the stable API. Support for user * projections is not yet complete and should be considered experimental. * @return {Projection|null} The user projection (or null if not set). + * @api */ export function getUserProjection() { return userProjection; } /** - * Use geographic coordinates (WGS-84 datum) in API methods. Note that this - * method is not yet a part of the stable API. Support for user projections is - * not yet complete and should be considered experimental. + * Use geographic coordinates (WGS-84 datum) in API methods. This includes all API + * methods except for those interacting with tile grids. + * @api */ export function useGeographic() { setUserProjection('EPSG:4326');