Shorter module paths for default exports
This commit is contained in:
@@ -7,7 +7,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {string} code The SRS identifier code, e.g. `EPSG:4326`.
|
||||
* @property {module:ol/proj/Units~Units|string} [units] Units. Required unless a
|
||||
* @property {module:ol/proj/Units|string} [units] Units. Required unless a
|
||||
* proj4 projection is defined for `code`.
|
||||
* @property {module:ol/extent~Extent} [extent] The validity extent for the SRS.
|
||||
* @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.
|
||||
@@ -66,9 +66,9 @@ const Projection = function(options) {
|
||||
* `this.extent_` and `this.worldExtent_` must be configured properly for each
|
||||
* tile.
|
||||
* @private
|
||||
* @type {module:ol/proj/Units~Units}
|
||||
* @type {module:ol/proj/Units}
|
||||
*/
|
||||
this.units_ = /** @type {module:ol/proj/Units~Units} */ (options.units);
|
||||
this.units_ = /** @type {module:ol/proj/Units} */ (options.units);
|
||||
|
||||
/**
|
||||
* Validity extent of the projection in projected coordinates. For projections
|
||||
@@ -116,7 +116,7 @@ const Projection = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {module:ol/tilegrid/TileGrid~TileGrid}
|
||||
* @type {module:ol/tilegrid/TileGrid}
|
||||
*/
|
||||
this.defaultTileGrid_ = null;
|
||||
|
||||
@@ -158,7 +158,7 @@ Projection.prototype.getExtent = function() {
|
||||
|
||||
/**
|
||||
* Get the units of this projection.
|
||||
* @return {module:ol/proj/Units~Units} Units.
|
||||
* @return {module:ol/proj/Units} Units.
|
||||
* @api
|
||||
*/
|
||||
Projection.prototype.getUnits = function() {
|
||||
@@ -226,7 +226,7 @@ Projection.prototype.setGlobal = function(global) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {module:ol/tilegrid/TileGrid~TileGrid} The default tile grid.
|
||||
* @return {module:ol/tilegrid/TileGrid} The default tile grid.
|
||||
*/
|
||||
Projection.prototype.getDefaultTileGrid = function() {
|
||||
return this.defaultTileGrid_;
|
||||
@@ -234,7 +234,7 @@ Projection.prototype.getDefaultTileGrid = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid The default tile grid.
|
||||
* @param {module:ol/tilegrid/TileGrid} tileGrid The default tile grid.
|
||||
*/
|
||||
Projection.prototype.setDefaultTileGrid = function(tileGrid) {
|
||||
this.defaultTileGrid_ = tileGrid;
|
||||
|
||||
@@ -20,7 +20,7 @@ const Units = {
|
||||
/**
|
||||
* Meters per unit lookup table.
|
||||
* @const
|
||||
* @type {Object.<module:ol/proj/Units~Units, number>}
|
||||
* @type {Object.<module:ol/proj/Units, number>}
|
||||
* @api
|
||||
*/
|
||||
export const METERS_PER_UNIT = {};
|
||||
|
||||
@@ -45,7 +45,7 @@ export const WORLD_EXTENT = [-180, -85, 180, 85];
|
||||
* Projection object for web/spherical Mercator (EPSG:3857).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/proj/Projection~Projection}
|
||||
* @extends {module:ol/proj/Projection}
|
||||
* @param {string} code Code.
|
||||
*/
|
||||
function EPSG3857Projection(code) {
|
||||
@@ -67,7 +67,7 @@ inherits(EPSG3857Projection, Projection);
|
||||
* Projections equal to EPSG:3857.
|
||||
*
|
||||
* @const
|
||||
* @type {Array.<module:ol/proj/Projection~Projection>}
|
||||
* @type {Array.<module:ol/proj/Projection>}
|
||||
*/
|
||||
export const PROJECTIONS = [
|
||||
new EPSG3857Projection('EPSG:3857'),
|
||||
|
||||
@@ -40,7 +40,7 @@ export const METERS_PER_UNIT = Math.PI * RADIUS / 180;
|
||||
* OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/proj/Projection~Projection}
|
||||
* @extends {module:ol/proj/Projection}
|
||||
* @param {string} code Code.
|
||||
* @param {string=} opt_axisOrientation Axis orientation.
|
||||
*/
|
||||
@@ -62,7 +62,7 @@ inherits(EPSG4326Projection, Projection);
|
||||
* Projections equal to EPSG:4326.
|
||||
*
|
||||
* @const
|
||||
* @type {Array.<module:ol/proj/Projection~Projection>}
|
||||
* @type {Array.<module:ol/proj/Projection>}
|
||||
*/
|
||||
export const PROJECTIONS = [
|
||||
new EPSG4326Projection('CRS:84'),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object.<string, module:ol/proj/Projection~Projection>}
|
||||
* @type {Object.<string, module:ol/proj/Projection>}
|
||||
*/
|
||||
let cache = {};
|
||||
|
||||
@@ -20,7 +20,7 @@ export function clear() {
|
||||
/**
|
||||
* Get a cached projection by code.
|
||||
* @param {string} code The code for the projection.
|
||||
* @return {module:ol/proj/Projection~Projection} The projection (if cached).
|
||||
* @return {module:ol/proj/Projection} The projection (if cached).
|
||||
*/
|
||||
export function get(code) {
|
||||
return cache[code] || null;
|
||||
@@ -30,7 +30,7 @@ export function get(code) {
|
||||
/**
|
||||
* Add a projection to the cache.
|
||||
* @param {string} code The projection code.
|
||||
* @param {module:ol/proj/Projection~Projection} projection The projection to cache.
|
||||
* @param {module:ol/proj/Projection} projection The projection to cache.
|
||||
*/
|
||||
export function add(code, projection) {
|
||||
cache[code] = projection;
|
||||
|
||||
@@ -23,8 +23,8 @@ export function clear() {
|
||||
* Registers a conversion function to convert coordinates from the source
|
||||
* projection to the destination projection.
|
||||
*
|
||||
* @param {module:ol/proj/Projection~Projection} source Source.
|
||||
* @param {module:ol/proj/Projection~Projection} destination Destination.
|
||||
* @param {module:ol/proj/Projection} source Source.
|
||||
* @param {module:ol/proj/Projection} destination Destination.
|
||||
* @param {module:ol/proj~TransformFunction} transformFn Transform.
|
||||
*/
|
||||
export function add(source, destination, transformFn) {
|
||||
@@ -42,8 +42,8 @@ export function add(source, destination, transformFn) {
|
||||
* projection to the destination projection. This method is used to clean up
|
||||
* cached transforms during testing.
|
||||
*
|
||||
* @param {module:ol/proj/Projection~Projection} source Source projection.
|
||||
* @param {module:ol/proj/Projection~Projection} destination Destination projection.
|
||||
* @param {module:ol/proj/Projection} source Source projection.
|
||||
* @param {module:ol/proj/Projection} destination Destination projection.
|
||||
* @return {module:ol/proj~TransformFunction} transformFn The unregistered transform.
|
||||
*/
|
||||
export function remove(source, destination) {
|
||||
|
||||
Reference in New Issue
Block a user