From 34d16fd4d26e671b5ad4f320f1453fc89d032440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Wed, 15 Aug 2018 12:38:23 -0400 Subject: [PATCH] fix(ol): add gulp command to fix openlayers --- .../auth/auth-form/auth-form.component.html | 10 +- .../app/geo/catalog/catalog.component.html | 2 +- demo/src/app/geo/search/search.component.html | 2 +- gulpfile.js | 11 + package-lock.json | 240 ++++++++++-------- package.json | 1 + .../lib/overlay/shared/overlay.directive.ts | 2 +- .../geo/src/lib/wkt/shared/wkt.service.ts | 28 +- 8 files changed, 160 insertions(+), 136 deletions(-) diff --git a/demo/src/app/auth/auth-form/auth-form.component.html b/demo/src/app/auth/auth-form/auth-form.component.html index 0c54bf7a1b..7e87eaea70 100644 --- a/demo/src/app/auth/auth-form/auth-form.component.html +++ b/demo/src/app/auth/auth-form/auth-form.component.html @@ -2,15 +2,7 @@ Auth Authentification -

* Dependencies: LanguageService

- -
-    
-bla bla
-bal
-  blas
-    
-
+

* Dependencies: ConfigService, LanguageService

Authentification form

diff --git a/demo/src/app/geo/catalog/catalog.component.html b/demo/src/app/geo/catalog/catalog.component.html index a465f765c7..7d1a60ff38 100644 --- a/demo/src/app/geo/catalog/catalog.component.html +++ b/demo/src/app/geo/catalog/catalog.component.html @@ -2,7 +2,7 @@ Geo Catalog -

* Dependencies: LanguageService

+

* Dependencies: ConfigService, LanguageService

diff --git a/demo/src/app/geo/search/search.component.html b/demo/src/app/geo/search/search.component.html index 7deb57c50d..8a3428e9a7 100644 --- a/demo/src/app/geo/search/search.component.html +++ b/demo/src/app/geo/search/search.component.html @@ -2,7 +2,7 @@ Geo Search -

* Dependencies: LanguageService

+

* Dependencies: ConfigService, LanguageService

diff --git a/gulpfile.js b/gulpfile.js index c86d01f69a..0d8a5ec065 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,6 +5,7 @@ const exec = require('gulp-exec'); const merge = require('gulp-merge-json'); const gulpSequence = require('gulp-sequence'); const jeditor = require('gulp-json-editor'); +const replace = require('gulp-replace'); const package = require('./package.json'); const version = package.version; @@ -313,6 +314,15 @@ gulp.task('bumpVersion', [ // ========================================================== +gulp.task('geo:fixOL', () => { + gulp + .src(['./node_modules/ol/proj.js']) + .pipe(replace('@typedef {module:ol/proj/Projection', '@typedef {')) + .pipe(gulp.dest('./node_modules/ol/')); +}); + +// ========================================================== + gulp.task( 'core', gulpSequence( @@ -346,6 +356,7 @@ gulp.task( 'geo', gulpSequence( 'geo:clean', + 'geo:fixOL', ['geo:copyAssets', 'geo:copyStyles', 'geo:copyLocale'], ['geo:bundleStyles'], 'core:bundleLocale' diff --git a/package-lock.json b/package-lock.json index 19ba6031de..c782ea2fcd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -206,8 +206,8 @@ "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", "dev": true, "requires": { - "micromatch": "^2.1.5", - "normalize-path": "^2.0.0" + "micromatch": "2.3.11", + "normalize-path": "2.1.1" } }, "arr-diff": { @@ -216,7 +216,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "^1.0.1" + "arr-flatten": "1.1.0" } }, "array-unique": { @@ -231,9 +231,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" } }, "chokidar": { @@ -242,15 +242,15 @@ "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", "dev": true, "requires": { - "anymatch": "^1.3.0", - "async-each": "^1.0.0", - "fsevents": "^1.0.0", - "glob-parent": "^2.0.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^2.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0" + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" } }, "expand-brackets": { @@ -259,7 +259,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "^0.1.0" + "is-posix-bracket": "0.1.1" } }, "extglob": { @@ -268,7 +268,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "glob-parent": { @@ -277,7 +277,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "^2.0.0" + "is-glob": "2.0.1" } }, "is-extglob": { @@ -292,7 +292,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "1.0.0" } }, "kind-of": { @@ -301,7 +301,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "^1.1.5" + "is-buffer": "1.1.6" } }, "micromatch": { @@ -310,19 +310,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" } }, "minimist": { @@ -1283,6 +1283,12 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" }, + "binaryextensions": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.1.tgz", + "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==", + "dev": true + }, "bl": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz", @@ -3870,6 +3876,12 @@ "jsbn": "0.1.1" } }, + "editions": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", + "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", + "dev": true + }, "editor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz", @@ -4978,6 +4990,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", + "optional": true, "requires": { "nan": "2.10.0", "node-pre-gyp": "0.9.1" @@ -4986,23 +4999,21 @@ "abbrev": { "version": "1.1.1", "bundled": true, - "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "dev": true + "bundled": true }, "aproba": { "version": "1.2.0", "bundled": true, - "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", "bundled": true, + "optional": true, "requires": { "delegates": "1.0.0", "readable-stream": "2.3.6" @@ -5010,49 +5021,41 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "dev": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, "chownr": { "version": "1.0.1", "bundled": true, - "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "dev": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "dev": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "dev": true + "bundled": true }, "core-util-is": { "version": "1.0.2", "bundled": true, - "dev": true, "optional": true }, "debug": { "version": "2.6.9", "bundled": true, - "dev": true, "optional": true, "requires": { "ms": "2.0.0" @@ -5061,24 +5064,22 @@ "deep-extend": { "version": "0.4.2", "bundled": true, - "dev": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, - "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, - "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", "bundled": true, + "optional": true, "requires": { "minipass": "2.2.4" } @@ -5086,12 +5087,12 @@ "fs.realpath": { "version": "1.0.0", "bundled": true, - "dev": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "optional": true, "requires": { "aproba": "1.2.0", "console-control-strings": "1.1.0", @@ -5106,6 +5107,7 @@ "glob": { "version": "7.1.2", "bundled": true, + "optional": true, "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -5118,30 +5120,28 @@ "has-unicode": { "version": "2.0.1", "bundled": true, - "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.21", "bundled": true, - "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": "2.1.2" } }, "ignore-walk": { "version": "3.0.1", "bundled": true, - "dev": true, "optional": true, "requires": { - "minimatch": "^3.0.4" + "minimatch": "3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, + "optional": true, "requires": { "once": "1.4.0", "wrappy": "1.0.2" @@ -5149,41 +5149,35 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "dev": true + "bundled": true }, "ini": { "version": "1.3.5", "bundled": true, - "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "isarray": { "version": "1.0.0", "bundled": true, - "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, - "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "dev": true + "bundled": true }, "minipass": { "version": "2.2.4", @@ -5196,6 +5190,7 @@ "minizlib": { "version": "1.1.0", "bundled": true, + "optional": true, "requires": { "minipass": "2.2.4" } @@ -5203,7 +5198,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "dev": true, "requires": { "minimist": "0.0.8" } @@ -5211,23 +5205,22 @@ "ms": { "version": "2.0.0", "bundled": true, - "dev": true, "optional": true }, "needle": { "version": "2.2.0", "bundled": true, - "dev": true, "optional": true, "requires": { - "debug": "^2.1.2", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" } }, "node-pre-gyp": { "version": "0.9.1", "bundled": true, + "optional": true, "requires": { "detect-libc": "1.0.3", "mkdirp": "0.5.1", @@ -5244,32 +5237,30 @@ "nopt": { "version": "4.0.1", "bundled": true, - "dev": true, "optional": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, "npm-bundled": { "version": "1.0.3", "bundled": true, - "dev": true, "optional": true }, "npm-packlist": { "version": "1.1.10", "bundled": true, - "dev": true, "optional": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" } }, "npmlog": { "version": "4.1.2", "bundled": true, + "optional": true, "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -5279,13 +5270,11 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "dev": true + "bundled": true }, "object-assign": { "version": "4.1.1", "bundled": true, - "dev": true, "optional": true }, "once": { @@ -5298,40 +5287,36 @@ "os-homedir": { "version": "1.0.2", "bundled": true, - "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, - "dev": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, - "dev": true, "optional": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "path-is-absolute": { "version": "1.0.1", "bundled": true, - "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", "bundled": true, - "dev": true, "optional": true }, "rc": { "version": "1.2.6", "bundled": true, + "optional": true, "requires": { "deep-extend": "0.4.2", "ini": "1.3.5", @@ -5342,7 +5327,6 @@ "minimist": { "version": "1.2.0", "bundled": true, - "dev": true, "optional": true } } @@ -5350,6 +5334,7 @@ "readable-stream": { "version": "2.3.6", "bundled": true, + "optional": true, "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -5363,79 +5348,73 @@ "rimraf": { "version": "2.6.2", "bundled": true, + "optional": true, "requires": { "glob": "7.1.2" } }, "safe-buffer": { "version": "5.1.1", - "bundled": true, - "dev": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, - "dev": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, - "dev": true, "optional": true }, "semver": { "version": "5.5.0", "bundled": true, - "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, - "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, - "dev": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, - "dev": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { "version": "1.1.1", "bundled": true, - "dev": true, "optional": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.1" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, - "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-json-comments": { "version": "2.0.1", - "bundled": true + "bundled": true, + "optional": true }, "tar": { "version": "4.4.1", "bundled": true, + "optional": true, "requires": { "chownr": "1.0.1", "fs-minipass": "1.2.5", @@ -5448,11 +5427,13 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "wide-align": { "version": "1.1.2", "bundled": true, + "optional": true, "requires": { "string-width": "1.0.2" } @@ -6427,6 +6408,17 @@ } } }, + "gulp-replace": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.0.0.tgz", + "integrity": "sha512-lgdmrFSI1SdhNMXZQbrC75MOl1UjYWlOWNbNRnz+F/KHmgxt3l6XstBoAYIdadwETFyG/6i+vWUSCawdC3pqOw==", + "dev": true, + "requires": { + "istextorbinary": "2.2.1", + "readable-stream": "2.3.6", + "replacestream": "4.0.3" + } + }, "gulp-sequence": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gulp-sequence/-/gulp-sequence-1.0.0.tgz", @@ -7865,6 +7857,17 @@ "handlebars": "4.0.11" } }, + "istextorbinary": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz", + "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", + "dev": true, + "requires": { + "binaryextensions": "2.1.1", + "editions": "1.3.4", + "textextensions": "2.2.0" + } + }, "jasmine": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.8.0.tgz", @@ -11652,6 +11655,17 @@ "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", "dev": true }, + "replacestream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", + "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1", + "readable-stream": "2.3.6" + } + }, "request": { "version": "2.85.0", "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", @@ -13307,6 +13321,12 @@ "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==", "dev": true }, + "textextensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.2.0.tgz", + "integrity": "sha512-j5EMxnryTvKxwH2Cq+Pb43tsf6sdEgw6Pdwxk83mPaq0ToeFJt6WE4J3s5BqY7vmjlLgkgXvhtXUxo80FyBhCA==", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", diff --git a/package.json b/package.json index 5cb675d477..4ac4057e27 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "gulp-exec": "^3.0.2", "gulp-json-editor": "^2.4.2", "gulp-merge-json": "^1.3.1", + "gulp-replace": "^1.0.0", "gulp-sequence": "^1.0.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", diff --git a/projects/geo/src/lib/overlay/shared/overlay.directive.ts b/projects/geo/src/lib/overlay/shared/overlay.directive.ts index 781aa6c51c..9bf2213ddc 100644 --- a/projects/geo/src/lib/overlay/shared/overlay.directive.ts +++ b/projects/geo/src/lib/overlay/shared/overlay.directive.ts @@ -3,7 +3,7 @@ import { Subscription } from 'rxjs'; import olFormatGeoJSON from 'ol/format/GeoJSON'; import * as olextent from 'ol/extent'; -import * as olproj from 'ol/proj.js'; +import * as olproj from 'ol/proj'; import { IgoMap } from '../../map/shared/map'; import { MapBrowserComponent } from '../../map/map-browser/map-browser.component'; diff --git a/projects/geo/src/lib/wkt/shared/wkt.service.ts b/projects/geo/src/lib/wkt/shared/wkt.service.ts index 8621c62b31..b04423f78b 100644 --- a/projects/geo/src/lib/wkt/shared/wkt.service.ts +++ b/projects/geo/src/lib/wkt/shared/wkt.service.ts @@ -1,12 +1,8 @@ import { Injectable } from '@angular/core'; -import { - get as getProj, - transform as transformProj, - transformExtent -} from 'ol/proj.js'; -import WKT from 'ol/format/WKT'; -import Polygon from 'ol/geom/Polygon'; +import * as olproj from 'ol/proj'; +import olWKT from 'ol/format/WKT'; +import olPolygon from 'ol/geom/Polygon'; import { MapService } from '../../map/shared/map.service'; @@ -17,18 +13,18 @@ export class WktService { constructor(private mapService: MapService) {} public mapExtentToWKT(epsgTO = this.mapService.getMap().projection) { - let extent = transformExtent( + let extent = olproj.transformExtent( this.mapService.getMap().getExtent(), this.mapService.getMap().projection, epsgTO ); extent = this.roundCoordinateArray(extent, epsgTO, 0); - const wkt = new WKT().writeGeometry(Polygon.fromExtent(extent)); + const wkt = new olWKT().writeGeometry(olPolygon.fromExtent(extent)); return wkt; } private roundCoordinateArray(coordinateArray, projection, decimal = 0) { - const lproj = getProj(projection); + const lproj = olproj.get(projection); const units = lproj.getUnits(); const olUnits = ['ft', 'm', 'us-ft']; if (olUnits.indexOf(units) !== -1) { @@ -181,18 +177,22 @@ export class WktService { coord['ur'] = [coord['ul'][0], coord['ul'][1] - unitPerType_SN]; coord['ll'] = [coord['ul'][0] + unitPerType_EW, coord['ul'][1]]; - coord.ul = transformProj([coord.ul[0], coord.ul[1]], 'EPSG:4326', epsgTO); - coord['lr'] = transformProj( + coord.ul = olproj.transform( + [coord.ul[0], coord.ul[1]], + 'EPSG:4326', + epsgTO + ); + coord['lr'] = olproj.transform( [coord['lr'][0], coord['lr'][1]], 'EPSG:4326', epsgTO ); - coord['ur'] = transformProj( + coord['ur'] = olproj.transform( [coord['ur'][0], coord['ur'][1]], 'EPSG:4326', epsgTO ); - coord['ll'] = transformProj( + coord['ll'] = olproj.transform( [coord['ll'][0], coord['ll'][1]], 'EPSG:4326', epsgTO