Remove opt_ prefix
This commit is contained in:
+8
-10
@@ -77,14 +77,13 @@ export const PROJECTIONS = [
|
||||
* Transformation from EPSG:4326 to EPSG:3857.
|
||||
*
|
||||
* @param {Array<number>} input Input array of coordinate values.
|
||||
* @param {Array<number>} [opt_output] Output array of coordinate values.
|
||||
* @param {number} [opt_dimension] Dimension (default is `2`).
|
||||
* @param {Array<number>} [output] Output array of coordinate values.
|
||||
* @param {number} [dimension] Dimension (default is `2`).
|
||||
* @return {Array<number>} Output array of coordinate values.
|
||||
*/
|
||||
export function fromEPSG4326(input, opt_output, opt_dimension) {
|
||||
export function fromEPSG4326(input, output, dimension) {
|
||||
const length = input.length;
|
||||
const dimension = opt_dimension > 1 ? opt_dimension : 2;
|
||||
let output = opt_output;
|
||||
dimension = dimension > 1 ? dimension : 2;
|
||||
if (output === undefined) {
|
||||
if (dimension > 2) {
|
||||
// preserve values beyond second dimension
|
||||
@@ -110,14 +109,13 @@ export function fromEPSG4326(input, opt_output, opt_dimension) {
|
||||
* Transformation from EPSG:3857 to EPSG:4326.
|
||||
*
|
||||
* @param {Array<number>} input Input array of coordinate values.
|
||||
* @param {Array<number>} [opt_output] Output array of coordinate values.
|
||||
* @param {number} [opt_dimension] Dimension (default is `2`).
|
||||
* @param {Array<number>} [output] Output array of coordinate values.
|
||||
* @param {number} [dimension] Dimension (default is `2`).
|
||||
* @return {Array<number>} Output array of coordinate values.
|
||||
*/
|
||||
export function toEPSG4326(input, opt_output, opt_dimension) {
|
||||
export function toEPSG4326(input, output, dimension) {
|
||||
const length = input.length;
|
||||
const dimension = opt_dimension > 1 ? opt_dimension : 2;
|
||||
let output = opt_output;
|
||||
dimension = dimension > 1 ? dimension : 2;
|
||||
if (output === undefined) {
|
||||
if (dimension > 2) {
|
||||
// preserve values beyond second dimension
|
||||
|
||||
@@ -36,14 +36,14 @@ export const METERS_PER_UNIT = (Math.PI * RADIUS) / 180;
|
||||
class EPSG4326Projection extends Projection {
|
||||
/**
|
||||
* @param {string} code Code.
|
||||
* @param {string} [opt_axisOrientation] Axis orientation.
|
||||
* @param {string} [axisOrientation] Axis orientation.
|
||||
*/
|
||||
constructor(code, opt_axisOrientation) {
|
||||
constructor(code, axisOrientation) {
|
||||
super({
|
||||
code: code,
|
||||
units: 'degrees',
|
||||
extent: EXTENT,
|
||||
axisOrientation: opt_axisOrientation,
|
||||
axisOrientation: axisOrientation,
|
||||
global: true,
|
||||
metersPerUnit: METERS_PER_UNIT,
|
||||
worldExtent: EXTENT,
|
||||
|
||||
Reference in New Issue
Block a user