Get rid of olx.js and typedef.js typedefs for ol
This commit is contained in:
@@ -8,7 +8,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
|
||||
* Projection definition class. One of these is created for each projection
|
||||
* supported in the application and stored in the {@link ol.proj} namespace.
|
||||
* You can use these in applications, but this is not required, as API params
|
||||
* and options use {@link ol.ProjectionLike} which means the simple string
|
||||
* and options use {@link module:ol/proj~ProjectionLike} which means the simple string
|
||||
* code will suffice.
|
||||
*
|
||||
* You can use {@link ol.proj.get} to retrieve the object for a particular
|
||||
@@ -54,7 +54,7 @@ const Projection = function(options) {
|
||||
* with `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in
|
||||
* tile pixel space.
|
||||
* @private
|
||||
* @type {ol.Extent}
|
||||
* @type {module:ol/extent~Extent}
|
||||
*/
|
||||
this.extent_ = options.extent !== undefined ? options.extent : null;
|
||||
|
||||
@@ -63,7 +63,7 @@ const Projection = function(options) {
|
||||
* `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in
|
||||
* projected coordinate space.
|
||||
* @private
|
||||
* @type {ol.Extent}
|
||||
* @type {module:ol/extent~Extent}
|
||||
*/
|
||||
this.worldExtent_ = options.worldExtent !== undefined ?
|
||||
options.worldExtent : null;
|
||||
@@ -89,7 +89,7 @@ const Projection = function(options) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {function(number, ol.Coordinate):number|undefined}
|
||||
* @type {function(number, module:ol/coordinate~Coordinate):number|undefined}
|
||||
*/
|
||||
this.getPointResolutionFunc_ = options.getPointResolution;
|
||||
|
||||
@@ -127,7 +127,7 @@ Projection.prototype.getCode = function() {
|
||||
|
||||
/**
|
||||
* Get the validity extent for this projection.
|
||||
* @return {ol.Extent} Extent.
|
||||
* @return {module:ol/extent~Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
Projection.prototype.getExtent = function() {
|
||||
@@ -159,7 +159,7 @@ Projection.prototype.getMetersPerUnit = function() {
|
||||
|
||||
/**
|
||||
* Get the world extent for this projection.
|
||||
* @return {ol.Extent} Extent.
|
||||
* @return {module:ol/extent~Extent} Extent.
|
||||
* @api
|
||||
*/
|
||||
Projection.prototype.getWorldExtent = function() {
|
||||
@@ -222,7 +222,7 @@ Projection.prototype.setDefaultTileGrid = function(tileGrid) {
|
||||
|
||||
/**
|
||||
* Set the validity extent for this projection.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @api
|
||||
*/
|
||||
Projection.prototype.setExtent = function(extent) {
|
||||
@@ -233,7 +233,7 @@ Projection.prototype.setExtent = function(extent) {
|
||||
|
||||
/**
|
||||
* Set the world extent for this projection.
|
||||
* @param {ol.Extent} worldExtent World extent
|
||||
* @param {module:ol/extent~Extent} worldExtent World extent
|
||||
* [minlon, minlat, maxlon, maxlat].
|
||||
* @api
|
||||
*/
|
||||
@@ -245,7 +245,7 @@ Projection.prototype.setWorldExtent = function(worldExtent) {
|
||||
/**
|
||||
* Set the getPointResolution function (see {@link ol.proj#getPointResolution}
|
||||
* for this projection.
|
||||
* @param {function(number, ol.Coordinate):number} func Function
|
||||
* @param {function(number, module:ol/coordinate~Coordinate):number} func Function
|
||||
* @api
|
||||
*/
|
||||
Projection.prototype.setGetPointResolution = function(func) {
|
||||
@@ -255,7 +255,7 @@ Projection.prototype.setGetPointResolution = function(func) {
|
||||
|
||||
/**
|
||||
* Get the custom point resolution function for this projection (if set).
|
||||
* @return {function(number, ol.Coordinate):number|undefined} The custom point
|
||||
* @return {function(number, module:ol/coordinate~Coordinate):number|undefined} The custom point
|
||||
* resolution function (if set).
|
||||
*/
|
||||
Projection.prototype.getPointResolutionFunc = function() {
|
||||
|
||||
@@ -25,7 +25,7 @@ export const HALF_SIZE = Math.PI * RADIUS;
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {ol.Extent}
|
||||
* @type {module:ol/extent~Extent}
|
||||
*/
|
||||
export const EXTENT = [
|
||||
-HALF_SIZE, -HALF_SIZE,
|
||||
@@ -35,7 +35,7 @@ export const EXTENT = [
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {ol.Extent}
|
||||
* @type {module:ol/extent~Extent}
|
||||
*/
|
||||
export const WORLD_EXTENT = [-180, -85, 180, 85];
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export const RADIUS = 6378137;
|
||||
* Extent of the EPSG:4326 projection which is the whole world.
|
||||
*
|
||||
* @const
|
||||
* @type {ol.Extent}
|
||||
* @type {module:ol/extent~Extent}
|
||||
*/
|
||||
export const EXTENT = [-180, -90, 180, 90];
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {isEmpty} from '../obj.js';
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<string, !Object.<string, ol.TransformFunction>>}
|
||||
* @type {!Object.<string, Object.<string, module:ol/proj~TransformFunction>>}
|
||||
*/
|
||||
let transforms = {};
|
||||
|
||||
@@ -25,7 +25,7 @@ export function clear() {
|
||||
*
|
||||
* @param {ol.proj.Projection} source Source.
|
||||
* @param {ol.proj.Projection} destination Destination.
|
||||
* @param {ol.TransformFunction} transformFn Transform.
|
||||
* @param {module:ol/proj~TransformFunction} transformFn Transform.
|
||||
*/
|
||||
export function add(source, destination, transformFn) {
|
||||
const sourceCode = source.getCode();
|
||||
@@ -44,7 +44,7 @@ export function add(source, destination, transformFn) {
|
||||
*
|
||||
* @param {ol.proj.Projection} source Source projection.
|
||||
* @param {ol.proj.Projection} destination Destination projection.
|
||||
* @return {ol.TransformFunction} transformFn The unregistered transform.
|
||||
* @return {module:ol/proj~TransformFunction} transformFn The unregistered transform.
|
||||
*/
|
||||
export function remove(source, destination) {
|
||||
const sourceCode = source.getCode();
|
||||
@@ -62,7 +62,7 @@ export function remove(source, destination) {
|
||||
* Get a transform given a source code and a destination code.
|
||||
* @param {string} sourceCode The code for the source projection.
|
||||
* @param {string} destinationCode The code for the destination projection.
|
||||
* @return {ol.TransformFunction|undefined} The transform function (if found).
|
||||
* @return {module:ol/proj~TransformFunction|undefined} The transform function (if found).
|
||||
*/
|
||||
export function get(sourceCode, destinationCode) {
|
||||
let transform;
|
||||
|
||||
Reference in New Issue
Block a user