diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 7e3c9ccc69..3fa1deaed3 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -3343,6 +3343,7 @@
/types/oembed-parser/ @BendingBender
/types/ofe/ @Morfent
/types/office-js/ @OfficeDev @LanceEA @Zlatkovsky @kbrandl @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT
+/types/office-js-preview @OfficeDev @Zlatkovsky @kbrandl @Rick-Kirkham @AlexJerabek @ElizabethSamuel-MSFT
/types/office-runtime/ @Zlatkovsky @mscharlock
/types/offline-js/ @cgwrench
/types/oibackoff/ @geoffreak
diff --git a/README.md b/README.md
index a9be0471a1..026994fdd5 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
Also see the [definitelytyped.org](http://definitelytyped.org) website, although information in this README is more up-to-date.
-*You can also read this README in [Spanish](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) and [Korean!](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md)*
+*You can also read this README in [Spanish](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md), [Korean](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md), and [Russian](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ru.md)!*
## What are declaration files?
@@ -169,10 +169,10 @@ If a package was never on DefinitelyTyped, it does not need to be added to `notN
#### Lint
-All new packages must be linted. To lint a package, add a `tslint.json` to that package containing
+All new packages must be linted. To lint a package, add a `tslint.json` to that package containing
```js
-{
- "extends": "dtslint/dt.json"
+{
+ "extends": "dtslint/dt.json"
}
```
diff --git a/README.ru.md b/README.ru.md
new file mode 100644
index 0000000000..b90bdeac7c
--- /dev/null
+++ b/README.ru.md
@@ -0,0 +1,353 @@
+
+
+# DefinitelyTyped [](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped)
+
+[](https://gitter.im/borisyankov/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+> Репозиторий для *высококачественных* определений типов TypeScript.
+
+Также посетите веб-сайт [definitelytyped.org](http://definitelytyped.org), хотя информация в этом README более свежая.
+
+*Вы также можете прочитать этот README на [английском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md), [испанском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) and [корейском](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md).*
+
+## Что такое файлы декларации (файлы описания/объявления типов)?
+
+Смотрите [руководство по TypeScript](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html).
+
+## Как их получить?
+
+### npm
+
+Это предпочтительный метод. Это доступно только для пользователей TypeScript 2.0+. Например:
+
+```sh
+npm install --save-dev @types/node
+```
+
+Затем типы должны автоматически включаться компилятором.
+Подробнее смотрите в [справочнике](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html).
+
+Для пакета NPM "foo", описания будут находиться в "@types/foo".
+Если вы не можете найти свой пакет, ищите его в [TypeSearch](https://microsoft.github.io/TypeSearch/).
+
+Если вы все еще не можете найти его, проверьте [включает](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) ли пакет собственную типизацию.
+Обычно это отражается в поле `"types"` или `"typings"` файла `package.json`, или просто ищите любые файлы ".d.ts" в пакете и вручную включайте их в `/// `.
+
+
+### Другие методы
+
+Эти методы могут быть использованы TypeScript 1.0.
+
+* [Typings](https://github.com/typings/typings)
+* ~~[NuGet](http://nuget.org/packages?q=DefinitelyTyped)~~ (используйте предпочтительные альтернативы, публикация типа nuget DT отключена)
+* Вручную загрузите из ветки `master` этого репозитория
+
+Возможно, вам придется добавить ручные [ссылки](http://www.typescriptlang.org/docs/handbook/triple-slash-directives.html).
+
+
+## Как я могу внести свой вклад?
+
+DefinitelyTyped работает только благодаря вкладу таких пользователей, как вы!
+
+### Тестирование
+
+Прежде чем поделиться своим улучшением с миром, используйте его сами.
+
+#### Тестирование редактирования существующего пакета
+
+Для добавления новых функций вы можете использовать [разрешение модулей](http://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation).
+Вы также можете напрямую редактировать типы в `node_modules/@types/foo/index.d.ts`, или скопировать их оттуда и выполнить следующие шаги.
+
+
+#### Тестирование ногово пакета
+
+Добавьте к вашему `tsconfig.json`:
+
+```json
+"baseUrl": "types",
+"typeRoots": ["types"],
+```
+
+(Вы также можете использовать `src/types`.)
+Создайте `types/foo/index.d.ts` содержащие объявления для модуля "foo".
+Теперь вы сможете импортировать из `"foo"` в свой код, и он будет направлен к новому определению типа.
+Затем запустите сборку (build) *и* запустите код, чтобы убедиться, что ваше определение типа действительно соответствует тому, что происходит во время выполнения.
+После того как вы проверили свои определения с реальным кодом, создайте [Запрос на принятие изменений (PR)](#make-a-pull-request)
+и следуйте инструкциям [чтобы отредактировать существующий](#edit-an-existing-package) или
+[создать новый пакет](#create-a-new-package).
+
+
+### Запрос на принятие изменений (PR)
+
+После того, как вы проверили ваш пакет, вы можете поделиться им с DefinitelyTyped.
+
+Во-первых, [разветвите](https://guides.github.com/activities/forking/) этот репозиторий, установите [node](https://nodejs.org/), и запустите `npm install`.
+
+
+#### Изменение существующего пакета
+
+* `cd types/my-package-to-edit`
+* Внесите изменения. Не забудьте отредактировать тесты.
+ Если вы вносите критические изменения, не забудьте [обновить основную версию](#i-want-to-update-a-package-to-a-new-major-version).
+* Вы также можете добавить себя в раздел "Definitions by" заголовка пакета.
+ * Это приведет к тому, что вы будете уведомлены (через ваше имя пользователя GitHub) о том, что кто-то делает запрос на принятие изменений (PR) или проблему с пакетом.
+ * Сделайте это, добавив свое имя в конец строки, например `// Definitions by: Alice , Bob `.
+ * Или, если есть больше людей, это может быть многострочным
+
+ ```typescript
+ // Definitions by: Alice
+ // Bob
+ // Steve
+ // John
+ ```
+
+* Если есть `tslint.json`, запустите `npm run lint package-name`. В противном случае запустите `tsc` in в директории пакета.
+
+Когда вы создаете PR для редактирования существующего пакета, `dt-bot` должен @-уведомить previous authors.
+предыдущих авторов. Если этого не произойдет, вы можете сделать это самостоятельно в комментарии, связанном с PR.
+
+
+#### Созданое нового пакета
+
+Если вы являетесь автором библиотеки и ваш пакет написан на TypeScript, [свяжите автоматически сгенерированные файлы объявлений](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) в вашем пакете, а не публикуйте в DefinitelyTyped.
+
+Если вы добавляете типизацию для пакета NPM, создайте директорию с тем же именем.
+Если пакет, для которого вы добавляете типизацию, отсутствует в NPM, убедитесь, что выбранное вами имя не конфликтует с именем пакета в NPM.
+(Вы можете использовать `npm info foo` чтобы проверить наличие пакета `foo`.)
+
+Ваш пакет должен иметь такую структуру:
+
+| Файл | Назначение |
+| ------------- | ---------------------------------------------------------------------------------------------------- |
+| index.d.ts | Содержит типизацию для пакета. |
+| foo-tests.ts | Содержит пример кода, который проверяет типизацию. Этот код *не* запускается, но он проверен на тип. |
+| tsconfig.json | Позволяет вам запускать `tsc` внутри пакета. |
+| tslint.json | Включает linting. |
+
+Создайте их, запустив `npx dts-gen --dt --name my-package-name --template module` если у вас ≥ 5.2.0, `npm install -g dts-gen` и `dts-gen --dt --name my-package-name --template module` в противном случае.
+Посмотреть все варианты на [dts-gen](https://github.com/Microsoft/dts-gen).
+
+Вы можете отредактировать `tsconfig.json` чтобы добавить новые файлы, добавить `"target": "es6"` (необходимо для асинхронных функций), добавить в `"lib"`, или добавить опцию компилятора `"jsx"`.
+
+Члены группы DefinitelyTyped регулярно следят за новыми PR, но имейте в виду, что количество других PR может замедлить ход событий.
+
+Хороший пример пакета смотрите [base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/base64-js).
+
+
+#### Распространенные ошибки
+
+* Сначала следуйте советам из справочника [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html).
+* Форматирование: либо используйте все табы, либо всегда используйте 4 пробела.
+* `function sum(nums: number[]): number`: используйте `ReadonlyArray` если функция не записывает свои параметры.
+* `interface Foo { new(): Foo; }`:
+ Это определяет тип объектов, с методом `new`. Вы, вероятно, хотите объявить `declare class Foo { constructor(); }`.
+* `const Class: { new(): IClass; }`:
+ Предпочитайте использовать объявление класса `class Class { constructor(); }` вместо `new`.
+* `getMeAT(): T`:
+ Если параметр типа не отображается в типах каких-либо параметров, у вас нет универсальной функции, а просто замаскированное утверждение типа.
+ Предпочитайте использовать утверждение реального типа, например, `getMeAT() as number`.
+ Пример, где допустим параметр типа: `function id(value: T): T;`.
+ Пример, где это недопустимо: `function parseJson(json: string): T;`.
+ Исключение: `new Map()` все ОК.
+* Использование типов `Function` and `Object` почти никогда не является хорошей идеей. В 99% случаев можно указать более конкретный тип. Примеры: `(x: number) => number` для [функций](http://www.typescriptlang.org/docs/handbook/functions.html#function-types) and `{ x: number, y: number }` для объектов. Если нет никакой уверенности в типе, [`any`](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) является правильным выбором, а не `Object`. Если единственным известным фактом о типе является то, что это какой-то объект, используйте тип [`object`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#object-type), а не `Object` или `{ [key: string]: any }`.
+* `var foo: string | any`:
+ когда `any` используется в типе объединения, результирующий тип все еще `any`. Таким образом, хотя `string` часть аннотации этого типа может _выглядеть_ полезной, на самом деле она не предлагает никакой дополнительной проверки типов по сравнению с простым использованием `any`.
+ В зависимости от намерения, приемлемыми альтернативами могут быть `any`, `string`, или `string | object`.
+
+
+#### Удаление пакета
+
+Когда пакет [объединяет](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html) свои собственные типы, типы должны быть удалены из DefinitelyTyped чтобы избежать путаницы.
+
+Вы можете удалить его, запустив `npm run not-needed -- typingsPackageName asOfVersion sourceRepoURL [libraryName]`.
+
+* `typingsPackageName`: название директории, который нужно удалить.
+* `asOfVersion`: заглушка будет опубликована в `@types/foo` с этой версией. Должна быть выше, чем любая опубликованная на данный момент версия
+* `sourceRepoURL`: Это должно указывать на репозиторий, который содержит типизации.
+* `libraryName`: описательное имя библиотеки, например, "Angular 2" вместо "angular2". (Если опущено, будет идентично "typingsPackageName".)
+
+Любые другие пакеты в DefinitelyTyped которые ссылаются на удаленный пакет, должны быть обновлены для ссылки на связанные типы. Для этого добавьте в `package.json` ссыклу `"dependencies": { "foo": "x.y.z" }`.
+
+Если пакет никогда не был в DefinitelyTyped, его не нужно добавлять в `notNeededPackages.json`.
+
+
+#### Lint
+
+Все новые пакеты должны быть проанализированы lint. Для этого добавьте `tslint.json` в этот пакет, содержащий
+
+```js
+{
+ "extends": "dtslint/dt.json"
+}
+```
+
+Это должно быть единственным содержимым в файле `tslint.json` готового проекта. Если `tslint.json` отключает правила, это потому, что это еще не исправлено. Например:
+
+```js
+{
+ "extends": "dtslint/dt.json",
+ "rules": {
+ // This package uses the Function type, and it will take effort to fix.
+ "ban-types": false
+ }
+}
+```
+
+(Чтобы указать, что правило lint действительно не применяется, используйте `// tslint:disable rule-name` или лучше, `//tslint:disable-next-line rule-name`.)
+
+Чтобы проверить, что выражение имеет заданный тип, используйте `$ExpectType`. Чтобы проверить, что выражение вызывает ошибку компиляции, используйте `$ExpectError`.
+
+```js
+// $ExpectType void
+f(1);
+
+// $ExpectError
+f("one");
+```
+
+Для получения дополнительной информации см. [dtslint](https://github.com/Microsoft/dtslint#write-tests) readme.
+
+Протестируйте, запустив `npm run lint package-name` где `package-name` - это имя вашего пакета.
+Этот скрипт использует [dtslint](https://github.com/Microsoft/dtslint).
+
+
+## Часто задаваемые вопросы
+
+#### Какая связь между этим репозиторием и пакетами `@types` в NPM?
+
+Ветвь `master` автоматически публикуется в область `@types` на NPM благодаря [types-publisher](https://github.com/Microsoft/types-publisher).
+
+#### Я отправил PR. Когда он сольется?
+
+Это зависит, но большинство запросов на получение данных будут объединены в течение недели. PR, утвержденные автором, указанным в заголовке определения, обычно объединяются быстрее; PR для новых определений займет больше времени, так как они требуют большего количества проверок от сопровождающих. Каждый PR проверяется членом команды TypeScript или DefinitelyTyped перед объединением, поэтому будьте терпеливы, так как человеческий фактор может вызвать задержки. Посмотрите на [PR Burndown Board](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/3?card_filter_query=is%3Aopen) чтобы увидеть, как сопровождающие работают через открытые PR.
+
+#### Мой PR слит; когда будет обновлен пакет `@types` NPM?
+
+Пакеты NPM должны обновиться в течение нескольких часов. Если прошло более 24 часов, пингуйте @RyanCavanaugh и @andy-ms в PR, чтобы расследовать.
+
+#### Я пишу определение, которое зависит от другого определения. Должен ли я использовать `` или import?
+
+Если модуль, на который вы ссылаетесь, является внешним модулем (использует `export`), используйте import.
+Если модуль, на который вы ссылаетесь, является окружающим модулем (использует `declare module`, или просто объявляет глобальные переменные), используйте ``.
+
+#### Я заметил, что у некоторых пакетов есть `package.json`.
+
+Обычно вам это не нужно. При публикации пакета мы обычно автоматически создаем `package.json`.
+`package.json` может быть включен для определения зависимостей. Вот [пример](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/pikaday/package.json).
+Мы не разрешаем определять другие поля, такие как "description", вручную.
+Кроме того, если вам нужно сослаться на более старую версию типизаций, вы должны сделать это, добавив в `package.json` строки `"dependencies": { "@types/foo": "x.y.z" }`.
+
+#### В некоторых пакетах отсутствует `tslint.json`, а в некоторых `tsconfig.json` отсутствует `"noImplicitAny": true`, `"noImplicitThis": true`, или `"strictNullChecks": true`.
+
+Тогда они не правы. Вы можете помочь, отправив PR, чтобы исправить их.
+
+#### Могу ли я запросить определение?
+
+Вот [текущие запрошенные определения](https://github.com/DefinitelyTyped/DefinitelyTyped/labels/Definition%3ARequest).
+
+#### Как насчет определений типов для DOM?
+
+Если типы являются частью веб-стандарта, они должны быть добавлены в [TSJS-lib-generator](https://github.com/Microsoft/TSJS-lib-generator) чтобы они могли стать частью `lib.dom.d.ts` по умолчанию.
+
+#### Пакет использует export `export =`, но я предпочитаю использовать импорт по умолчанию. Могу ли я изменить `export =` на `export default`?
+
+Если вы используете TypeScript 2.7 или более позднюю версию, используйте `--esModuleInterop` в вашем проекте.
+В противном случае, если импорт по умолчанию работает в вашей среде (например, Webpack, SystemJS, esm), рассмотрите возможность включения опции компилятора [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html).
+Не меняйте определение типа, если оно точное.
+Для пакета NPM, `export =` является точным, если `node -p 'require("foo")'` является экспортом, а `export default` является точным, если `node -p 'require("foo").default'` является экспортом.
+
+#### Я хочу использовать функции из TypeScript 2.1 или выше.
+
+В таком случае вам нужно будет добавить комментарий к последней строке заголовка вашего определения (после `// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`): `// TypeScript Version: 2.1`.
+
+#### Я хочу добавить DOM API, отсутствующий в TypeScript по умолчанию.
+
+Это может принадлежать [TSJS-Lib-Generator](https://github.com/Microsoft/TSJS-lib-generator#readme). Смотрите инструкции там.
+Если стандарт все еще является черновиком, добавляйте сюда.
+Используйте имя, начинающееся с `dom-` и включите ссылку на стандарт в качестве ссылки "Project" в заголовке.
+Когда он завершает черновой режим, мы можем удалить его из DefinitelyTyped и объявить устаревшим связанный пакет `@types`.
+
+#### Я хочу обновить пакет новой старшей версии
+
+Если вы намерены продолжить обновление старой версии пакета, вы можете создать новую подпапку с текущей версией, например, `v2` и скопируйте в него существующие файлы. Если это так, вам необходимо:
+
+1. Обновите относительные пути в `tsconfig.json` а также в `tslint.json`.
+2. Добавьте правила сопоставления путей, чтобы убедиться, что тесты выполняются для предполагаемой версии.
+
+Например [history v2 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/history/v2/tsconfig.json) looks like:
+
+```json
+{
+ "compilerOptions": {
+ "baseUrl": "../../",
+ "typeRoots": ["../../"],
+ "paths": {
+ "history": [ "history/v2" ]
+ },
+ },
+ "files": [
+ "index.d.ts",
+ "history-tests.ts"
+ ]
+}
+```
+
+Если в DefinitelyTyped есть другие пакеты, несовместимые с новой версией, вам нужно будет добавить сопоставления путей к старой версии. Вам также нужно будет сделать это для пакетов в зависимости от пакетов в зависимости от старой версии.
+
+Например, `react-router` зависит от `history@2`, поэтому [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) есть сопоставление пути с `"history": [ "history/v2" ]`;
+транзитивно `react-router-bootstrap` (который зависит от `react-router`) также добавляет отображение пути в свой [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json).
+
+Также, `/// ` не будет работать с отображением пути, поэтому зависимости должны использовать `import`.
+
+#### Как мне написать определения для пакетов, которые могут использоваться и глобально и в качестве модуля?
+
+Руководство TypeScript содержит отличную [общую информацию о написании определений](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html), а также [этот пример файла определения](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html) , в котором показано, как создать определение с использованием синтаксиса модуля в стиле ES6, а также указаны объекты, доступные для глобальной области. Этот метод демонстрируется практически в определении для [definition for big.js](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/big.js/index.d.ts), библиотекой, которую можно загружать глобально с помощью тега скрипта на веб-странице или импортировать с помощью импорта по требованию или в стиле ES6.
+
+Чтобы проверить, как ваше определение может использоваться как при глобальных ссылках, так и в качестве импортированного модуля, создайте тестовую папку `test`, и поместите туда два тестовых файла. Назовите один `YourLibraryName-global.test.ts` а другой `YourLibraryName-module.test.ts`. *Глобальный* тестовый файл должен использовать определение в соответствии с тем, как он будет использоваться в скрипте, загруженном на веб-страницу, где библиотека доступна в глобальной области видимости - в этом сценарии не следует указывать оператор импорта. Тестовый файл *модуля* должен использовать определение в соответствии с тем, как оно будет использоваться при импорте (включая оператор(ы) `import`). Если вы указали свойство `files` в файле `tsconfig.json`, обязательно включите оба тестовых файла. [Практический пример этого](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/big.js/test) также доступен в определении big.js.
+
+Обратите внимание, что не требуется полностью использовать определение в каждом тестовом файле - достаточно протестировать только глобально доступные элементы в глобальном тестовом файле и полностью выполнить определение в тестовом файле модуля, или наоборот.
+
+#### А как насчет областных пакетов?
+
+Типы для пакета с областью `@foo/bar` должны указываться в `types/foo__bar`. Обратите внимание на двойное подчеркивание.
+
+Когда `dts-gen` используется для компоновки пакета с областью действия, свойство `paths` должно быть вручную адаптировано в сгенерированном файле
+`tsconfig.json` для правильной ссылки на пакет с областью действия:
+
+```json
+{
+ "paths":{
+ "@foo/bar": ["foo__bar"]
+ }
+}
+```
+
+
+#### История файлов в GitHub выглядит неполной.
+
+GitHub не [поддерживает](http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames) историю файлов для переименованных файлов. Вместо этого используйте [`git log --follow`](https://www.git-scm.com/docs/git-log).
+
+#### Должен ли я добавить пустой namespace в пакет, который не экспортирует модуль для использования импорта в стиле ES6?
+
+Некоторые пакеты, такие как [chai-http](https://github.com/chaijs/chai-http), экспортируют функцию.
+
+Импорт этого модуля с импортом в стиле ES6 в форме `import * as foo from "foo";` приводит к ошибке:
+
+> error TS2497: Module 'foo' resolves to a non-module entity and cannot be imported using this construct
+
+Эту ошибку можно устранить, объединив объявление функции с пустым namespace'ом с тем же именем, но это не рекомендуется.
+Это часто цитируемый [ответ с Stack Overflow](https://stackoverflow.com/questions/39415661/what-does-resolves-to-a-non-module-entity-and-cannot-be-imported-using-this) по этому вопросу.
+
+Более целесообразно импортировать модуль, используя `import foo = require("foo");` синтаксис или использовать импорт по умолчанию, такой как `import foo from "foo";` при использовании флага `--allowSyntheticDefaultImports`, если среда выполнения вашего модуля поддерживает схему взаимодействия для модулей не-ECMAScript как таковых.
+
+## Лицензия
+
+Этот проект лицензирован по лицензии MIT.
+
+Авторские права на файлы определений принадлежат каждому участнику, указанному в начале каждого файла определения.
+
+[](https://github.com/igrigorik/ga-beacon)
+
+[](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=13) В среднем пакеты публикуются на npm менее чем за 10000 секунд?
+
+[](https://typescript.visualstudio.com/TypeScript/_build/latest?definitionId=14) Был ли typescript-bot активным на DefinitelyTyped в последние два часа?
diff --git a/node-gettext/index.d.ts b/node-gettext/index.d.ts
new file mode 100644
index 0000000000..735f8db84b
--- /dev/null
+++ b/node-gettext/index.d.ts
@@ -0,0 +1,27 @@
+// Type definitions for node-gettext 2.0
+// Project: http://github.com/alexanderwallin/node-gettext
+// Definitions by: Sameer K.C.
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+export = GetText;
+declare class GetText {
+ constructor(options?: { debug: boolean; });
+ addTranslations(locale: string, domain: string, translations: object): void;
+ dgettext(domain: string, msgid: string): string;
+ dngettext(domain: string, msgid: string, msgidPlural: string, count: number): string;
+ dnpgettext(domain: string, msgctxt: string, msgid: string, msgidPlural: string, count: number): string;
+ dpgettext(domain: string, msgctxt: string, msgid: string): string;
+ emit(eventName: string, eventData: any): void;
+ getComment(domain: string, msgctxt: string, msgid: string): object | boolean;
+ gettext(msgid: string): string;
+ ngettext(msgid: string, msgidPlural: string, count: number): string;
+ npgettext(msgctxt: string, msgid: string, msgidPlural: string, count: number): string;
+ off(eventName: string, callback: (params: any) => void): string;
+ on(eventName: string, callback: (params: any) => void): void;
+ pgettext(msgctxt: string, msgid: string): string;
+ setLocale(locale: string): void;
+ setTextDomain(domain: string): void;
+ static getLanguageCode(locale: string): string;
+ textdomain(domain: string): void;
+ warn(message: string): void;
+}
diff --git a/node-gettext/node-gettext-tests.ts b/node-gettext/node-gettext-tests.ts
new file mode 100644
index 0000000000..e20e6aacac
--- /dev/null
+++ b/node-gettext/node-gettext-tests.ts
@@ -0,0 +1,34 @@
+// with tsc v 2.7 & esModuleInterop & allowSyntheticDefaultImports enabled in tsconfig.json
+import Gettext from 'node-gettext';
+// or without
+// import Gettext = require('node-getttext');
+
+const translations = {};
+const gt = new Gettext({ debug: true });
+const msgid = 'Get translation';
+const msgidPlural = 'Get translations';
+const domain = 'domain';
+const msgctxt = 'context';
+const count = 2;
+
+gt.addTranslations('en-US', 'messages', translations);
+gt.setTextDomain(domain);
+gt.textdomain(domain);
+gt.setLocale('en-US');
+gt.gettext(msgid);
+gt.dgettext('', msgid);
+gt.dngettext(domain, msgid, msgidPlural, count);
+gt.dnpgettext(domain, msgctxt, msgid, msgidPlural, count);
+gt.dpgettext(domain, msgctxt, msgid);
+gt.getComment(domain, msgctxt, msgid);
+gt.ngettext(msgid, msgidPlural, count);
+gt.npgettext(msgctxt, msgid, msgidPlural, count);
+gt.pgettext(msgctxt, msgid);
+Gettext.getLanguageCode('en-US');
+gt.warn('warning');
+const errorListener = (error: string) => {
+ // do something;
+};
+gt.on('error', errorListener);
+gt.emit('error', 'Error occurred');
+gt.off('error', errorListener);
diff --git a/node-gettext/tsconfig.json b/node-gettext/tsconfig.json
new file mode 100644
index 0000000000..9306d23426
--- /dev/null
+++ b/node-gettext/tsconfig.json
@@ -0,0 +1,24 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true
+ },
+ "files": [
+ "index.d.ts",
+ "node-gettext-tests.ts"
+ ]
+}
diff --git a/types/hibp/tslint.json b/node-gettext/tslint.json
similarity index 100%
rename from types/hibp/tslint.json
rename to node-gettext/tslint.json
diff --git a/notNeededPackages.json b/notNeededPackages.json
index c64738aa8d..4acd790e24 100644
--- a/notNeededPackages.json
+++ b/notNeededPackages.json
@@ -684,6 +684,12 @@
"sourceRepoURL": "https://handsontable.com/",
"asOfVersion": "0.35.0"
},
+ {
+ "libraryName": "hibp",
+ "typingsPackageName": "hibp",
+ "sourceRepoURL": "https://github.com/wKovacs64/hibp",
+ "asOfVersion": "7.3.0"
+ },
{
"libraryName": "homeworks",
"typingsPackageName": "homeworks",
@@ -1482,6 +1488,12 @@
"sourceRepoURL": "https://github.com/zeh/simplesignal",
"asOfVersion": "1.0.0"
},
+ {
+ "libraryName": "sip.js",
+ "typingsPackageName": "sip.js",
+ "sourceRepoURL": "https://github.com/onsip/SIP.js",
+ "asOfVersion": "0.12.0"
+ },
{
"libraryName": "smooth-scrollbar",
"typingsPackageName": "smooth-scrollbar",
@@ -1512,6 +1524,12 @@
"sourceRepoURL": "https://github.com/mozilla/source-map",
"asOfVersion": "0.5.7"
},
+ {
+ "libraryName": "Spectacle",
+ "typingsPackageName": "spectacle",
+ "sourceRepoURL": "http://github.com/FormidableLabs/spectacle/",
+ "asOfVersion": "5.2.3"
+ },
{
"libraryName": "Spin.js",
"typingsPackageName": "spin.js",
diff --git a/package.json b/package.json
index caf101cbc6..7fc0358f27 100644
--- a/package.json
+++ b/package.json
@@ -23,5 +23,6 @@
"devDependencies": {
"dtslint": "github:Microsoft/dtslint#production",
"types-publisher": "github:Microsoft/types-publisher#production"
- }
+ },
+ "dependencies": {}
}
diff --git a/types/accept/accept-tests.ts b/types/accept/accept-tests.ts
index 011216ede4..659d05c174 100644
--- a/types/accept/accept-tests.ts
+++ b/types/accept/accept-tests.ts
@@ -14,6 +14,8 @@ accept.language("en;q=0.7, en-GB;q=0.8", ["en-gb"]); // language === "en-GB"
const languages = accept.languages("da, en;q=0.7, en-GB;q=0.8"); // languages === ["da", "en-GB", "en"]
languages.lastIndexOf('');
+accept.mediaType("text/plain, application/json;q=0.5, text/html, */*;q=0.1");
+accept.mediaType("text/plain, application/json;q=0.5, text/html, */*;q=0.1", ["application/json", "text/html"]);
const mediaTypes = accept.mediaTypes("text/plain, application/json;q=0.5, text/html, */*;q=0.1");
// mediaTypes === ["text/plain", "text/html", "application/json", "*/*"]
mediaTypes.lastIndexOf('');
diff --git a/types/accept/index.d.ts b/types/accept/index.d.ts
index b067ea4306..886193a01e 100644
--- a/types/accept/index.d.ts
+++ b/types/accept/index.d.ts
@@ -10,6 +10,7 @@ export function encoding(encodingHeader?: string, preferences?: string[]): strin
export function encodings(encodingHeader?: string): string[];
export function language(languageHeader?: string, preferences?: string[]): string;
export function languages(languageHeader?: string): string[];
+export function mediaType(mediaTypeHeader?: string, preferences?: string[]): string;
export function mediaTypes(mediaTypeHeader?: string): string[];
export function parseAll(
headers: Record
diff --git a/types/ace/index.d.ts b/types/ace/index.d.ts
index cd20b57f05..2588539c0c 100644
--- a/types/ace/index.d.ts
+++ b/types/ace/index.d.ts
@@ -549,6 +549,16 @@ declare namespace AceAjax {
getFoldsInRange(range: Range): any;
highlight(text: string): void;
+
+
+ /**
+ * Highlight lines from `startRow` to `EndRow`.
+ * @param startRow Define the start line of the highlight
+ * @param endRow Define the end line of the highlight
+ * @param clazz Set the CSS class for the marker
+ * @param inFront Set to `true` to establish a front marker
+ **/
+ highlightLines(startRow:number, endRow: number, clazz: string, inFront: boolean): Range;
/**
* Sets the `EditSession` to point to a new `Document`. If a `BackgroundTokenizer` exists, it also points to `doc`.
diff --git a/types/acorn/index.d.ts b/types/acorn/index.d.ts
index 5d02bd716c..e6a9291d1c 100644
--- a/types/acorn/index.d.ts
+++ b/types/acorn/index.d.ts
@@ -246,9 +246,7 @@ declare namespace acorn {
let LooseParser: ILooseParserClass | undefined;
let pluginsLoose: PluginsObject | undefined;
- interface ILooseParserClass {
- new (input: string, options?: Options): ILooseParser;
- }
+ type ILooseParserClass = new (input: string, options?: Options) => ILooseParser;
interface ILooseParser {}
diff --git a/types/active-win/active-win-tests.ts b/types/active-win/active-win-tests.ts
new file mode 100644
index 0000000000..034b03d85a
--- /dev/null
+++ b/types/active-win/active-win-tests.ts
@@ -0,0 +1,17 @@
+import activeWin = require('active-win');
+
+// $ExpectType Promise
+activeWin();
+// $ExpectType Result
+activeWin.sync();
+
+let win = {
+ title: 'Unicorns - Google Search',
+ id: 5762,
+ owner: {
+ name: 'Google Chrome',
+ processId: 310,
+ },
+};
+
+win = activeWin.sync();
diff --git a/types/active-win/index.d.ts b/types/active-win/index.d.ts
new file mode 100644
index 0000000000..7ab1f1e123
--- /dev/null
+++ b/types/active-win/index.d.ts
@@ -0,0 +1,30 @@
+// Type definitions for active-win 4.0
+// Project: https://github.com/sindresorhus/active-win#readme
+// Definitions by: BendingBender
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+export = activeWin;
+
+declare function activeWin(): Promise;
+
+declare namespace activeWin {
+ function sync(): Result;
+
+ interface Result {
+ title: string;
+ id: number;
+ bounds?: {
+ x: number;
+ y: number;
+ width: number;
+ height: number;
+ };
+ owner: {
+ name: string;
+ processId: number;
+ bundleId?: number;
+ path?: string;
+ };
+ memoryUsage?: number;
+ }
+}
diff --git a/types/active-win/tsconfig.json b/types/active-win/tsconfig.json
new file mode 100644
index 0000000000..fc292756af
--- /dev/null
+++ b/types/active-win/tsconfig.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "strictFunctionTypes": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "active-win-tests.ts"
+ ]
+}
diff --git a/types/active-win/tslint.json b/types/active-win/tslint.json
new file mode 100644
index 0000000000..3db14f85ea
--- /dev/null
+++ b/types/active-win/tslint.json
@@ -0,0 +1 @@
+{ "extends": "dtslint/dt.json" }
diff --git a/types/aframe/index.d.ts b/types/aframe/index.d.ts
index 075d063e5f..0a3ba3c133 100644
--- a/types/aframe/index.d.ts
+++ b/types/aframe/index.d.ts
@@ -319,6 +319,22 @@ export interface Utils {
delimiter?: string
): void;
};
+ device: {
+ isWebXRAvailable: boolean;
+ getVRDisplay(): VRDisplay[];
+ checkHeadsetConnected(): boolean;
+ checkHasPositionalTracking(): boolean;
+ isMobile(): boolean;
+ isTablet(): boolean;
+ isIOS(): boolean;
+ isGearVR(): boolean;
+ isOculusGo(): boolean;
+ isR7(): boolean;
+ isLandscape(): boolean;
+ isBrowserEnvironment(): boolean;
+ isNodeEnvironment(): boolean;
+ PolyfillControls(object3D: THREE.Object3D): void;
+ };
styleParser: {
parse(value: string): object;
stringify(data: object): string;
diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts
index 13f7f56ff9..e4f9e09e7c 100644
--- a/types/ali-oss/index.d.ts
+++ b/types/ali-oss/index.d.ts
@@ -18,6 +18,7 @@ declare namespace OSS {
internal?: boolean; // access OSS with aliyun internal network or not, default is false. If your servers are running on aliyun too, you can set true to save lot of money.
secure?: boolean; // instruct OSS client to use HTTPS (secure: true) or HTTP (secure: false) protocol.
timeout?: string | number; // instance level timeout for all operations, default is 60s
+ cname?: boolean; // use custom domain name
}
interface Bucket {
@@ -29,7 +30,7 @@ declare namespace OSS {
type StorageType = "Standard" | "IA" | "Archive";
- type ACLType = "public-read-write" | "public-read" | "and private";
+ type ACLType = "public-read-write" | "public-read" | "private";
type HTTPMethods = "GET" | "POST" | "DELETE" | "PUT";
@@ -174,6 +175,7 @@ declare namespace OSS {
mime?: string; // custom mime, will send with Content-Type entity header
meta?: UserMeta; // user meta, will send with x-oss-meta- prefix string e.g.: { uid: 123, pid: 110 }
callback: ObjectCallback;
+ headers?: object;
}
interface PutObjectResult {
@@ -188,6 +190,7 @@ declare namespace OSS {
mime: string; // custom mime, will send with Content-Type entity header
meta: UserMeta;
callback: ObjectCallback;
+ headers?: object;
}
interface AppendObjectOptions {
diff --git a/types/all-property-names/all-property-names-tests.ts b/types/all-property-names/all-property-names-tests.ts
new file mode 100644
index 0000000000..b32daa59a3
--- /dev/null
+++ b/types/all-property-names/all-property-names-tests.ts
@@ -0,0 +1,4 @@
+import allPropertyNames = require('all-property-names');
+
+// $ExpectType Set
+allPropertyNames(Symbol.prototype);
diff --git a/types/all-property-names/index.d.ts b/types/all-property-names/index.d.ts
new file mode 100644
index 0000000000..0b396ec94d
--- /dev/null
+++ b/types/all-property-names/index.d.ts
@@ -0,0 +1,9 @@
+// Type definitions for all-property-names 1.0
+// Project: https://github.com/sindresorhus/all-property-names#readme
+// Definitions by: BendingBender
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.2
+
+export = allPropertyNames;
+
+declare function allPropertyNames(input: object): Set;
diff --git a/types/all-property-names/tsconfig.json b/types/all-property-names/tsconfig.json
new file mode 100644
index 0000000000..394cd3bb53
--- /dev/null
+++ b/types/all-property-names/tsconfig.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "strictFunctionTypes": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "all-property-names-tests.ts"
+ ]
+}
diff --git a/types/all-property-names/tslint.json b/types/all-property-names/tslint.json
new file mode 100644
index 0000000000..3db14f85ea
--- /dev/null
+++ b/types/all-property-names/tslint.json
@@ -0,0 +1 @@
+{ "extends": "dtslint/dt.json" }
diff --git a/types/alt/index.d.ts b/types/alt/index.d.ts
index c95e1653b0..515a67986a 100644
--- a/types/alt/index.d.ts
+++ b/types/alt/index.d.ts
@@ -58,8 +58,8 @@ declare namespace AltJS {
remote(state:any, ...args: any[]):Promise;
shouldFetch?(fetchFn:(...args:Array) => boolean):void;
loading?:(args:any) => void;
- success?:(state:S) => void;
- error?:(args:any) => void;
+ success:(state:S) => void;
+ error:(args:any) => void;
interceptResponse?(response:any, action:Action, ...args:Array):any;
}
diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts
index 44f8539af2..b83a41a6df 100644
--- a/types/angular/angular-tests.ts
+++ b/types/angular/angular-tests.ts
@@ -1502,16 +1502,28 @@ interface MyScope extends ng.IScope {
foo: string;
}
-const directiveCompileFnWithGeneric: ng.IDirectiveCompileFn = (
- templateElement: JQLite,
- templateAttributes: ng.IAttributes,
- transclude: ng.ITranscludeFunction
- ): ng.IDirectiveLinkFn => {
- return (
- scope: MyScope,
- instanceElement: JQLite,
- instanceAttributes: ng.IAttributes
- ) => {
- return null;
- };
-};
+interface MyElement extends JQLite {
+ foo: string;
+}
+
+interface MyAttributes extends ng.IAttributes {
+ foo: string;
+}
+interface MyController extends ng.INgModelController {
+ foo: string;
+}
+
+angular.module('WithGenerics', [])
+ .directive('directiveUsingGenerics', () => {
+ return {
+ restrict: 'E',
+ link(scope: MyScope, element: MyElement, templateAttributes: MyAttributes, controller: MyController) {
+ scope['name'] = 'Jeff';
+ }
+ };
+ })
+ .directive('linkFunctionUsingGenerics', () => {
+ return (scope: MyScope, element: MyElement, templateAttributes: MyAttributes, controller: MyController) => {
+ scope['name'] = 'Jeff';
+ };
+ });
diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts
index fe90fa15b8..4a8b26fba9 100644
--- a/types/angular/index.d.ts
+++ b/types/angular/index.d.ts
@@ -240,8 +240,9 @@ declare namespace angular {
* @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind)
* @param directiveFactory An injectable directive factory function.
*/
- directive(name: string, directiveFactory: Injectable>): IModule;
- directive(object: {[directiveName: string]: Injectable>}): IModule;
+ directive(name: string, directiveFactory: Injectable>): IModule;
+ directive(object: {[directiveName: string]: Injectable>}): IModule;
+
/**
* Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
*
@@ -1346,8 +1347,8 @@ declare namespace angular {
}
interface ICompileProvider extends IServiceProvider {
- directive(name: string, directiveFactory: Injectable>): ICompileProvider;
- directive(object: {[directiveName: string]: Injectable>}): ICompileProvider;
+ directive(name: string, directiveFactory: Injectable>): ICompileProvider;
+ directive(object: {[directiveName: string]: Injectable>}): ICompileProvider;
component(name: string, options: IComponentOptions): ICompileProvider;
component(object: {[componentName: string]: IComponentOptions}): ICompileProvider;
@@ -2066,29 +2067,31 @@ declare namespace angular {
// and http://docs.angularjs.org/guide/directive
///////////////////////////////////////////////////////////////////////////
- interface IDirectiveFactory {
- (...args: any[]): IDirective | IDirectiveLinkFn;
+ type IDirectiveController = IController | IController[] | {[key: string]: IController};
+
+ interface IDirectiveFactory {
+ (...args: any[]): IDirective | IDirectiveLinkFn;
}
- interface IDirectiveLinkFn {
+ interface IDirectiveLinkFn {
(
scope: TScope,
- instanceElement: JQLite,
- instanceAttributes: IAttributes,
- controller?: IController | IController[] | {[key: string]: IController},
+ instanceElement: TElement,
+ instanceAttributes: TAttributes,
+ controller?: TController,
transclude?: ITranscludeFunction
): void;
}
- interface IDirectivePrePost {
- pre?: IDirectiveLinkFn;
- post?: IDirectiveLinkFn;
+ interface IDirectivePrePost {
+ pre?: IDirectiveLinkFn;
+ post?: IDirectiveLinkFn;
}
- interface IDirectiveCompileFn {
+ interface IDirectiveCompileFn {
(
- templateElement: JQLite,
- templateAttributes: IAttributes,
+ templateElement: TElement,
+ templateAttributes: TAttributes,
/**
* @deprecated
* Note: The transclude function that is passed to the compile function is deprecated,
@@ -2096,11 +2099,11 @@ declare namespace angular {
* that is passed to the link function instead.
*/
transclude: ITranscludeFunction
- ): void | IDirectiveLinkFn | IDirectivePrePost;
+ ): void | IDirectiveLinkFn | IDirectivePrePost;
}
- interface IDirective {
- compile?: IDirectiveCompileFn;
+ interface IDirective {
+ compile?: IDirectiveCompileFn;
controller?: string | Injectable;
controllerAs?: string;
/**
@@ -2109,7 +2112,7 @@ declare namespace angular {
* relies upon bindings inside a $onInit method on the controller, instead.
*/
bindToController?: boolean | {[boundProperty: string]: string};
- link?: IDirectiveLinkFn | IDirectivePrePost;
+ link?: IDirectiveLinkFn | IDirectivePrePost;
multiElement?: boolean;
priority?: number;
/**
@@ -2119,9 +2122,9 @@ declare namespace angular {
require?: string | string[] | {[controller: string]: string};
restrict?: string;
scope?: boolean | {[boundProperty: string]: string};
- template?: string | ((tElement: JQLite, tAttrs: IAttributes) => string);
+ template?: string | ((tElement: TElement, tAttrs: TAttributes) => string);
templateNamespace?: string;
- templateUrl?: string | ((tElement: JQLite, tAttrs: IAttributes) => string);
+ templateUrl?: string | ((tElement: TElement, tAttrs: TAttributes) => string);
terminal?: boolean;
transclude?: boolean | 'element' | {[slot: string]: string};
}
diff --git a/types/angular/jqlite.d.ts b/types/angular/jqlite.d.ts
index a9da89cf65..ac4f8ec10c 100644
--- a/types/angular/jqlite.d.ts
+++ b/types/angular/jqlite.d.ts
@@ -774,6 +774,7 @@ interface BaseJQueryEventObject extends Event {
pageY: number;
/**
* For key or mouse events, this property indicates the specific key or button that was pressed.
+ * @deprecated Use `key` for KeyEvents or `button` for MouseEvents instead.
* @see {@link https://api.jquery.com/event.which/}
*/
which: number;
@@ -804,9 +805,12 @@ interface JQueryMouseEventObject extends JQueryInputEventObject {
}
interface JQueryKeyEventObject extends JQueryInputEventObject {
- char: any;
+ /** @deprecated */
+ char: string;
+ /** @deprecated */
charCode: number;
- key: any;
+ key: string;
+ /** @deprecated */
keyCode: number;
}
diff --git a/types/ansi-colors/ansi-colors-tests.ts b/types/ansi-colors/ansi-colors-tests.ts
index 9a9afc43f4..c267e879eb 100644
--- a/types/ansi-colors/ansi-colors-tests.ts
+++ b/types/ansi-colors/ansi-colors-tests.ts
@@ -1,30 +1,35 @@
-import * as colors from 'ansi-colors';
+import colors = require('ansi-colors');
-let s: string;
+colors.red('This is a red string!'); // $ExpectType string
+colors.green('This is a red string!'); // $ExpectType string
+colors.cyan('This is a cyan string!'); // $ExpectType string
+colors.yellow('This is a yellow string!'); // $ExpectType string
-s = colors.bgblack("hello");
-s = colors.bgblue("hello");
-s = colors.bgcyan("hello");
-s = colors.bggreen("hello");
-s = colors.bgmagenta("hello");
-s = colors.bgred("hello");
-s = colors.bgwhite("hello");
-s = colors.bgyellow("hello");
-s = colors.black("hello");
-s = colors.blue("hello");
-s = colors.bold("hello");
-s = colors.cyan("hello");
-s = colors.dim("hello");
-s = colors.gray("hello");
-s = colors.green("hello");
-s = colors.grey("hello");
-s = colors.hidden("hello");
-s = colors.inverse("hello");
-s = colors.italic("hello");
-s = colors.magenta("hello");
-s = colors.red("hello");
-s = colors.reset("hello");
-s = colors.strikethrough("hello");
-s = colors.underline("hello");
-s = colors.white("hello");
-s = colors.yellow("hello");
+colors.bold.red('this is a bold red message'); // $ExpectType string
+colors.bold.yellow.italic('this is a bold yellow italicized message'); // $ExpectType string
+colors.green.bold.underline('this is a bold green underlined message'); // $ExpectType string
+
+colors.yellow(`foo ${colors.red.bold('red')} bar ${colors.cyan('cyan')} baz`); // $ExpectType string
+colors.bold(`foo ${colors.red.dim('bar')} baz`); // $ExpectType string
+
+colors.enabled = false;
+colors.visible = false;
+
+colors.hasAnsi(colors.blue('foo')); // $ExpectType boolean
+colors.hasColor(colors.blue('foo')); // $ExpectType boolean
+
+colors.unstyle(colors.blue.bold('foo bar baz')); // $ExpectType string
+colors.stripColor(colors.blue.bold('foo bar baz')); // $ExpectType string
+
+colors.none('foo'); // $ExpectType string
+colors.clear('foo'); // $ExpectType string
+colors.noop('foo'); // $ExpectType string
+
+colors.define('reset', [0, 0], 'modifier');
+
+colors.symbols.ballotCross; // $ExpectType string | undefined
+colors.symbols.windows.ballotCross; // $ExpectError
+colors.symbols.other.ballotCross; // $ExpectType string
+colors.symbols.cross; // $ExpectType string
+colors.symbols.windows.cross; // $ExpectType string
+colors.symbols.other.cross; // $ExpectType string
diff --git a/types/ansi-colors/index.d.ts b/types/ansi-colors/index.d.ts
index 092c4c1f2b..0cf9cd0d9f 100644
--- a/types/ansi-colors/index.d.ts
+++ b/types/ansi-colors/index.d.ts
@@ -1,31 +1,111 @@
-// Type definitions for ansi-colors 1.0
+// Type definitions for ansi-colors 3.2
// Project: https://github.com/doowb/ansi-colors
// Definitions by: Rogier Schouten
+// BendingBender
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.1
-export function bgblack(s: string): string;
-export function bgblue(s: string): string;
-export function bgcyan(s: string): string;
-export function bggreen(s: string): string;
-export function bgmagenta(s: string): string;
-export function bgred(s: string): string;
-export function bgwhite(s: string): string;
-export function bgyellow(s: string): string;
-export function black(s: string): string;
-export function blue(s: string): string;
-export function bold(s: string): string;
-export function cyan(s: string): string;
-export function dim(s: string): string;
-export function gray(s: string): string;
-export function green(s: string): string;
-export function grey(s: string): string;
-export function hidden(s: string): string;
-export function inverse(s: string): string;
-export function italic(s: string): string;
-export function magenta(s: string): string;
-export function red(s: string): string;
-export function reset(s: string): string;
-export function strikethrough(s: string): string;
-export function underline(s: string): string;
-export function white(s: string): string;
-export function yellow(s: string): string;
+export = colors;
+
+declare const colors: colors.Colors;
+
+declare namespace colors {
+ type ColorFn = ((text: string) => string) & Colors;
+
+ interface Colors {
+ enabled: boolean;
+ visible: boolean;
+
+ reset: ColorFn;
+ bold: ColorFn;
+ dim: ColorFn;
+ italic: ColorFn;
+ underline: ColorFn;
+ inverse: ColorFn;
+ hidden: ColorFn;
+ strikethrough: ColorFn;
+
+ black: ColorFn;
+ red: ColorFn;
+ green: ColorFn;
+ yellow: ColorFn;
+ blue: ColorFn;
+ magenta: ColorFn;
+ cyan: ColorFn;
+ white: ColorFn;
+ gray: ColorFn;
+ grey: ColorFn;
+
+ bgBlack: ColorFn;
+ bgRed: ColorFn;
+ bgGreen: ColorFn;
+ bgYellow: ColorFn;
+ bgBlue: ColorFn;
+ bgMagenta: ColorFn;
+ bgCyan: ColorFn;
+ bgWhite: ColorFn;
+
+ blackBright: ColorFn;
+ redBright: ColorFn;
+ greenBright: ColorFn;
+ yellowBright: ColorFn;
+ blueBright: ColorFn;
+ magentaBright: ColorFn;
+ cyanBright: ColorFn;
+ whiteBright: ColorFn;
+
+ bgBlackBright: ColorFn;
+ bgRedBright: ColorFn;
+ bgGreenBright: ColorFn;
+ bgYellowBright: ColorFn;
+ bgBlueBright: ColorFn;
+ bgMagentaBright: ColorFn;
+ bgCyanBright: ColorFn;
+ bgWhiteBright: ColorFn;
+
+ hasColor(text: string): boolean;
+ hasAnsi(text: string): boolean;
+ unstyle(text: string): string;
+ stripColor(text: string): string;
+ none(text: string): string;
+ clear(text: string): string;
+ noop(text: string): string;
+
+ symbols: Symbols & {
+ windows: WindowsSymbols;
+ other: OtherPlatformsSymbols;
+ };
+
+ define(
+ name: string,
+ codes: [number, number],
+ type: 'modifier' | 'color' | 'bg' | 'bright' | 'bgBright'
+ ): void;
+ }
+
+ interface WindowsSymbols {
+ bullet: string;
+ check: string;
+ cross: string;
+ ellipsis: string;
+ heart: string;
+ info: string;
+ line: string;
+ middot: string;
+ minus: string;
+ plus: string;
+ question: string;
+ questionSmall: string;
+ pointer: string;
+ pointerSmall: string;
+ warning: string;
+ }
+
+ interface ExtendedSymbols {
+ ballotCross: string;
+ questionFull: string;
+ }
+
+ type Symbols = WindowsSymbols & Partial;
+ type OtherPlatformsSymbols = WindowsSymbols & ExtendedSymbols;
+}
diff --git a/types/ansi-colors/tsconfig.json b/types/ansi-colors/tsconfig.json
index ebd56021f9..8a0f980cbc 100644
--- a/types/ansi-colors/tsconfig.json
+++ b/types/ansi-colors/tsconfig.json
@@ -20,4 +20,4 @@
"index.d.ts",
"ansi-colors-tests.ts"
]
-}
\ No newline at end of file
+}
diff --git a/types/ansi-colors/v1/ansi-colors-tests.ts b/types/ansi-colors/v1/ansi-colors-tests.ts
new file mode 100644
index 0000000000..9a9afc43f4
--- /dev/null
+++ b/types/ansi-colors/v1/ansi-colors-tests.ts
@@ -0,0 +1,30 @@
+import * as colors from 'ansi-colors';
+
+let s: string;
+
+s = colors.bgblack("hello");
+s = colors.bgblue("hello");
+s = colors.bgcyan("hello");
+s = colors.bggreen("hello");
+s = colors.bgmagenta("hello");
+s = colors.bgred("hello");
+s = colors.bgwhite("hello");
+s = colors.bgyellow("hello");
+s = colors.black("hello");
+s = colors.blue("hello");
+s = colors.bold("hello");
+s = colors.cyan("hello");
+s = colors.dim("hello");
+s = colors.gray("hello");
+s = colors.green("hello");
+s = colors.grey("hello");
+s = colors.hidden("hello");
+s = colors.inverse("hello");
+s = colors.italic("hello");
+s = colors.magenta("hello");
+s = colors.red("hello");
+s = colors.reset("hello");
+s = colors.strikethrough("hello");
+s = colors.underline("hello");
+s = colors.white("hello");
+s = colors.yellow("hello");
diff --git a/types/ansi-colors/v1/index.d.ts b/types/ansi-colors/v1/index.d.ts
new file mode 100644
index 0000000000..092c4c1f2b
--- /dev/null
+++ b/types/ansi-colors/v1/index.d.ts
@@ -0,0 +1,31 @@
+// Type definitions for ansi-colors 1.0
+// Project: https://github.com/doowb/ansi-colors
+// Definitions by: Rogier Schouten
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+export function bgblack(s: string): string;
+export function bgblue(s: string): string;
+export function bgcyan(s: string): string;
+export function bggreen(s: string): string;
+export function bgmagenta(s: string): string;
+export function bgred(s: string): string;
+export function bgwhite(s: string): string;
+export function bgyellow(s: string): string;
+export function black(s: string): string;
+export function blue(s: string): string;
+export function bold(s: string): string;
+export function cyan(s: string): string;
+export function dim(s: string): string;
+export function gray(s: string): string;
+export function green(s: string): string;
+export function grey(s: string): string;
+export function hidden(s: string): string;
+export function inverse(s: string): string;
+export function italic(s: string): string;
+export function magenta(s: string): string;
+export function red(s: string): string;
+export function reset(s: string): string;
+export function strikethrough(s: string): string;
+export function underline(s: string): string;
+export function white(s: string): string;
+export function yellow(s: string): string;
diff --git a/types/ansi-colors/v1/tsconfig.json b/types/ansi-colors/v1/tsconfig.json
new file mode 100644
index 0000000000..8321162c90
--- /dev/null
+++ b/types/ansi-colors/v1/tsconfig.json
@@ -0,0 +1,28 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "strictFunctionTypes": true,
+ "baseUrl": "../../",
+ "typeRoots": [
+ "../../"
+ ],
+ "paths": {
+ "ansi-colors": [
+ "ansi-colors/v1"
+ ]
+ },
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "ansi-colors-tests.ts"
+ ]
+}
diff --git a/types/ansi-colors/v1/tslint.json b/types/ansi-colors/v1/tslint.json
new file mode 100644
index 0000000000..3db14f85ea
--- /dev/null
+++ b/types/ansi-colors/v1/tslint.json
@@ -0,0 +1 @@
+{ "extends": "dtslint/dt.json" }
diff --git a/types/ansi-regex/ansi-regex-tests.ts b/types/ansi-regex/ansi-regex-tests.ts
index a5787902f0..d4217e9608 100644
--- a/types/ansi-regex/ansi-regex-tests.ts
+++ b/types/ansi-regex/ansi-regex-tests.ts
@@ -9,5 +9,8 @@ ansiRegex().test('\u001B[4mcake\u001B[0m'); // $ExpectType boolean
ansiRegex().test('cake'); // $ExpectType boolean
// => false
+ansiRegex({onlyFirst: true}).test('cake'); // $ExpectType boolean
+// => false
+
'\u001B[4mcake\u001B[0m'.match(ansiRegex()); // $ExpectType RegExpMatchArray | null
// => ['\u001B[4m', '\u001B[0m']
diff --git a/types/ansi-regex/index.d.ts b/types/ansi-regex/index.d.ts
index 34890912dc..52979125f7 100644
--- a/types/ansi-regex/index.d.ts
+++ b/types/ansi-regex/index.d.ts
@@ -1,7 +1,16 @@
-// Type definitions for ansi-regex 3.0
+// Type definitions for ansi-regex 4.0
// Project: https://github.com/chalk/ansi-regex#readme
// Definitions by: Manish Vachharajani
+// Florian Keller
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-declare function r(): RegExp;
-export = r;
+declare namespace ansiRegex {
+ interface Options {
+ /** Match only the first ANSI escape. */
+ onlyFirst?: boolean;
+ }
+}
+
+declare function ansiRegex(options?: ansiRegex.Options): RegExp;
+
+export = ansiRegex;
diff --git a/types/arcgis-js-api/index.d.ts b/types/arcgis-js-api/index.d.ts
index 28e51384c9..4e43778473 100644
--- a/types/arcgis-js-api/index.d.ts
+++ b/types/arcgis-js-api/index.d.ts
@@ -1,48 +1,55 @@
-// Type definitions for ArcGIS API for JavaScript 4.9
+// Type definitions for ArcGIS API for JavaScript 4.10
// Project: http://js.arcgis.com
// Definitions by: Esri
// Bjorn Svensson
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
-
interface HashMap {
[index: string]: T;
}
interface IPromiseLike {
- then(onfulfilled?: ((value: T) => TResult1 | IPromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | IPromiseLike) | undefined | null): IPromiseLike;
+ then(
+ onfulfilled?: ((value: T) => TResult1 | IPromiseLike) | undefined | null,
+ onrejected?: ((reason: any) => TResult2 | IPromiseLike) | undefined | null
+ ): IPromiseLike;
}
interface IPromise {
- always(callback?: ((valueOrError: T | any) => TResult1 | IPromiseLike) | undefined | null): IPromise;
+ always(
+ callback?: ((valueOrError: T | any) => TResult1 | IPromiseLike) | undefined | null
+ ): IPromise;
cancel?(reason?: U, strict?: boolean): U;
- catch(onrejected?: ((reason: any) => TResult | IPromiseLike) | undefined | null): IPromise;
+ catch(
+ onrejected?: ((reason: any) => TResult | IPromiseLike) | undefined | null
+ ): IPromise;
isCanceled?(): boolean;
isFulfilled(): boolean;
isRejected(): boolean;
isResolved(): boolean;
- otherwise(onrejected?: ((reason: any) => TResult | IPromiseLike) | undefined | null): IPromise;
- then(onfulfilled?: ((value: T) => TResult1 | IPromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | IPromiseLike) | undefined | null): IPromise;
+ otherwise(
+ onrejected?: ((reason: any) => TResult | IPromiseLike) | undefined | null
+ ): IPromise;
+ then(
+ onfulfilled?: ((value: T) => TResult1 | IPromiseLike) | undefined | null,
+ onrejected?: ((reason: any) => TResult2 | IPromiseLike) | undefined | null
+ ): IPromise;
}
interface IHandle {
remove(): void;
}
-
-
declare namespace JSX {
interface IntrinsicElements {
[elementName: string]: any;
}
- interface Element {
- }
+ interface Element {}
}
declare namespace __esri {
-
export class Accessor {
constructor(obj?: any);
@@ -70,8 +77,6 @@ declare namespace __esri {
set?(props: HashMap): this;
watch?(path: string | string[], callback: WatchCallback, sync?: boolean): WatchHandle;
}
-
-
export type ItemCallback = (item: T, index: number) => void;
@@ -134,16 +139,15 @@ declare namespace __esri {
static isCollection(value: any | Collection): value is Collection;
- static ofType(type: Constructor | Types): new (items?: (T[] | Collection) | { items?: T[] | Collection }) => Collection;
+ static ofType(
+ type: Constructor | Types
+ ): new (items?: (T[] | Collection) | { items?: T[] | Collection }) => Collection;
}
type CollectionProperties = T[] | Collection;
-
-
type DateProperties = number | string | Date;
-
export type BaseDynamicLayerLayerviewCreateEventHandler = (event: BaseDynamicLayerLayerviewCreateEvent) => void;
export type BaseDynamicLayerLayerviewDestroyEventHandler = (event: BaseDynamicLayerLayerviewDestroyEvent) => void;
@@ -160,6 +164,14 @@ declare namespace __esri {
export type BingMapsLayerLayerviewDestroyEventHandler = (event: BingMapsLayerLayerviewDestroyEvent) => void;
+ export type BuildingSceneLayerLayerviewCreateEventHandler = (event: BuildingSceneLayerLayerviewCreateEvent) => void;
+
+ export type BuildingSceneLayerLayerviewDestroyEventHandler = (event: BuildingSceneLayerLayerviewDestroyEvent) => void;
+
+ export type CredentialDestroyEventHandler = (event: CredentialDestroyEvent) => void;
+
+ export type CredentialTokenChangeEventHandler = (event: CredentialTokenChangeEvent) => void;
+
export type CSVLayerLayerviewCreateEventHandler = (event: CSVLayerLayerviewCreateEvent) => void;
export type CSVLayerLayerviewDestroyEventHandler = (event: CSVLayerLayerviewDestroyEvent) => void;
@@ -186,17 +198,15 @@ declare namespace __esri {
export type GroupLayerLayerviewDestroyEventHandler = (event: GroupLayerLayerviewDestroyEvent) => void;
- export type IdentityManagerCredentialCreateEventHandler = (event: IdentityManagerCredentialCreateEvent) => void;
-
- export type IdentityManagerCredentialsDestroyEventHandler = (event: IdentityManagerCredentialsDestroyEvent) => void;
-
export type ImageryLayerLayerviewCreateEventHandler = (event: ImageryLayerLayerviewCreateEvent) => void;
export type ImageryLayerLayerviewDestroyEventHandler = (event: ImageryLayerLayerviewDestroyEvent) => void;
export type IntegratedMeshLayerLayerviewCreateEventHandler = (event: IntegratedMeshLayerLayerviewCreateEvent) => void;
- export type IntegratedMeshLayerLayerviewDestroyEventHandler = (event: IntegratedMeshLayerLayerviewDestroyEvent) => void;
+ export type IntegratedMeshLayerLayerviewDestroyEventHandler = (
+ event: IntegratedMeshLayerLayerviewDestroyEvent
+ ) => void;
export type KMLLayerLayerviewCreateEventHandler = (event: KMLLayerLayerviewCreateEvent) => void;
@@ -249,63 +259,63 @@ declare namespace __esri {
interface Basemap extends Accessor, Loadable, JSONSupport {
/**
* A collection of tile layers that make up the basemap's features.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers)
*/
baseLayers: Collection;
/**
* An identifier used to refer to the basemap when referencing it elsewhere.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#id)
*/
id: string;
/**
* Indicates whether the basemap instance has loaded. When `true`, all the properties of the object can be accessed.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loaded)
- *
+ *
* @default false
*/
readonly loaded: boolean;
/**
* The portal item.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#portalItem)
*/
portalItem: PortalItem;
/**
* A collection of tiled reference layers for displaying labels.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#referenceLayers)
*/
referenceLayers: Collection;
/**
* The URL pointing to an image that represents the basemap. When using a custom basemap in the [BasemapToggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html) widget, the image specified here will display in the widget. When the user clicks the image, the map's basemap will update to the basemap associated with the image.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#thumbnailUrl)
*/
thumbnailUrl: string;
/**
* The title of the basemap.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#title)
*/
title: string;
/**
* Creates a deep clone of this object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#clone)
- *
- *
+ *
+ *
*/
clone(): Basemap;
/**
* Loads all the externally loadable resources associated with the basemap. For the basemap this will load all the base layers and reference layers.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadAll)
- *
- *
+ *
+ *
*/
loadAll(): IPromise;
}
@@ -313,20 +323,19 @@ declare namespace __esri {
interface BasemapConstructor {
/**
* Creates a new basemap object. Basemaps can be created from a [PortalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html), from a well known [basemap ID](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#fromId), or can be used for creating custom basemaps. These basemaps may be created from tiled services you publish to your own server, or from tiled services published by third parties.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html)
*/
- new(properties?: BasemapProperties): Basemap;
-
+ new (properties?: BasemapProperties): Basemap;
/**
* Creates a new basemap instance from a [well known basemap ID](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap). See [Map.basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap) for a list of possible values.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#fromId)
- *
+ *
* @param id The basemap ID.
- *
+ *
*/
fromId(id: string): Basemap;
@@ -338,37 +347,37 @@ declare namespace __esri {
interface BasemapProperties extends LoadableProperties {
/**
* A collection of tile layers that make up the basemap's features.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers)
*/
baseLayers?: CollectionProperties;
/**
* An identifier used to refer to the basemap when referencing it elsewhere.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#id)
*/
id?: string;
/**
* The portal item.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#portalItem)
*/
portalItem?: PortalItemProperties;
/**
* A collection of tiled reference layers for displaying labels.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#referenceLayers)
*/
referenceLayers?: CollectionProperties;
/**
* The URL pointing to an image that represents the basemap. When using a custom basemap in the [BasemapToggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html) widget, the image specified here will display in the widget. When the user clicks the image, the map's basemap will update to the basemap associated with the image.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#thumbnailUrl)
*/
thumbnailUrl?: string;
/**
* The title of the basemap.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#title)
*/
title?: string;
@@ -377,42 +386,42 @@ declare namespace __esri {
interface Camera extends Accessor, JSONSupport {
/**
* The field of view of the camera in degrees.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#fov)
- *
+ *
* @default 55
*/
fov: number;
/**
* The compass heading of the camera in degrees. Heading is zero when north is the top of the screen. It increases as the view rotates clockwise. The angles are always normalized between 0 and 360 degrees.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading)
- *
+ *
* @default 0
*/
heading: number;
/**
- * The position of the camera defined by a map point.
+ * The position of the camera defined by a map point.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#position)
*/
position: Point;
/**
* The tilt of the camera in degrees with respect to the surface as projected down from the camera position. Tilt is zero when looking straight down at the surface and 90 degrees when the camera is looking parallel to the surface.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#tilt)
- *
+ *
* @default 0
*/
tilt: number;
/**
* Creates a deep clone of the camera object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#clone)
- *
- *
+ *
+ *
*/
clone(): Camera;
}
@@ -420,11 +429,11 @@ declare namespace __esri {
interface CameraConstructor {
/**
* The camera defines the [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#position), [tilt](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#tilt), and [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading) of the point from which the [SceneView's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) visible extent is observed. It is not associated with device hardware. This class only applies to 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html)
*/
- new(properties?: CameraProperties): Camera;
+ new (properties?: CameraProperties): Camera;
fromJSON(json: any): Camera;
}
@@ -434,32 +443,32 @@ declare namespace __esri {
interface CameraProperties {
/**
* The field of view of the camera in degrees.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#fov)
- *
+ *
* @default 55
*/
fov?: number;
/**
* The compass heading of the camera in degrees. Heading is zero when north is the top of the screen. It increases as the view rotates clockwise. The angles are always normalized between 0 and 360 degrees.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading)
- *
+ *
* @default 0
*/
heading?: number;
/**
- * The position of the camera defined by a map point.
+ * The position of the camera defined by a map point.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#position)
*/
position?: PointProperties;
/**
* The tilt of the camera in degrees with respect to the surface as projected down from the camera position. Tilt is zero when looking straight down at the surface and 90 degrees when the camera is looking parallel to the surface.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#tilt)
- *
+ *
* @default 0
*/
tilt?: number;
@@ -468,158 +477,157 @@ declare namespace __esri {
interface Color {
/**
* The alpha value. This value can be any number between `0` and `1` and represents the opacity of the Color. `0` indicates the color is fully transparent and `1` indicates it is fully opaque.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#a)
*/
a: number;
/**
* The blue value. This value can range between `0` and `255`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#b)
*/
b: number;
/**
* The green value. This value can range between `0` and `255`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#g)
*/
g: number;
/**
* The red value. This value can range between `0` and `255`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#r)
*/
r: number;
/**
* Creates a deep clone of the Color instance.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#clone)
- *
- *
+ *
+ *
*/
clone(): Color;
/**
* Takes a named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another Color object and sets this color instance to the input value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#setColor)
- *
+ *
* @param color The new color value. This parameter can be a string representing a named color or a hex value; an array of three or four numbers representing r, g, b, a values; or an object with r, g, b, a properties.
- *
+ *
*/
setColor(color: string | number[] | any): Color;
/**
* Returns a CSS color string in rgba form representing the Color instance.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toCss)
- *
+ *
* @param includeAlpha If `true`, the alpha value will be included in the result.
- *
+ *
*/
toCss(includeAlpha?: boolean): string;
/**
* Returns a CSS color string in hexadecimal form that represents the Color instance.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toHex)
- *
- *
+ *
+ *
*/
toHex(): string;
/**
* Returns a JSON object with all the values from a Color instance.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toJSON)
- *
- *
+ *
+ *
*/
toJSON(): any;
/**
* Returns a 3-component array of rgb values that represent the Color instance.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toRgb)
- *
- *
+ *
+ *
*/
toRgb(): number[];
/**
* Returns a 4-component array of rgba values that represent the Color instance.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toRgba)
- *
- *
+ *
+ *
*/
toRgba(): number[];
}
interface ColorConstructor {
/**
- * Creates a new color object by passing either a hex, rgba, or named color value. This class inherits all attributes from **dojo/_base/Color** to provide functions for setting colors.
- *
+ * Creates a new color object by passing either a hex, rgba, or named color value.
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html)
*/
-
/**
* Creates a Color instance by blending two colors using a weight factor. Optionally accepts a Color object to update and return instead of creating a new object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#blendColors)
- *
+ *
* @param start The start color.
* @param end The end color.
* @param weight The weight value is a number from 0 to 1, with 0.5 being a 50/50 blend.
- * @param obj A previously allocated Color object to reuse for the result.
- *
+ * @param out A previously allocated Color object to reuse for the result.
+ *
*/
- blendColors(start: Color, end: Color, weight: number, obj?: Color): Color;
+ blendColors(start: Color, end: Color, weight: number, out?: Color): Color;
- new(color: string | number[] | any): Color;
+ new (color: string | number[] | any): Color;
/**
* Creates a Color instance using a 3 or 4 element array, mapping each element in sequence to the rgb(a) values of the color. Optionally accepts a Color object to update with the color value and return instead of creating a new object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromArray)
- *
+ *
* @param a The input array.
* @param obj A previously allocated Color object to reuse for the result.
- *
+ *
*/
fromArray(a: number[], obj?: Color): Color;
/**
* Creates a Color instance from a hex string with a '#' prefix. Supports 12-bit #rgb shorthand. Optionally accepts a Color object to update with the parsed value and return instead of creating a new object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromHex)
- *
+ *
* @param color The input color in a hex string.
* @param obj A previously allocated Color object to reuse for the result.
- *
+ *
*/
fromHex(color: string, obj?: Color): Color;
/**
* Creates a new Color instance, and initializes it with values from a JSON object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromJSON)
- *
+ *
* @param json A JSON representation of the instance.
- *
+ *
*/
fromJSON(json: any): Color;
/**
* Creates a Color instance from a string of the form "rgb()" or "rgba()". Optionally accepts a Color object to update with the parsed value and return instead of creating a new object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromRgb)
- *
+ *
* @param color The input color in a string of the form "rgb()" or "rgba()".
- * @param obj A previously allocated Color object to reuse for the result.
- *
+ * @param out A previously allocated Color object to reuse for the result.
+ *
*/
- fromRgb(color: string, obj?: Color): Color;
+ fromRgb(color: string, out?: Color): Color;
/**
* Creates a Color instance by parsing a generic string. Accepts hex, rgb, and rgba style color values. Optionally accepts a Color object to update with the parsed value and return instead of creating a new object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromString)
- *
+ *
* @param str The input value.
* @param obj A previously allocated Color object to reuse for the result.
- *
+ *
*/
fromString(str: string, obj?: Color): Color;
}
@@ -628,59 +636,59 @@ declare namespace __esri {
/**
* Configure global properties of the library.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html)
*/
interface config {
/**
- * The URL for font resources used by the [Font](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#family) class in [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) and [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) labels. To use your own hosted fonts, you must follow the kebab-case naming convention (e.g. "arial-unicode-ms-bold").
- *
+ * The URL for font resources used by the [Font](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#family) class in [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) and [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) labels. To use your own hosted fonts, the font files need to be in `.pbf` format, and you must follow the kebab-case naming convention (e.g. "arial-unicode-ms-bold").
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#fontsUrl)
- *
+ *
* @default "https://static.arcgis.com/fonts"
*/
fontsUrl: string;
/**
* The default [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html) used by widgets and other operations, such as on-the-fly projections.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#geometryServiceUrl)
- *
+ *
* @default "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer"
*/
geometryServiceUrl: string;
/**
* The URL for the utility service used by [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html) to convert GeoRSS documents.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#geoRSSServiceUrl)
- *
+ *
* @default "https://utility.arcgis.com/sharing/rss"
*/
geoRSSServiceUrl: string;
/**
* The URL for the utility service used by [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html) to convert KML documents.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#kmlServiceUrl)
- *
+ *
* @default "https://utility.arcgis.com/sharing/kml"
*/
kmlServiceUrl: string;
/**
* The URL of the portal instance. If using an on-premise portal, this value should be set to the portal instance, for example: `https://www.example.com/arcgis`
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl)
- *
+ *
* @default "https://www.arcgis.com"
*/
portalUrl: string;
/**
* An object with properties that control various aspects of communication between the library and web servers.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
request: configRequest;
/**
* The AMD loader's configuration object, which is loaded with each worker. Modify the configuration to specify locations of packages to be loaded with [the workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html) or to define a feature detection.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
workers: configWorkers;
@@ -692,21 +700,20 @@ declare namespace __esri {
export type BeforeInterceptorCallback = (params: any) => any;
-
export interface configRequest extends Object {
/**
* List of domain suffixes known to support https. This will automatically upgrade requests made to such domains to use https instead of http when the application is not running on http. Note that port numbers should not be included in the domain suffix to be matched. If no `httpsDomains` list exists , the API redirects all calls using https. If the list exists and a domain of a required http resource is not listed, the API sends the URL as it is specified within the code. Likewise, if the list exists and the domain of a required http resource is listed in it, the API sends an https request to that resource. The list includes the following domain suffixes by default:
* * `arcgis.com`
* * `arcgisonline.com`
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
httpsDomains?: string[];
/**
- * Allows developers to modify requests before or after they are sent. The first interceptor that matches the request URL will be used. Example:
+ * **Since:** 4.8 Allows developers to modify requests before or after they are sent. The first interceptor that matches the request URL will be used. Example:
* ```js
* const featureLayerUrl = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0";
- *
+ *
* esriConfig.request.interceptors.push({
* // set the `urls` property to the URL of the FeatureLayer so that this
* // interceptor only applies to requests made to the FeatureLayer URL
@@ -729,125 +736,122 @@ declare namespace __esri {
* }
* });
* ```
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
interceptors?: RequestInterceptor[];
/**
* Maximum number of characters allowed in the URL for HTTP GET requests made by [request](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html). If this limit is exceeded, HTTP POST method will be used.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
- *
+ *
* @default 2000
*/
maxUrlLength?: number;
/**
* A proxy rule defines a proxy for a set of resources with an identical URL prefix. When using [esriRequest](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html), if a target URL matches a rule, then the request will be sent to the specified proxy. Rather than populating this array directly, use the urlUtils.addProxyRule() method. Rule objects have the following properties:
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
proxyRules?: configRequestProxyRules[];
/**
- * Resource proxy for your application. It is used by the library when communicating with a web server hosted on a domain that is different from the domain where your application is hosted. The library may or may not use the proxy depending on the type of request made, whether the server support CORS, whether the application is being run on older versions of browsers etc. To keep it simple, it is recommended that you always configure a resource proxy for your application. You can download the resource proxy from this [GitHub repo](https://github.com/Esri/resource-proxy).
+ * Resource proxy for your application. It is used by the library when communicating with a web server hosted on a domain that is different from the domain where your application is hosted. The library may or may not use the proxy depending on the type of request made, whether the server support CORS, whether the application is being run on older versions of browsers etc. To keep it simple, it is recommended that you always configure a resource proxy for your application. You can download the resource proxy from this [GitHub repo](https://github.com/Esri/resource-proxy).
* ```js
* require(["esri/config"], function(esriConfig) {
* esriConfig.request.proxyUrl = "/resource-proxy/Java/proxy.jsp";
* });
* ```
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
proxyUrl?: string;
/**
* Number of milliseconds [request](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html) will wait for response from a server. If a server fails to respond before this time expires, then the request is considered to have encountered an error.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
- *
+ *
* @default 60000
*/
timeout?: number;
/**
- * **Since:** 4.9 Indicates whether cross origin requests made to the associated server should include credentials such as cookies and authorization headers.
+ * **Since:** 4.9 Indicates whether cross origin requests made to the associated server should include credentials such as cookies and authorization headers.
* ```js
* require(["esri/config"], function(esriConfig) {
* esriConfig.request.trustedServers.push("[//].[:]");
* });
* ```
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
trustedServers?: string[];
/**
* **Since:** 4.5 Indicates whether `esri/request` will request a credential from `IdentityManager`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
- *
+ *
* @default true
*/
useIdentity?: boolean;
}
-
export interface configRequestProxyRules extends Object {
/**
* The URL of the proxy.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
proxyUrl?: string;
/**
* URL prefix for resources that need to be accessed through a specific proxy.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request)
*/
urlPrefix?: string;
}
-
export interface configWorkers extends Object {
/**
* The absolute url to the AMD loader used in the worker. The default url points to the AMD loader used by the API.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
loaderUrl?: any;
/**
* The configuration parameters for [the workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
loaderConfig?: configWorkersLoaderConfig;
}
-
export interface configWorkersLoaderConfig extends Object {
/**
* The AMD loader loads all code relative to the baseUrl.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
baseUrl?: string;
/**
* Determines if the specified feature capabilities are supported.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
has?: any;
/**
* Map of module id fragments to file paths.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
paths?: any;
/**
* Map paths in module identifiers to different paths.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
map?: any;
/**
* An array of objects which provide the package name and its location.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers)
*/
packages?: any[];
@@ -855,112 +859,109 @@ declare namespace __esri {
/**
* Specifies the object used for intercepting and modifying requests made via [esriRequest](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor)
*/
export interface RequestInterceptor extends Object {
/**
* Makes changes to the response after the request is sent, but before it's returned to the caller.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor)
*/
after?: AfterInterceptorCallback;
/**
* Make changes to the request URL or options before the request is sent.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor)
*/
before?: BeforeInterceptorCallback;
/**
* Sets or adds headers into `requestOptions.headers`. See also: [requestOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor)
*/
headers?: any;
/**
* Sets or adds query parameters into `requestOptions.query`. See also: [requestOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor)
*/
query?: any;
/**
* Hardcodes the [response](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestResponse). The request will not be sent. This is resolved as the response `data`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor)
*/
responseData?: any;
/**
* Specifies the URL(s) to apply to the interceptors. If the value is type `String`, then it matches if the request URL starts with that string. If null or undefined, the interceptor will apply to all relevant requests.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor)
*/
urls?: string | RegExp | (string | RegExp)[];
}
-
-
export type WatchCallback = (newValue: any, oldValue: any, propertyName: string, target: Accessor) => void;
/**
* Represents a watch created when an object invokes [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#WatchHandle)
*/
export interface WatchHandle extends Object {
/**
* Removes the watch handle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#WatchHandle)
- *
- *
+ *
+ *
*/
remove(): void;
}
-
interface decorators {
/**
* A property decorator that creates a two-way binding between the property it decorates and an inner property of one of its members.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#aliasOf)
- *
+ *
* @param propertyName The aliased property name.
- *
+ *
*/
aliasOf(propertyName: string): Function;
/**
* This method decorator is used to define the method that will cast a property from a class.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#cast)
- *
+ *
* @param propertyName The property name the function will cast.
- *
+ *
*/
cast(propertyName: string): Function;
/**
* This parameter decorator is used to define the function or class for a parameter of a method.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#cast)
- *
+ *
* @param classFunction The function or class to cast the parameter
- *
+ *
*/
cast(classFunction: Function): Function;
/**
* A function that can be used as a class. It extends [expression](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-1-6.html#extending-expressions) and is used in conjunction with the `@subclass` decorator to create a class compatible to [dojo.declare](https://dojotoolkit.org/reference-guide/1.10/dojo/declare.html). Please refer to the `subclass` documentation for further information.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#declared)
- *
+ *
* @param baseClass The class to extend.
* @param mixinClasses The mixin classes used to extend the base class.
- *
+ *
*/
declared(baseClass: T, ...mixinClasses: any[]): T;
/**
* This convenience decorator is used to define an [Accessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html) property. Any property defined with this decorator can now be `get` and `set`. In addition, you can [watch for any property changes](https://developers.arcgis.com/javascript/latest/guide/working-with-props/index.html). Many times this decorator is used in conjunction with the [@renderable](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-widget.html#renderable) decorator.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
- *
+ *
* @param propertyMetadata An object describing the property.
* @param propertyMetadata.dependsOn Property names of dependencies.
* @param propertyMetadata.type The constructor used to [autocast](https://developers.arcgis.com/javascript/latest/guide/autocasting/index.html) the property.
@@ -969,101 +970,87 @@ declare namespace __esri {
* @param propertyMetadata.constructOnly Indicates whether the property can be set during construction but is otherwise read-only.
* @param propertyMetadata.aliasOf The property decorator that creates a two-way binding between the property it decorates and an inner property of one of its members.
* @param propertyMetadata.value The default value for the property.
- *
+ *
*/
property(propertyMetadata?: decoratorsPropertyPropertyMetadata): Function;
/**
* A class decorator that must be used together with the `declared` function to create a class compatible to [dojo.declare](https://dojotoolkit.org/reference-guide/1.10/dojo/declare.html). It supports both single and multiple inheritance and can be considered the underlying functionality needed when creating 4.x classes.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#subclass)
- *
+ *
* @param declaredClass The subclass name.
- *
+ *
*/
subclass(declaredClass?: string): Function;
}
export const decorators: decorators;
-
export interface decoratorsPropertyPropertyMetadata extends Object {
/**
* Property names of dependencies.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
*/
dependsOn?: string[];
/**
* The constructor used to [autocast](https://developers.arcgis.com/javascript/latest/guide/autocasting/index.html) the property.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
*/
type?: Function;
/**
* The function to use to [autocast](https://developers.arcgis.com/javascript/latest/guide/autocasting/index.html) the property. Alternative to define the `type`. The function is called with the value set by the user and should return the cast value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
*/
cast?: Function;
/**
* Indicates whether the property is read-only.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
- *
+ *
* @default false
*/
readOnly?: boolean;
/**
* Indicates whether the property can be set during construction but is otherwise read-only.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
- *
+ *
* @default false
*/
constructOnly?: boolean;
/**
* The property decorator that creates a two-way binding between the property it decorates and an inner property of one of its members.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
*/
aliasOf?: string;
/**
* The default value for the property.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property)
*/
value?: any;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
interface Error {
/**
* The details object provides additional details specific to the error, giving more information about why the error was raised. For example, the details object for esriRequest includes additional information to help the developer diagnose issues with a problematic request.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html#details)
*/
details: any;
/**
* A message describing the details of the error.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html#message)
*/
message: string;
/**
* A unique error name. This can be used to map to a localized error message to present to the user.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html#name)
*/
name: string;
@@ -1074,39 +1061,37 @@ declare namespace __esri {
interface Evented {
/**
* Emits an event on the instance. This method should only be used when creating subclasses of this class.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Evented.html#emit)
- *
+ *
* @param type The name of the event.
* @param event The event payload.
- *
+ *
*/
- emit(type: string, event: any): void;
+ emit(type: string, event?: any): void;
/**
* Indicates whether there is an event listener on the instance that matches the provided event name.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Evented.html#hasEventListener)
- *
+ *
* @param type The name of the event.
- *
+ *
*/
hasEventListener(type: string): boolean;
/**
* Registers an event handler on the instance. Call this method to hook an event with a listener.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Evented.html#on)
- *
+ *
* @param type The name of event to listen for.
* @param listener The function to call when the event is fired.
- *
+ *
*/
on(type: string, listener: EventHandler): IHandle;
}
interface EventedConstructor {
-
-
- new(): Evented;
+ new (): Evented;
}
export const Evented: EventedConstructor;
@@ -1116,16 +1101,14 @@ declare namespace __esri {
interface HandleOwner extends Accessor {
/**
* Handle registry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles)
*/
handles: void;
}
interface HandleOwnerConstructor {
-
-
- new(properties?: HandleOwnerProperties): HandleOwner;
+ new (properties?: HandleOwnerProperties): HandleOwner;
}
export const HandleOwner: HandleOwnerConstructor;
@@ -1133,7 +1116,7 @@ declare namespace __esri {
interface HandleOwnerProperties {
/**
* Handle registry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-HandleOwner.html#handles)
*/
handles?: void;
@@ -1142,93 +1125,85 @@ declare namespace __esri {
interface Handles extends Accessor {
/**
* Adds a group of handles.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#add)
- *
+ *
* @param handles An array or collection handles to group.
* @param key group handle key
- *
+ *
*/
add(handles: WatchHandle | WatchHandle[] | Collection, key?: any): void;
/**
* Returns true if a group exists for the provided key, false otherwise.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#has)
- *
+ *
* @param key group handle key
- *
+ *
*/
has(key: any): boolean;
/**
* Removes a group of handles.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#remove)
- *
+ *
* @param key A group key or an array or collection of group keys to remove.
- *
+ *
*/
remove(key?: any): void;
/**
* Removes all handles.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#removeAll)
- *
- *
+ *
+ *
*/
removeAll(): void;
}
interface HandlesConstructor {
-
-
- new(properties?: HandlesProperties): Handles;
+ new (properties?: HandlesProperties): Handles;
}
export const Handles: HandlesConstructor;
- interface HandlesProperties {
-
- }
+ interface HandlesProperties {}
interface JSONSupport {
/**
* Converts an instance of [this class]() to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for more information.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-JSONSupport.html#toJSON)
- *
- *
+ *
+ *
*/
toJSON(): any;
}
interface JSONSupportConstructor {
-
-
- new(): JSONSupport;
-
+ new (): JSONSupport;
/**
* Creates a new instance of [this class]() and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input `json` parameter often comes from a response to a query operation in the REST API or a [toJSON()](http://pro.arcgis.com/en/pro-app/tool-reference/conversion/features-to-json.htm) method from another ArcGIS product. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for details and examples of when and how to use this function.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-JSONSupport.html#fromJSON)
- *
+ *
* @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
- *
+ *
*/
fromJSON(json: any): any;
}
export const JSONSupport: JSONSupportConstructor;
-
interface lang {
/**
* Use this method to deeply clone objects with properties that are computed or have their own `clone()` method. For example, if you are creating an object that stores an initial extent and a spatial reference for your application, you can use `esriLang.clone(initialProps)` to clone this object so that the `extent` and `spatialReference` are properly cloned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-lang.html#clone)
- *
+ *
* @param elem The object to be cloned.
- *
+ *
*/
clone(elem: any): any;
}
@@ -1238,181 +1213,183 @@ declare namespace __esri {
interface Loadable {
/**
* The Error object returned if an error occurred while loading.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#loadError)
- *
+ *
* @default null
*/
readonly loadError: Error;
/**
- * Represents the status of a [load](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#load) operation.
- *
+ * Represents the status of a [load](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#load) operation.
+ *
* Value | Description
* ------|------------
* not-loaded | The object's resources have not loaded.
* loading | The object's resources are currently loading.
* loaded | The object's resources have loaded without errors.
* failed | The object's resources failed to load. See [loadError](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#loadError) for more details.
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#loadStatus)
- *
+ *
* @default not-loaded
*/
readonly loadStatus: string;
/**
* A list of warnings which occurred while loading.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#loadWarnings)
*/
readonly loadWarnings: any[];
/**
* Cancels a [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#load) operation if it is already in progress.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#cancelLoad)
- *
- *
+ *
+ *
*/
cancelLoad(): void;
/**
* `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isFulfilled)
- *
- *
+ *
+ *
*/
isFulfilled(): boolean;
/**
* `isRejected()` may be used to verify if creating an instance of the class is rejected. If it is rejected, `true` will be returned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isRejected)
- *
- *
+ *
+ *
*/
isRejected(): boolean;
/**
* `isResolved()` may be used to verify if creating an instance of the class is resolved. If it is resolved, `true` will be returned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#isResolved)
- *
- *
+ *
+ *
*/
isResolved(): boolean;
/**
* Loads the resources referenced by this class. This method automatically executes for a [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) and all of the resources it references in [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) if the view is constructed with a map instance. This method must be called by the developer when accessing a resource that will not be loaded in a [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#load)
- *
- *
+ *
+ *
*/
load(): IPromise;
/**
* `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the instance of the class loads. The `errback` executes if the instance of the class fails to load.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Loadable.html#when)
- *
+ *
* @param callback The function to call when the promise resolves.
* @param errback The function to execute when the promise fails.
- *
+ *
*/
when(callback?: Function, errback?: Function): IPromise;
}
interface LoadableConstructor {
-
-
- new(): Loadable;
+ new (): Loadable;
}
export const Loadable: LoadableConstructor;
- interface LoadableProperties {
-
- }
+ interface LoadableProperties {}
interface corePromise {
/**
* `isFulfilled()` may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, `true` will be returned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isFulfilled)
- *
- *
+ *
+ *
*/
isFulfilled(): boolean;
/**
* `isRejected()` may be used to verify if creating an instance of the class is rejected. If it is rejected, `true` will be returned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isRejected)
- *
- *
+ *
+ *
*/
isRejected(): boolean;
/**
* `isResolved()` may be used to verify if creating an instance of the class is resolved. If it is resolved, `true` will be returned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#isResolved)
- *
- *
+ *
+ *
*/
isResolved(): boolean;
/**
* `when()` may be leveraged once an instance of the class is created. This method takes two input parameters: a `callback` function and an `errback` function. The `callback` executes when the instance of the class loads. The `errback` executes if the instance of the class fails to load.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Promise.html#when)
- *
+ *
* @param callback The function to call when the promise resolves.
* @param errback The function to execute when the promise fails.
- *
+ *
*/
when(callback?: Function, errback?: Function): IPromise;
}
interface corePromiseConstructor {
-
-
- new(): corePromise;
+ new (): corePromise;
}
export const corePromise: corePromiseConstructor;
-
interface promiseUtils {
+ /**
+ * Convenience utility method for creating and resolving a promise.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create)
+ *
+ * @param executor A function that will be called with two methods, `resolve` and `reject`.
+ *
+ */
+ create(executor: Executor): IPromise;
/**
* Convenience utility method to wait for a number of promises to either resolve or reject. The resulting promise resolves to an array of result objects containing the promise and either a value if the promise resolved, or an error if the promise rejected.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#eachAlways)
- *
+ *
* @param promises Array of promises, or object where each property is a promise.
- *
+ *
*/
eachAlways(promises: IPromise[] | any): IPromise | any;
/**
* A convenience utility method for filtering an array of values using an asynchronous predicate function.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#filter)
- *
+ *
* @param input The array of input values to filter.
* @param predicate A predicate function returning a promise. Only array entries for which the returned promise contains `true` are kept.
- *
+ *
*/
filter(input: T[], predicate: FilterPredicateCallback): IPromise;
/**
* Convenience utility method to create a promise that has been rejected with a provided error value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#reject)
- *
+ *
* @param error The error to reject the resulting promise with.
- *
+ *
*/
reject(error?: any): IPromise;
/**
* Convenience utility method to create a promise that will be resolved with a provided value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#resolve)
- *
+ *
* @param value The value to resolve the resulting promise with.
- *
+ *
*/
resolve(value?: T): IPromise;
}
@@ -1421,42 +1398,71 @@ declare namespace __esri {
/**
* The result object for a promise passed to [promiseUtils.eachAlways](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#eachAlways).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#EachAlwaysResult)
*/
export interface EachAlwaysResult extends Object {
/**
* The promise that has been fulfilled.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#EachAlwaysResult)
*/
promise: IPromise;
/**
* The value with which the promise resolved. Defined only if the promise resolved.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#EachAlwaysResult)
*/
value?: any;
/**
* The error with which the promise rejected. Defined only if the promise rejected.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#EachAlwaysResult)
*/
error?: any;
}
+ export type Executor = () => void;
+
export type FilterPredicateCallback = (value: any, index: number) => IPromise;
+ /**
+ * A function that will reject the promise created in [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create).
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#RejectCallback)
+ */
+ export interface RejectCallback extends Object {
+ /**
+ * The error with which the promise rejected. Defined only if the promise is rejected.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#RejectCallback)
+ */
+ error?: any;
+ }
+
+ /**
+ * A function that will resolve the promise created in [create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create).
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#ResolveCallback)
+ */
+ export interface ResolveCallback extends Object {
+ /**
+ * The value with which the promise resolved. Defined only if the promise is fulfilled.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#ResolveCallback)
+ */
+ value?: any | IPromise;
+ }
interface requireUtils {
/**
- * Dynamically requires one or more modules and returns a promise that resolves when all the specified modules have loaded.
- *
+ * **Deprecated in favor of [promiseUtils.create()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-promiseUtils.html#create).** Dynamically requires one or more modules and returns a promise that resolves when all the specified modules have loaded.
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-requireUtils.html#when)
- *
+ *
* @param moduleRequire The `require` function used to load the modules. This is the AMD alias (e.g. the `moduleRequire` reference in the snippets below) used to reference the `require` module.
* @param moduleNames The names of the modules to load.
- *
+ *
*/
when(moduleRequire: any, moduleNames: string[] | string): IPromise;
}
@@ -1465,26 +1471,26 @@ declare namespace __esri {
/**
* Various utilities and convenience functions for executing code at various phases of browser frames. The scheduling module allows you to register tasks that are executed in every animation frame. This can be used to synchronize updates with ongoing animations of the view, or to animate the view manually by adjusting the extent or camera in every frame.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html)
*/
interface scheduling {
/**
* Registers a frame task. An animation frame is composed of different phases to let various actors execute code before, after, or during the rendering of [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask)
- *
+ *
* @param phases The callbacks for each phase of the frame.
- *
+ *
*/
addFrameTask(phases: PhaseCallbacks): FrameTaskHandle;
/**
* Schedules the execution of a `callback` function at the next web browser tick. Unlike [addFrameTask](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask), a scheduled `callback` will only run once. Scheduling a task for the next execution tick can be useful when you want to throttle/accumulate functionality over a single javascript execution context.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#schedule)
- *
+ *
* @param callback The function to call at the next tick.
- *
+ *
*/
schedule(callback: Function): any;
}
@@ -1493,32 +1499,32 @@ declare namespace __esri {
/**
* An object to remove or pause a frame task registered with [addFrameTask()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#addFrameTask).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle)
*/
export interface FrameTaskHandle extends Object {
/**
* Pause the execution the frame task at every frame.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle)
- *
- *
+ *
+ *
*/
pause(): void;
/**
* Resumes the execution the frame task.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle)
- *
- *
+ *
+ *
*/
resume(): void;
/**
* Removes the frame task.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#FrameTaskHandle)
- *
- *
+ *
+ *
*/
remove(): void;
}
@@ -1527,25 +1533,25 @@ declare namespace __esri {
/**
* A set of [callbacks](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallback) that will be called at specific phases of the animation frame.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks)
*/
export interface PhaseCallbacks extends Object {
/**
* A callback called before rendering.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks)
*/
prepare?: PhaseCallback;
/**
* A callback to execute rendering logic.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks)
*/
render?: PhaseCallback;
/**
* A callback to execute state update logic.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseCallbacks)
*/
update?: PhaseCallback;
@@ -1553,271 +1559,275 @@ declare namespace __esri {
/**
* An object with timing information.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent)
*/
export interface PhaseEvent extends Object {
/**
* The absolute time at the start of the current animation frame.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent)
*/
time: number;
/**
* The elapsed time since the last animation frame.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent)
*/
deltaTime: number;
/**
* The amount of time spent within the current animation frame. This can be used for budgeting (e.g. some tasks may already have run).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-scheduling.html#PhaseEvent)
*/
elapsedFrameTime: number;
}
-
interface urlUtils {
/**
* Adds the given proxy rule to the proxy rules list: `esriConfig.request.proxyRules`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-urlUtils.html#addProxyRule)
- *
+ *
* @param rule An object specifying a URL that should use the proxy. See the object specification table below for the required properties of this object.
* @param rule.proxyUrl The URL of the proxy.
* @param rule.urlPrefix The URL prefix of the resources that should be accessed through the given proxy.
- *
+ *
*/
addProxyRule(rule: urlUtilsAddProxyRuleRule): number;
/**
* Returns the proxy rule that matches the given URL.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-urlUtils.html#getProxyRule)
- *
+ *
* @param url The URL of the resources accessed via proxy.
- *
+ *
*/
getProxyRule(url: string): any;
/**
* Converts the URL arguments to an object representation.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-urlUtils.html#urlToObject)
- *
+ *
* @param url The input URL.
- *
+ *
*/
urlToObject(url: string): any;
}
export const urlUtils: urlUtils;
-
export interface urlUtilsAddProxyRuleRule extends Object {
/**
* The URL of the proxy.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-urlUtils.html#addProxyRule)
*/
proxyUrl: string;
/**
* The URL prefix of the resources that should be accessed through the given proxy.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-urlUtils.html#addProxyRule)
*/
urlPrefix: string;
}
-
interface watchUtils {
/**
* Watches a property for changes and calls the callback with the initial value of the property.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#init)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call with the initial value of the property when the property changes.
- *
+ *
*/
init(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for changes and automatically attaches and detaches an event handler for a given event to the property value as needed. The attachedHandler and detachedHandler are optional and if provided will be called whenever the event handler is attached and detached respectively.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#on)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param eventName The name of the event to attach the event handler for.
* @param eventHandler The event handler callback function.
* @param attachedHandler Callback called each time the event handler is attached.
* @param detachedHandler Callback called each time the event handler is detached.
- *
+ *
*/
- on(obj: Accessor, propertyName: string | string[], eventName: string, eventHandler: Function, attachedHandler?: EventAttachedCallback, detachedHandler?: EventAttachedCallback): WatchHandle;
+ on(
+ obj: Accessor,
+ propertyName: string | string[],
+ eventName: string,
+ eventHandler: Function,
+ attachedHandler?: EventAttachedCallback,
+ detachedHandler?: EventAttachedCallback
+ ): WatchHandle;
/**
* Watches a property for changes once. The returned watch handle is removed after the first time the callback has been invoked. The returned handle additionally implements the Promise interface and can be used to create a promise chain to asynchronously handle a property value becoming truthy. The promise result is an object containing a `value`, `oldValue`, `propertyName` and `target`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#once)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
once(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
/**
* Watches a property for changes. The returned handle can be paused (and resumed) to temporarily prevent the callback from being called on property changes.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#pausable)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
pausable(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PausableWatchHandle;
/**
* Watches a property for changes. This is an alias for [Accessor.watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch), provided for completeness.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#watch)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
watch(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for becoming truthy. As with module:esri/core/watchUtils#init, the callback is called initially if the property is initially truthy.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#when)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
when(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for becoming `defined`. As with init(), the callback is called if the property is initially defined.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenDefined)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenDefined(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for becoming `defined` once. As with init(), the callback is called if the property is initially `defined`. The returned watch handle is removed after the first time the callback has been invoked. The returned handle additionally implements the Promise interface and can be used to create a promise chain to asynchronously handle a property value becoming defined. The promise result is an object containing a `value`, `oldValue`, `propertyName` and `target`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenDefinedOnce)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenDefinedOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
/**
* Watches a property for becoming `false`. As with init(), the callback is called if the property is initially `false`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenFalse)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenFalse(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for becoming `false` once. As with init(), the callback is called if the property is initially `false`. The returned watch handle is removed after the first time the callback has been invoked. The returned handle additionally implements the Promise interface and can be used to create a promise chain to asynchronously handle a property value becoming false. The promise result is an object containing a `value`, `oldValue`, `propertyName` and `target`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenFalseOnce)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenFalseOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
/**
* Watches a property for becoming falsy. As with module:esri/core/watchUtils#init, the callback is called initially if the property is initially falsy.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenNot)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenNot(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for becoming falsy once. As with init(), the callback is called if the property is initially falsy. The returned watch handle is removed after the first time the callback has been invoked. The returned handle additionally implements the Promise interface and can be used to create a promise chain to asynchronously handle a property value becoming falsy. The promise result is an object containing a `value`, `oldValue`, `propertyName` and `target`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenNotOnce)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenNotOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
/**
* Watches a property for becoming truthy once. As with init(), the callback is called if the property is initially truthy. The returned watch handle is removed after the first time the callback has been invoked. The returned handle additionally implements the Promise interface and can be used to create a promise chain to asynchronously handle a property value becoming truthy. The promise result is an object containing a `value`, `oldValue`, `propertyName` and `target`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenOnce)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
/**
* Watches a property for becoming `true`. As with init(), the callback is called if the property is initially `true`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenTrue)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenTrue(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for becoming `true` once. As with init(), the callback is called if the property is initially `true`. The returned watch handle is removed after the first time the callback has been invoked. The returned handle additionally implements the Promise interface and can be used to create a promise chain to asynchronously handle a property value becoming true. The promise result is an object containing a `value`, `oldValue`, `propertyName` and `target`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenTrueOnce)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenTrueOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
/**
* Watches a property for becoming `undefined`. As with init(), the callback is called if the property is initially `undefined`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenUndefined)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenUndefined(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
/**
* Watches a property for becoming `undefined` once. As with init(), the callback is called if the property is initially `undefined`. The returned watch handle is removed after the first time the callback has been invoked. The returned handle additionally implements the Promise interface and can be used to create a promise chain to asynchronously handle a property value becoming undefined. The promise result is an object containing a `value`, `oldValue`, `propertyName` and `target`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenUndefinedOnce)
- *
+ *
* @param obj The object containing the property to watch.
* @param propertyName The name of the property to watch.
* @param callback The function to call when the property changes.
- *
+ *
*/
whenUndefinedOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
}
@@ -1828,64 +1838,63 @@ declare namespace __esri {
/**
* Represents a watch created when an object invokes [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
*/
export interface PausableWatchHandle extends Object {
/**
* Removes the watch handle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
- *
- *
+ *
+ *
*/
remove(): void;
/**
* Pauses the handle preventing changes to invoke the associated callback.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
- *
- *
+ *
+ *
*/
pause(): void;
/**
* Resumes a paused the handle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
- *
- *
+ *
+ *
*/
resume(): void;
}
export interface PromisedWatchHandle extends IPromise {
-
remove(): void;
}
/**
* This module is a utility framework that simplifies the use of [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers) in the ArcGIS API for JavaScript.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html)
*/
interface workers {
/**
* Opens a connection to workers and loads a script with the workers framework.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open)
- *
+ *
* @param modulePath A fully qualified URL to a script to execute with the workers framework.
* @param options Worker options. See properties below for object specifications.
* @param options.client The objects defining the API accessible from the module.
- * @param options.strategy
- * Indicates how to load the module. See the table below for a list of possible values.
- *
+ * @param options.strategy
+ * Indicates how to load the module. See the table below for a list of possible values.
+ *
* Possible Value | Description
* ---------------|------------
* distributed | The module is loaded in each available worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting an available worker. Use this strategy if the module doesn't maintain information between invocations (stateless).
* dedicated | The module is loaded in one worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting a same worker. Use this strategy if the module maintains information from previous invocations or communication between main and worker threads needs to be stateful.
* local | The module is loaded in the main thread. Use this strategy if when using the worker framework API while disabling the use of workers.
- *
+ *
*/
open(modulePath: string, options?: workersOpenOptions): IPromise;
}
@@ -1895,68 +1904,94 @@ declare namespace __esri {
interface Connection {
/**
* A convenient method that invokes a method on each worker.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#broadcast)
- *
+ *
* @param methodName The name of the remote method to invoke on all workers.
* @param data The unique parameter passed as argument of the remote method.
- *
+ * @param options An object specifying additional options. See the object specification table below for the required properties of this object.
+ * @param options.signal A signal to abort the executions of the remote method.
+ *
*/
- broadcast(methodName: string, data?: any): IPromise[];
+ broadcast(methodName: string, data?: any, options?: ConnectionBroadcastOptions): IPromise[];
/**
* Closes the existing connection instance to workers. Notifies all workers to destroy the connection instance and dispose the remote module.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#close)
- *
- *
+ *
+ *
*/
close(): void;
/**
* Invokes a [method](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#basic-invocation) on the remote module loaded with the worker.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke)
- *
+ *
* @param methodName The name of the method to be invoked in the script.
* @param data The unique parameter passed as argument of the remote method. See [Passing multiple parameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#multiple-parameters) section to pass more than one parameter to the remote method.
- * @param transferList An array of [Transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) objects. Each transferable object in the array should have a corresponding entry in the data object. See [Using transferables](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#using-transferables) section for more information.
- *
+ * @param options An object specifying additional options. See the object specification table below for the required properties of this object.
+ * @param options.transferList An array of [Transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) objects. Each transferable object in the array should have a corresponding entry in the data object. See [Using transferables](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#using-transferables) section for more information.
+ * @param options.signal A signal to abort the execution of the remote method.
+ *
*/
- invoke(methodName: string, data?: any, transferList?: any[]): IPromise;
+ invoke(methodName: string, data?: any, options?: ConnectionInvokeOptions): IPromise;
}
interface ConnectionConstructor {
/**
* This class is used to execute remote methods located on the module loaded into a separate thread via the [workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html)
*/
-
- new(): Connection;
+ new (): Connection;
}
export const Connection: ConnectionConstructor;
+ export interface ConnectionBroadcastOptions extends Object {
+ /**
+ * A signal to abort the executions of the remote method.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#broadcast)
+ */
+ signal?: AbortSignal;
+ }
+
+ export interface ConnectionInvokeOptions extends Object {
+ /**
+ * An array of [Transferable](https://developer.mozilla.org/en-US/docs/Web/API/Transferable) objects. Each transferable object in the array should have a corresponding entry in the data object. See [Using transferables](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#using-transferables) section for more information.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke)
+ */
+ transferList?: any[];
+ /**
+ * A signal to abort the execution of the remote method.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke)
+ */
+ signal?: AbortSignal;
+ }
export interface workersOpenOptions extends Object {
/**
* The objects defining the API accessible from the module.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open)
*/
client?: any;
/**
- * Indicates how to load the module. See the table below for a list of possible values.
- *
+ * Indicates how to load the module. See the table below for a list of possible values.
+ *
* Possible Value | Description
* ---------------|------------
* distributed | The module is loaded in each available worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting an available worker. Use this strategy if the module doesn't maintain information between invocations (stateless).
* dedicated | The module is loaded in one worker. Each call to [Connection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers-Connection.html#invoke) will be targeting a same worker. Use this strategy if the module maintains information from previous invocations or communication between main and worker threads needs to be stateful.
* local | The module is loaded in the main thread. Use this strategy if when using the worker framework API while disabling the use of workers.
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html#open)
- *
+ *
* @default distributed
*/
strategy?: any;
@@ -1964,68 +1999,124 @@ declare namespace __esri {
/**
* A convenience module for importing [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) classes when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/guide/typescript-setup/index.html). For example, rather than importing geometries one at a time like this:
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html)
*/
- interface geometry {
- }
+ namespace geometry {
+ /**
+ * Geometry types.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Geometry)
+ */
+ export type Geometry =
+ | __esri.Extent
+ | __esri.Multipoint
+ | __esri.Point
+ | __esri.Polygon
+ | __esri.Polyline
+ | __esri.Mesh;
- export const geometry: geometry;
+ /**
+ * Extent.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Extent)
+ */
+ export type Extent = __esri.Extent;
+ export const Extent: typeof __esri.Extent;
+
+ /**
+ * Multipoint.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Multipoint)
+ */
+ export type Multipoint = __esri.Multipoint;
+ export const Multipoint: typeof __esri.Multipoint;
+
+ /**
+ * Point.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Point)
+ */
+ export type Point = __esri.Point;
+ export const Point: typeof __esri.Point;
+
+ /**
+ * Polygon.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Polygon)
+ */
+ export type Polygon = __esri.Polygon;
+ export const Polygon: typeof __esri.Polygon;
+
+ /**
+ * Polyline.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Polyline)
+ */
+ export type Polyline = __esri.Polyline;
+ export const Polyline: typeof __esri.Polyline;
+
+ /**
+ * Mesh.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Mesh)
+ */
+ export type Mesh = __esri.Mesh;
+ export const Mesh: typeof __esri.Mesh;
+ }
interface Circle extends Polygon {
/**
* The center point of the circle. The center must be specified either as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or an array of longitude/latitude coordinates.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#center)
*/
center: Point;
/**
* Applicable when the spatial reference of the center point is either set to Web Mercator (wkid: 3857) or geographic/geodesic (wkid: 4326). When either of those spatial references is used, set geodesic to `true` to minimize distortion. Other coordinate systems will not create geodesic circles.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#geodesic)
- *
+ *
* @default false
*/
geodesic: boolean;
/**
* This value defines the number of points along the curve of the circle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#numberOfPoints)
- *
+ *
* @default 60
*/
numberOfPoints: number;
/**
* The radius of the circle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#radius)
- *
+ *
* @default 1000
*/
radius: number;
/**
* Unit of the radius. **Possible Values:** feet | kilometers | meters | miles | nautical-miles | yards
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#radiusUnit)
- *
+ *
* @default meters
*/
radiusUnit: string;
/**
* Creates a deep clone of Circle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#clone)
- *
- *
+ *
+ *
*/
clone(): Circle;
}
interface CircleConstructor {
-
-
- new(properties?: CircleProperties): Circle;
+ new (properties?: CircleProperties): Circle;
fromJSON(json: any): Circle;
}
@@ -2035,39 +2126,39 @@ declare namespace __esri {
interface CircleProperties extends PolygonProperties {
/**
* The center point of the circle. The center must be specified either as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or an array of longitude/latitude coordinates.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#center)
*/
center?: PointProperties;
/**
* Applicable when the spatial reference of the center point is either set to Web Mercator (wkid: 3857) or geographic/geodesic (wkid: 4326). When either of those spatial references is used, set geodesic to `true` to minimize distortion. Other coordinate systems will not create geodesic circles.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#geodesic)
- *
+ *
* @default false
*/
geodesic?: boolean;
/**
* This value defines the number of points along the curve of the circle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#numberOfPoints)
- *
+ *
* @default 60
*/
numberOfPoints?: number;
/**
* The radius of the circle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#radius)
- *
+ *
* @default 1000
*/
radius?: number;
/**
* Unit of the radius. **Possible Values:** feet | kilometers | meters | miles | nautical-miles | yards
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Circle.html#radiusUnit)
- *
+ *
* @default meters
*/
radiusUnit?: string;
@@ -2079,13 +2170,13 @@ declare namespace __esri {
* * degrees, minutes, and seconds
* * U.S. National Grid (USNG)
* * Military Grid Reference System (MGRS).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html)
*/
interface coordinateFormatter {
/**
* Parses coordinates in latitude/longitude notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The coordinates may use decimal degrees, degrees and decimal minutes, or degrees, minutes, and seconds format. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the latitude/longitude string. If no spatial reference is provided, it is assumed the latitude/longitude coordinates are in WGS84. **Supported characters**
- *
+ *
* | Symbol | Character | Name | Unicode number | HTML code |
* | --- | --- | --- | --- | --- |
* | Degree | * | Asterisk | U+002A | * |
@@ -2095,43 +2186,43 @@ declare namespace __esri {
* | Minute | ' | Apostrophe | U+0027 | ' |
* | | ′ | Prime | U+2032 | ′ |
* | Second | " | Quotation Mark | U+0022 | " |
- *
+ *
* The latitude/longitude string may contain leading and trailing whitespace, and may also contain a space, comma, or vertical bar symbol to separate the latitude from the longitude. It may also contain the characters 'N', 'S', 'E' and 'W', or use a minus (-) symbol to indicate the hemisphere of each value. Latitude/longitude notation examples:
* * 55 56 39.123N 003 09 43.034W
* * 55°56′39″N 3°09′43″W
* * 55~56.65205', -003~09.71723'
* * 55.9442008* | -3.1619539*
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromLatitudeLongitude)
- *
+ *
* @param coordinates The latitude/longitude notation string for the coordinates.
* @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm). If `null`, WGS84 will be used.
- *
+ *
*/
fromLatitudeLongitude(coordinates: string, spatialReference?: SpatialReference): Point;
/**
* Parses coordinates in Military Grid Reference System (MGRS) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the MGRS string. If no spatial reference is provided, it is assumed the MGRS string is referenced to WGS84. Note that the choice between zone 01 and 60 has no impact when reading from an MGRS notation string. The MGRS string can contain leading and trailing whitespace and can have whitespace between the grid zone designator, the 100km square identifier, and the numerical eastings and northings. MGRS notation examples:
* * 30UVG898998
* * 30UVG 89885 99877
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromMgrs)
- *
+ *
* @param coordinates The MGRS notation string for the coordinates.
* @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) referenced by the MGRS coordinates. If `null`, WGS84 will be used.
* @param conversionMode The mode used by the given MGRS coordinates. **Possible Values**: automatic | new-180-in-zone-01 | new-180-in-zone-60 | old-180-in-zone-01 | old-180-in-zone-60
- *
+ *
*/
fromMgrs(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point;
/**
* Parses coordinates in United States National Grid (USNG) notation, and returns a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) representing that location. The spatial reference provided must have an ellipsoid and datum matching those used by the source of the USNG string. If no spatial reference is provided and the USNG string is suffixed with "(NAD 27)", it is assumed the USNG string is referenced to NAD 27. If no spatial reference is provided and no such suffix exists, it is assumed the USNG string is referenced to WGS84. USNG notation examples:
* * 13TFJ 23 59
* * 13TFJ2374159574
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromUsng)
- *
+ *
* @param coordinates The USNG notation string for the coordinates.
* @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) that the USNG coordinates are in. If `null`, WGS84 will be used.
- *
+ *
*/
fromUsng(coordinates: string, spatialReference?: SpatialReference): Point;
/**
@@ -2139,42 +2230,42 @@ declare namespace __esri {
* * 30U 489885 6199877
* * 30U4898856199877
* * 30N 489885 6199877 (using N/S indicator)
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#fromUtm)
- *
+ *
* @param coordinates The UTM notation string for the coordinates.
* @param spatialReference A spatial reference object representing a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) that the UTM coordinates are in. If `null`, WGS84 will be used.
* @param conversionMode The latitude notation scheme used by the given UTM coordinates, either a latitudinal band, or a hemisphere designator. **Possible Values**: latitude-band-indicators | north-south-indicators
- *
+ *
*/
fromUtm(coordinates: string, spatialReference: SpatialReference, conversionMode: string): Point;
/**
* Indicates if all dependencies of this module have been loaded.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#isLoaded)
- *
- *
+ *
+ *
*/
isLoaded(): boolean;
/**
* Indicates if this module is supported in the current browser. The browser must support [WebAssembly](https://caniuse.com/#feat=wasm).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#isSupported)
- *
- *
+ *
+ *
*/
isSupported(): boolean;
/**
* Load this module's dependencies.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#load)
- *
- *
+ *
+ *
*/
load(): IPromise;
/**
* Returns formatted coordinates in latitude/longitude notation representing the given point's location. The latitude/longitude string will contain a space separating the latitude from the longitude value, and the characters 'N' or 'S', and 'E' and 'W', to indicate the hemisphere of each value. The string will also contain spaces separating the components (degrees, minutes, seconds) of each value. The precision of the output is controlled by both the `format` and `decimalPlaces` parameters. For example:
- *
+ *
* | Decimal places | format | Example output | Angular precision | Approximate precision |
* | --- | --- | --- | --- | --- |
* | 0 | dd | 056N 0003W | 1deg | 100km |
@@ -2189,19 +2280,19 @@ declare namespace __esri {
* | 1 | dms | 55 56 39.1N 003 09 43.0W | 0.1sec| 3m |
* | 2 | dms | 55 56 39.12N 003 09 43.03W | 0.01sec | 300mm |
* | 3 | dms | 55 56 39.123N 003 09 43.034W | 0.001sec | 30mm |
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toLatitudeLongitude)
- *
+ *
* @param point The location to be represented as a formatted latitude/longitude string. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm).
* @param format The mode to use when formatting the latitude/longitude string. **Possible Values**: dd | ddm | dms
* @param decimalPlaces The number of decimal places to use, it should be an integer from 0 to 16.
- *
+ *
*/
toLatitudeLongitude(point: Point, format: string, decimalPlaces?: number): string;
/**
* Returns formatted coordinates in Military Grid Reference System (MGRS) notation representing the given point's location. Note that the choice between zone 01 and 60 has an impact only when generating the MGRS notation string for a point with longitude of exactly 180deg. The precision value controls the number of digits used to represent each numerical easting and northing value within the MGRS string. For example:
- *
+ *
* | precision | add_spaces | Example output | Approximate precision |
* | --- | --- | --- | --- |
* | 0 | false | 30UVG | 100km |
@@ -2216,20 +2307,20 @@ declare namespace __esri {
* | 3 | true | 30U VG 898 998 | 100m |
* | 4 | true | 30U VG 8988 9988 | 10m |
* | 5 | true | 30U VG 89884 99881 | 1m |
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toMgrs)
- *
+ *
* @param point The location to be represented in MGRS notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm)
* @param conversionMode The mode to use for the returned MGRS notation string. **Possible Values**: automatic | new-180-in-zone-01 | new-180-in-zone-60 | old-180-in-zone-01 | old-180-in-zone-60
* @param precision The precision with which to represent the coordinates, it should be an integer from 0 to 8.
* @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values.
- *
+ *
*/
toMgrs(point: Point, conversionMode: string, precision?: number, addSpaces?: boolean): string;
/**
* Returns formatted coordinates in United States National Grid (USNG) notation representing the given point's location. The precision value controls the number of digits used to represent each numerical easting and northing value within the USNG string. For example:
- *
+ *
* | precision | add_spaces | Example output | Approximate precision |
* | --- | --- | --- | --- |
* | 0 | false | 13TFJ | 100km |
@@ -2247,33 +2338,33 @@ declare namespace __esri {
* | 4* | false | 13TFJ23795929 (NAD 27) | 10m |
* | 2* | true | 13T FJ 23 59 (NAD 27) | 1km |
* * *When the point's spatial reference is based on NAD 27.*
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toUsng)
- *
+ *
* @param point The location to be represented in USNG notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm).
* @param precision The precision with which to represent the coordinates, it should be an integer from 0 to 8.
* @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the grid zone designator, the 100km square identifier, and the numerical easting and northing values.
- *
+ *
*/
toUsng(point: Point, precision?: number, addSpaces?: boolean): string;
/**
* Returns formatted coordinates in Universal Transverse Mercator (UTM) notation representing the given point's location. Example output for a point in the southern hemisphere:
- *
+ *
* | conversionMode | add_spaces | Example output |
* | --- | --- | --- |
* | latitude-band-indicators | false | 30U4898846199881 |
* | latitude-band-indicators | true | 30U 489884 6199881 |
* | north-south-indicators | false | 30N4898846199881 |
* | north-south-indicators | true | 30N 489884 6199881 |
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-coordinateFormatter.html#toUtm)
- *
+ *
* @param point The location to be represented in UTM notation. The point's [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#spatialReference) should either be WGS84 or another [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm)
* @param conversionMode The latitude notation scheme to use in the returned UTM notation string, either a latitudinal band, or a hemisphere designator. **Possible Values**: latitude-band-indicators | north-south-indicators
* @param addSpaces If `false`, the generated string will contain no spaces. If `true`, a space separates the UTM zone and latitude designator and each numerical easting and northing value.
- *
+ *
*/
toUtm(point: Point, conversionMode: string, addSpaces?: boolean): string;
}
@@ -2283,191 +2374,189 @@ declare namespace __esri {
interface Extent extends Geometry {
/**
* The center point of the extent in map units.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#center)
*/
readonly center: Point;
/**
* The height of the extent in map units (the distance between [ymin](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymin) and [ymax](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymax)).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#height)
*/
readonly height: number;
/**
* The maximum possible `m` value in an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#mmax)
- *
+ *
* @default undefined
*/
mmax: number;
/**
* The minimum possible `m` value of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#mmin)
- *
+ *
* @default undefined
*/
mmin: number;
/**
* For Extent, the type is always `extent`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#type)
*/
readonly type: "extent";
/**
* The width of the extent in map units (the distance between [xmin](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmin) and [xmax](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmax)).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#width)
*/
readonly width: number;
/**
* The bottom-right X-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmax)
- *
+ *
* @default 0
*/
xmax: number;
/**
* The top-left X-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmin)
- *
+ *
* @default 0
*/
xmin: number;
/**
* The top-right Y-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymax)
- *
+ *
* @default 0
*/
ymax: number;
/**
* The bottom-left Y-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymin)
- *
+ *
* @default 0
*/
ymin: number;
/**
- * The maximum possible `z`, or elevation, value in an extent envelope.
+ * The maximum possible `z`, or elevation, value in an extent envelope.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#zmax)
- *
+ *
* @default undefined
*/
zmax: number;
/**
- * The minimum possible `z`, or elevation, value of an extent envelope.
+ * The minimum possible `z`, or elevation, value of an extent envelope.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#zmin)
- *
+ *
* @default undefined
*/
zmin: number;
/**
* Centers the extent to the specified [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). This method modifies the extent geometry in-place. You should [clone](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone) the extent object before calling this method where appropriate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#centerAt)
- *
+ *
* @param point The point to center the extent.
- *
+ *
*/
centerAt(point: Point): Extent;
/**
* Creates a deep clone of Extent object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone)
- *
- *
+ *
+ *
*/
clone(): Extent;
/**
* Checks if the input geometry is contained within the extent.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#contains)
- *
+ *
* @param geometry Input geometry to test if it is contained within the extent.
- *
+ *
*/
contains(geometry: Point | Extent): boolean;
/**
* Indicates if the input extent is equal to the testing extent.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#equals)
- *
+ *
* @param extent Input extent.
- *
+ *
*/
equals(extent: Extent): boolean;
/**
* Expands the extent by the given factor. For example, a value of 1.5 will expand the extent to be 50 percent larger than the original extent. This method modifies the extent geometry in-place. You should [clone](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone) the extent object before calling this method where appropriate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#expand)
- *
+ *
* @param factor The multiplier value.
- *
+ *
*/
expand(factor: number): Extent;
/**
* Shrinks the original extent to the intersection with the input extent. This method modifies the extent geometry in-place. You should [clone](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone) the extent object before calling this method where appropriate. If the original extent and the input extent have no intersection, the extent is not modified and null is returned.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#intersection)
- *
+ *
* @param extent The input extent to intersect.
- *
+ *
*/
intersection(extent: Extent): Extent;
/**
* Tests to validate if the input geometry intersects the extent and returns a Boolean value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#intersects)
- *
+ *
* @param geometry The geometry used to test the intersection. It can be a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html), [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html), [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) or [Multipoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html).
- *
+ *
*/
intersects(geometry: Geometry): boolean;
/**
* Returns an array with either one Extent that's been shifted to within +/- 180 or two Extents if the original extent intersects the International Dateline. This method modifies the extent geometry in-place. You should [clone](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone) the extent object before calling this method where appropriate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#normalize)
- *
- *
+ *
+ *
*/
normalize(): Extent[];
/**
* Modifies the extent geometry in-place with X and Y offsets in map units. You should [clone](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone) the extent object before calling this method where appropriate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#offset)
- *
+ *
* @param dx The offset distance in map units for the X-coordinate.
* @param dy The offset distance in map units for the Y-coordinate.
* @param dz The offset distance in map units for the Z-coordinate.
- *
+ *
*/
offset(dx: number, dy: number, dz: number): Extent;
/**
* Expands the original extent to include the extent of the input Extent. This method modifies the extent geometry in-place. You should [clone](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#clone) the extent object before calling this method where appropriate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#union)
- *
+ *
* @param extent The input extent to union.
- *
+ *
*/
union(extent: Extent): Extent;
}
interface ExtentConstructor {
-
-
- new(properties?: ExtentProperties): Extent;
+ new (properties?: ExtentProperties): Extent;
fromJSON(json: any): Extent;
}
@@ -2477,67 +2566,67 @@ declare namespace __esri {
interface ExtentProperties extends GeometryProperties {
/**
* The maximum possible `m` value in an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#mmax)
- *
+ *
* @default undefined
*/
mmax?: number;
/**
* The minimum possible `m` value of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#mmin)
- *
+ *
* @default undefined
*/
mmin?: number;
/**
* The bottom-right X-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmax)
- *
+ *
* @default 0
*/
xmax?: number;
/**
* The top-left X-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#xmin)
- *
+ *
* @default 0
*/
xmin?: number;
/**
* The top-right Y-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymax)
- *
+ *
* @default 0
*/
ymax?: number;
/**
* The bottom-left Y-coordinate of an extent envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#ymin)
- *
+ *
* @default 0
*/
ymin?: number;
/**
- * The maximum possible `z`, or elevation, value in an extent envelope.
+ * The maximum possible `z`, or elevation, value in an extent envelope.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#zmax)
- *
+ *
* @default undefined
*/
zmax?: number;
/**
- * The minimum possible `z`, or elevation, value of an extent envelope.
+ * The minimum possible `z`, or elevation, value of an extent envelope.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#zmin)
- *
+ *
* @default undefined
*/
zmin?: number;
@@ -2546,58 +2635,56 @@ declare namespace __esri {
interface Geometry extends Accessor, JSONSupport {
/**
* The cache is used to store values computed from geometries that need to cleared or recomputed upon mutation. An example is the extent of a polygon.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#cache)
*/
readonly cache: any;
/**
* The extent of the geometry. For a point, the extent is null.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#extent)
*/
readonly extent: Extent;
/**
* Indicates if the geometry has M values.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#hasM)
*/
hasM: boolean;
/**
- * Indicates if the geometry has Z (elevation) values.
+ * Indicates if the geometry has Z (elevation) values.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#hasZ)
*/
hasZ: boolean;
/**
* The spatial reference of the geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#spatialReference)
- *
+ *
* @default WGS84 (wkid: 4326)
*/
spatialReference: SpatialReference;
/**
* The geometry type. **Possible Values:** point | multipoint | polyline | polygon | extent | mesh
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#type)
*/
readonly type: string;
/**
* Creates a deep clone of the geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#clone)
- *
- *
+ *
+ *
*/
clone(): Geometry;
}
interface GeometryConstructor {
-
-
- new(properties?: GeometryProperties): Geometry;
+ new (properties?: GeometryProperties): Geometry;
fromJSON(json: any): Geometry;
}
@@ -2607,401 +2694,431 @@ declare namespace __esri {
interface GeometryProperties {
/**
* Indicates if the geometry has M values.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#hasM)
*/
hasM?: boolean;
/**
- * Indicates if the geometry has Z (elevation) values.
+ * Indicates if the geometry has Z (elevation) values.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#hasZ)
*/
hasZ?: boolean;
/**
* The spatial reference of the geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#spatialReference)
- *
+ *
* @default WGS84 (wkid: 4326)
*/
spatialReference?: SpatialReferenceProperties;
}
-
interface geometryEngine {
/**
* Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer)
- *
+ *
* @param geometry The buffer input geometry. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array.
* @param distance The specified distance(s) for buffering. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array. When using an array of geometries as input, the length of the geometry array does not have to equal the length of the `distance` array. For example, if you pass an array of four geometries: `[g1, g2, g3, g4]` and an array with one distance: `[d1]`, all four geometries will be buffered by the single distance value. If instead you use an array of three distances: `[d1, d2, d3]`, `g1` will be buffered by `d1`, `g2` by `d2`, and `g3` and `g4` will both be buffered by `d3`. The value of the geometry array will be matched one to one with those in the distance array until the final value of the distance array is reached, in which case that value will be applied to the remaining geometries.
* @param unit Measurement unit of the distance(s). Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
* @param unionResults Determines whether the output geometries should be unioned into a single polygon.
- *
+ *
*/
- buffer(geometry: Geometry | Geometry[], distance: number | number[], unit: string | number, unionResults?: boolean): Polygon | Polygon[];
+ buffer(
+ geometry: Geometry | Geometry[],
+ distance: number | number[],
+ unit: string | number,
+ unionResults?: boolean
+ ): Polygon | Polygon[];
/**
* Calculates the clipped geometry from a target geometry by an envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#clip)
- *
+ *
* @param geometry The geometry to be clipped.
* @param envelope The envelope used to clip.
- *
+ *
*/
clip(geometry: Geometry, envelope: Extent): Geometry;
/**
* Indicates if one geometry contains another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#contains)
- *
+ *
* @param containerGeometry The geometry that is tested for the "contains" relationship to the other geometry. Think of this geometry as the potential "container" of the `insideGeometry`.
* @param insideGeometry The geometry that is tested for the "within" relationship to the `containerGeometry`.
- *
+ *
*/
contains(containerGeometry: Geometry, insideGeometry: Geometry): boolean;
/**
* Calculates the convex hull of the input geometry. A convex hull is the smallest convex polygon that encloses a group of Objects, such as points. The input geometry can be a point, multipoint, polyline or polygon. The hull is typically a polygon but can also be a polyline or point in degenerate cases.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#convexHull)
- *
+ *
* @param geometry The input geometry.
* @param merge Dictates whether to merge output geometries.
- *
+ *
*/
convexHull(geometry: Geometry, merge?: boolean): Geometry | Geometry[];
/**
* Indicates if one geometry crosses another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#crosses)
- *
+ *
* @param geometry1 The geometry to cross.
* @param geometry2 The geometry being crossed.
- *
+ *
*/
crosses(geometry1: Geometry, geometry2: Geometry): boolean;
/**
* Split the input Polyline or Polygon where it crosses a cutting Polyline. For Polylines, all left cuts are grouped together in the first Geometry. Right cuts and coincident cuts are grouped in the second Geometry and each undefined cut, along with any uncut parts, are output as separate Polylines. For Polygons, all left cuts are grouped in the first Polygon, all right cuts are grouped in the second Polygon, and each undefined cut, along with any left-over parts after cutting, are output as a separate Polygon. If no cuts are returned then the array will be empty. An undefined cut will only be produced if a left cut or right cut was produced and there was a part left over after cutting, or a cut is bounded to the left and right of the cutter.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#cut)
- *
+ *
* @param geometry The geometry to be cut.
* @param cutter The polyline to cut the geometry.
- *
+ *
*/
cut(geometry: Geometry, cutter: Polyline): Geometry[];
/**
* Densify geometries by plotting points between existing vertices.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#densify)
- *
+ *
* @param geometry The geometry to be densified.
* @param maxSegmentLength The maximum segment length allowed. Must be a positive value.
* @param maxSegmentLengthUnit Measurement unit for maxSegmentLength. Defaults to the units of the input geometry. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
densify(geometry: Geometry, maxSegmentLength: number, maxSegmentLengthUnit: string | number): Geometry;
/**
* Creates the difference of two geometries. The resultant geometry is the portion of `inputGeometry` not in the `subtractor`. The dimension of the `subtractor` has to be equal to or greater than that of the `inputGeometry`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#difference)
- *
+ *
* @param inputGeometry The input geometry to subtract from.
* @param subtractor The geometry being subtracted from inputGeometry.
- *
+ *
*/
difference(inputGeometry: Geometry | Geometry[], subtractor: Geometry): Geometry | Geometry[];
/**
* Indicates if one geometry is disjoint (doesn't intersect in any way) with another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#disjoint)
- *
+ *
* @param geometry1 The base geometry that is tested for the "disjoint" relationship to the other geometry.
* @param geometry2 The comparison geometry that is tested for the "disjoint" relationship to the other geometry.
- *
+ *
*/
disjoint(geometry1: Geometry, geometry2: Geometry): boolean;
/**
- * Calculates the shortest planar distance between two geometries. Distance is reported in the linear units specified by `distanceUnit` or, if `distanceUnit` is null, the units of the spatialReference of input geometry.
+ * Calculates the shortest planar distance between two geometries. Distance is reported in the linear units specified by `distanceUnit` or, if `distanceUnit` is null, the units of the spatialReference of input geometry.
* > To calculate the geodesic distance between two points, first construct a [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) using the two points of interest as the beginning and ending points of a single path. Then use the polyline as input for the [geodesicLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength) method.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#distance)
- *
+ *
* @param geometry1 First input geometry.
* @param geometry2 Second input geometry.
* @param distanceUnit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
distance(geometry1: Geometry, geometry2: Geometry, distanceUnit: string | number): number;
/**
* Indicates if two geometries are equal.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#equals)
- *
+ *
* @param geometry1 First input geometry.
* @param geometry2 Second input geometry.
- *
+ *
*/
equals(geometry1: Geometry, geometry2: Geometry): boolean;
/**
* Returns an Object containing additional information about the input spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#extendedSpatialReferenceInfo)
- *
+ *
* @param spatialReference The input spatial reference.
- *
+ *
*/
extendedSpatialReferenceInfo(spatialReference: SpatialReference): any;
/**
* Flips a geometry on the horizontal axis. Can optionally be flipped around a point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#flipHorizontal)
- *
+ *
* @param geometry The input geometry to be flipped.
* @param flipOrigin Point to flip the geometry around. Defaults to the centroid of the geometry.
- *
+ *
*/
flipHorizontal(geometry: Geometry, flipOrigin?: Point): Geometry;
/**
* Flips a geometry on the vertical axis. Can optionally be flipped around a point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#flipVertical)
- *
+ *
* @param geometry The input geometry to be flipped.
* @param flipOrigin Point to flip the geometry around. Defaults to the centroid of the geometry.
- *
+ *
*/
flipVertical(geometry: Geometry, flipOrigin?: Point): Geometry;
/**
* Performs the generalize operation on the geometries in the cursor. Point and Multipoint geometries are left unchanged. Envelope is converted to a Polygon and then generalized.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#generalize)
- *
+ *
* @param geometry The input geometry to be generalized.
* @param maxDeviation The maximum allowed deviation from the generalized geometry to the original geometry.
* @param removeDegenerateParts When `true` the degenerate parts of the geometry will be removed from the output (may be undesired for drawing).
* @param maxDeviationUnit Measurement unit for maxDeviation. Defaults to the units of the input geometry. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
- generalize(geometry: Geometry, maxDeviation: number, removeDegenerateParts?: boolean, maxDeviationUnit?: string | number): Geometry;
+ generalize(
+ geometry: Geometry,
+ maxDeviation: number,
+ removeDegenerateParts?: boolean,
+ maxDeviationUnit?: string | number
+ ): Geometry;
/**
* Calculates the area of the input geometry. As opposed to [planarArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarArea), geodesicArea takes into account the curvature of the earth when performing this calculation. Therefore, when using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate areas using geodesicArea(). If the input geometries have a projected coordinate system other than Web Mercator, use [planarArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarArea) instead. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicArea)
- *
+ *
* @param geometry The input polygon.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for area units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.AreaUnit.Code.ACRE). **Possible Values:** acres | ares | hectares | square-feet | square-meters | square-yards | square-kilometers | square-miles
- *
+ *
*/
geodesicArea(geometry: Polygon, unit: string | number): number;
/**
* Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#buffer) instead. If the input geometries have a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicBuffer)
- *
+ *
* @param geometry The buffer input geometry. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array.
* @param distance The specified distance(s) for buffering. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array. When using an array of geometries as input, the length of the geometry array does not have to equal the length of the `distance` array. For example, if you pass an array of four geometries: `[g1, g2, g3, g4]` and an array with one distance: `[d1]`, all four geometries will be buffered by the single distance value. If instead you use an array of three distances: `[d1, d2, d3]`, `g1` will be buffered by `d1`, `g2` by `d2`, and `g3` and `g4` will both be buffered by `d3`. The value of the geometry array will be matched one to one with those in the distance array until the final value of the distance array is reached, in which case that value will be applied to the remaining geometries.
* @param unit Measurement unit of the distance(s). Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
* @param unionResults Determines whether the output geometries should be unioned into a single polygon.
- *
+ *
*/
- geodesicBuffer(geometry: Geometry | Geometry[], distance: number | number[], unit: string | number, unionResults?: boolean): Polygon | Polygon[];
+ geodesicBuffer(
+ geometry: Geometry | Geometry[],
+ distance: number | number[],
+ unit: string | number,
+ unionResults?: boolean
+ ): Polygon | Polygon[];
/**
* Returns a geodesically densified version of the input geometry. Use this function to draw the line(s) of the geometry along great circles.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicDensify)
- *
+ *
* @param geometry A polyline or polygon to densify.
* @param maxSegmentLength The maximum segment length allowed. This must be a positive value.
* @param maxSegmentLengthUnit Measurement unit for `maxSegmentLength`. If a unit is not specified, the units are considered to be the same as the units of the `geometry`. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
- geodesicDensify(geometry: Polyline | Polygon, maxSegmentLength: number, maxSegmentLengthUnit: string | number): Geometry;
+ geodesicDensify(
+ geometry: Polyline | Polygon,
+ maxSegmentLength: number,
+ maxSegmentLengthUnit: string | number
+ ): Geometry;
/**
* Calculates the length of the input geometry. As opposed to [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength), geodesicLength() takes into account the curvature of the earth when performing this calculation. Therefore, when using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate lengths using geodesicLength(). If the input geometries have a projected coordinate system other than Web Mercator, use [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength) instead. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength)
- *
+ *
* @param geometry The input geometry.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometry. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
geodesicLength(geometry: Geometry, unit: string | number): number;
/**
* Creates a new geometry through intersection between two geometries.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#intersect)
- *
+ *
* @param geometry The input geometry(ies).
* @param intersector The geometry being intersected.
- *
+ *
*/
intersect(geometry: Geometry | Geometry[], intersector: Geometry): Geometry | Geometry[];
/**
* Indicates if one geometry intersects another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#intersects)
- *
+ *
* @param geometry1 The geometry that is tested for the intersects relationship to the other geometry.
* @param geometry2 The geometry being intersected.
- *
+ *
*/
intersects(geometry1: Geometry, geometry2: Geometry): boolean;
/**
* Indicates if the given geometry is topologically simple.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#isSimple)
- *
+ *
* @param geometry The input geometry.
- *
+ *
*/
isSimple(geometry: Geometry): boolean;
/**
* Finds the coordinate of the geometry that is closest to the specified point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#nearestCoordinate)
- *
+ *
* @param geometry The geometry to consider.
* @param inputPoint The point used to search the nearest coordinate in the geometry.
- *
+ *
*/
nearestCoordinate(geometry: Geometry, inputPoint: Point): NearestPointResult;
/**
* Finds the vertex on the geometry nearest to the specified point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#nearestVertex)
- *
+ *
* @param geometry The geometry to consider.
* @param inputPoint The point used to search the nearest vertex in the geometry.
- *
+ *
*/
nearestVertex(geometry: Geometry, inputPoint: Point): NearestPointResult;
/**
* Finds all vertices in the given distance from the specified point, sorted from the closest to the furthest and returns them as an array of Objects.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#nearestVertices)
- *
+ *
* @param geometry The geometry to consider.
* @param inputPoint The point from which to measure.
* @param searchRadius The distance to search from the inputPoint in the units of the view's spatial reference.
* @param maxVertexCountToReturn The maximum number of vertices to return.
- *
+ *
*/
- nearestVertices(geometry: Geometry, inputPoint: Point, searchRadius: number, maxVertexCountToReturn: number): NearestPointResult[];
+ nearestVertices(
+ geometry: Geometry,
+ inputPoint: Point,
+ searchRadius: number,
+ maxVertexCountToReturn: number
+ ): NearestPointResult[];
/**
* The offset operation creates a geometry that is a constant planar distance from an input polyline or polygon. It is similar to buffering, but produces a one-sided result.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#offset)
- *
+ *
* @param geometry The geometries to offset.
* @param offsetDistance The planar distance to offset from the input geometry. If offsetDistance > 0, then the offset geometry is constructed to the right of the oriented input geometry, if offsetDistance = 0, then there is no change in the geometries, otherwise it is constructed to the left. For a simple polygon, the orientation of outer rings is clockwise and for inner rings it is counter clockwise. So the "right side" of a simple polygon is always its inside.
* @param offsetUnit Measurement unit of the offset distance. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
* @param joinType The join type. **Possible values:** round | bevel | miter | square
* @param bevelRatio Applicable when `joinType = 'miter'`; bevelRatio is multiplied by the offset distance and the result determines how far a mitered offset intersection can be located before it is beveled.
* @param flattenError Applicable when `joinType = 'round'`; flattenError determines the maximum distance of the resulting segments compared to the true circular arc. The algorithm never produces more than around 180 vertices for each round join.
- *
+ *
*/
- offset(geometry: Geometry | Geometry[], offsetDistance: number, offsetUnit: string | number, joinType: string, bevelRatio?: number, flattenError?: number): Geometry | Geometry[];
+ offset(
+ geometry: Geometry | Geometry[],
+ offsetDistance: number,
+ offsetUnit: string | number,
+ joinType: string,
+ bevelRatio?: number,
+ flattenError?: number
+ ): Geometry | Geometry[];
/**
* Indicates if one geometry overlaps another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#overlaps)
- *
+ *
* @param geometry1 The base geometry that is tested for the "overlaps" relationship with the other geometry.
* @param geometry2 The comparison geometry that is tested for the "overlaps" relationship with the other geometry.
- *
+ *
*/
overlaps(geometry1: Geometry, geometry2: Geometry): boolean;
/**
* Calculates the area of the input geometry. As opposed to [geodesicArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicArea), planarArea() performs this calculation using projected coordinates and does not take into account the earth's curvature. When using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate areas using [geodesicArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicArea). If the input geometries have a projected coordinate system other than Web Mercator, use planarArea() instead.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarArea)
- *
+ *
* @param geometry The input polygon.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for area units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.AreaUnit.Code.ACRE). **Possible Values:** acres | ares | hectares | square-feet | square-meters | square-yards | square-kilometers | square-miles
- *
+ *
*/
planarArea(geometry: Polygon, unit: string | number): number;
/**
* Calculates the length of the input geometry. As opposed to [geodesicLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength), planarLength() uses projected coordinates and does not take into account the curvature of the earth when performing this calculation. When using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate lengths using [geodesicLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#geodesicLength). If the input geometries have a projected coordinate system other than Web Mercator, use planarLength() instead.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#planarLength)
- *
+ *
* @param geometry The input geometry.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
planarLength(geometry: Geometry, unit: string | number): number;
/**
* Indicates if the given DE-9IM relation holds for the two geometries.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#relate)
- *
+ *
* @param geometry1 The first geometry for the relation.
* @param geometry2 The second geometry for the relation.
* @param relation The Dimensionally Extended 9 Intersection Model (DE-9IM) matrix relation (encoded as a string) to test against the relationship of the two geometries. This string contains the test result of each intersection represented in the DE-9IM matrix. Each result is one character of the string and may be represented as either a number (maximum dimension returned: `0`,`1`,`2`), a Boolean value (`T` or `F`), or a mask character (for ignoring results: '\*'). Example: Each of the following DE-9IM string codes are valid for testing whether a polygon geometry completely contains a line geometry: `TTTFFTFFT` (Boolean), 'T*\*\*\*\*\*FF\*' (ignore irrelevant intersections), or '102FF\*FF\*' (dimension form). Each returns the same result. See [this article](https://en.wikipedia.org/wiki/DE-9IM) and [this ArcGIS help page](https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/relational-functions-for-st-geometry.htm) for more information about the DE-9IM model and how string codes are constructed.
- *
+ *
*/
relate(geometry1: Geometry, geometry2: Geometry, relation: string): boolean;
/**
* Rotates a geometry counterclockwise by the specified number of degrees. Rotation is around the centroid, or a given rotation point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#rotate)
- *
+ *
* @param geometry The geometry to rotate.
* @param angle The rotation angle in degrees.
* @param rotationOrigin Point to rotate the geometry around. Defaults to the centroid of the geometry.
- *
+ *
*/
rotate(geometry: Geometry, angle: number, rotationOrigin?: Point): Geometry;
/**
* Performs the simplify operation on the geometry which alters the given geometries to make their definitions topologically legal with respect to their geometry type.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify)
- *
+ *
* @param geometry The geometry to be simplified.
- *
+ *
*/
simplify(geometry: Geometry): Geometry;
/**
* Creates the symmetric difference of two geometries. The symmetric difference includes the parts that are in either of the sets, but not in both.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#symmetricDifference)
- *
+ *
* @param leftGeometry One of the Geometry instances in the XOR operation.
* @param rightGeometry One of the Geometry instances in the XOR operation.
- *
+ *
*/
symmetricDifference(leftGeometry: Geometry | Geometry[], rightGeometry: Geometry): Geometry | Geometry[];
/**
* Indicates if one geometry touches another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#touches)
- *
+ *
* @param geometry1 The geometry to test the "touches" relationship with the other geometry.
* @param geometry2 The geometry to be touched.
- *
+ *
*/
touches(geometry1: Geometry, geometry2: Geometry): boolean;
/**
* All inputs must be of the same type of geometries and share one spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#union)
- *
+ *
* @param geometries An array of Geometries to union.
- *
+ *
*/
union(geometries: Geometry[]): Geometry;
/**
* Indicates if one geometry is within another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#within)
- *
+ *
* @param innerGeometry The base geometry that is tested for the "within" relationship to the other geometry.
* @param outerGeometry The comparison geometry that is tested for the "contains" relationship to the other geometry.
- *
+ *
*/
within(innerGeometry: Geometry, outerGeometry: Geometry): boolean;
}
@@ -3010,416 +3127,446 @@ declare namespace __esri {
/**
* Object returned from the [nearestCoordinate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#nearestCoordinate), [nearestVertex()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#nearestVertex), and [nearestVertices()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#nearestVertices) methods.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult)
*/
export interface NearestPointResult extends Object {
/**
* A vertex within the specified distance of the search.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult)
*/
coordinate: Point;
/**
* The distance from the `inputPoint` in the units of the view's spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult)
*/
distance: number;
/**
* Indicates if the vertex is on the right side of the `geometry`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult)
*/
isRightSide: boolean;
/**
* The index of the vertex within the geometry's rings or paths.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult)
*/
vertexIndex: number;
/**
* Indicates if it is an empty geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#NearestPointResult)
*/
isEmpty: boolean;
}
-
interface geometryEngineAsync {
/**
* Creates planar (or Euclidean) buffer polygons at a specified distance around the input geometries. The GeometryEngine has two methods for buffering geometries client-side: buffer and [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer). Use caution when deciding which method to use. As a general rule, use [geodesicBuffer](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer) if the input geometries have a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator). Only use buffer (this method) when attempting to buffer geometries with a [projected coordinate system](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) other than Web Mercator. If you need to buffer geometries with a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer)
- *
+ *
* @param geometry The buffer input geometry. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array.
* @param distance The specified distance(s) for buffering. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array. When using an array of geometries as input, the length of the geometry array does not have to equal the length of the `distance` array. For example, if you pass an array of four geometries: `[g1, g2, g3, g4]` and an array with one distance: `[d1]`, all four geometries will be buffered by the single distance value. If instead you use an array of three distances: `[d1, d2, d3]`, `g1` will be buffered by `d1`, `g2` by `d2`, and `g3` and `g4` will both be buffered by `d3`. The value of the geometry array will be matched one to one with those in the distance array until the final value of the distance array is reached, in which case that value will be applied to the remaining geometries.
* @param unit Measurement unit of the distance(s). Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
* @param unionResults Determines whether the output geometries should be unioned into a single polygon.
- *
+ *
*/
- buffer(geometry: Geometry | Geometry[], distance: number | number[], unit: string | number, unionResults?: boolean): IPromise;
+ buffer(
+ geometry: Geometry | Geometry[],
+ distance: number | number[],
+ unit: string | number,
+ unionResults?: boolean
+ ): IPromise;
/**
* Calculates the clipped geometry from a target geometry by an envelope.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#clip)
- *
+ *
* @param geometry The geometry to be clipped.
* @param envelope The envelope used to clip.
- *
+ *
*/
clip(geometry: Geometry, envelope: Extent): IPromise;
/**
* Indicates if one geometry contains another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#contains)
- *
+ *
* @param containerGeometry The geometry that is tested for the "contains" relationship to the other geometry. Think of this geometry as the potential "container" of the `insideGeometry`.
* @param insideGeometry The geometry that is tested for the "within" relationship to the `containerGeometry`.
- *
+ *
*/
contains(containerGeometry: Geometry, insideGeometry: Geometry): IPromise;
/**
* Calculates the convex hull of the input geometry. A convex hull is the smallest convex polygon that encloses a group of Objects, such as points. The input geometry can be a point, multipoint, polyline or polygon. The hull is typically a polygon but can also be a polyline or point in degenerate cases.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#convexHull)
- *
+ *
* @param geometry The input geometry.
* @param merge Dictates whether to merge output geometries.
- *
+ *
*/
convexHull(geometry: Geometry, merge?: boolean): IPromise;
/**
* Indicates if one geometry crosses another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#crosses)
- *
+ *
* @param geometry1 The geometry to cross.
* @param geometry2 The geometry being crossed.
- *
+ *
*/
crosses(geometry1: Geometry, geometry2: Geometry): IPromise;
/**
* Split the input Polyline or Polygon where it crosses a cutting Polyline. For Polylines, all left cuts are grouped together in the first Geometry. Right cuts and coincident cuts are grouped in the second Geometry and each undefined cut, along with any uncut parts, are output as separate Polylines. For Polygons, all left cuts are grouped in the first Polygon, all right cuts are grouped in the second Polygon, and each undefined cut, along with any left-over parts after cutting, are output as a separate Polygon. If no cuts are returned then the array will be empty. An undefined cut will only be produced if a left cut or right cut was produced and there was a part left over after cutting, or a cut is bounded to the left and right of the cutter.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#cut)
- *
+ *
* @param geometry The geometry to be cut.
* @param cutter The polyline to cut the geometry.
- *
+ *
*/
cut(geometry: Geometry, cutter: Polyline): IPromise;
/**
* Densify geometries by plotting points between existing vertices.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#densify)
- *
+ *
* @param geometry The geometry to be densified.
* @param maxSegmentLength The maximum segment length allowed. Must be a positive value.
* @param maxSegmentLengthUnit Measurement unit for maxSegmentLength. Defaults to the units of the input geometry. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
densify(geometry: Geometry, maxSegmentLength: number, maxSegmentLengthUnit: string | number): IPromise;
/**
* Creates the difference of two geometries. The resultant geometry is the portion of inputGeometry not in the subtractor. The dimension of the subtractor has to be equal to or greater than that of the inputGeometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#difference)
- *
+ *
* @param inputGeometry The input geometry to subtract from.
* @param subtractor The geometry being subtracted from inputGeometry.
- *
+ *
*/
difference(inputGeometry: Geometry | Geometry[], subtractor: Geometry): IPromise;
/**
* Indicates if one geometry is disjoint (doesn't intersect in any way) with another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#disjoint)
- *
+ *
* @param geometry1 The base geometry that is tested for the "disjoint" relationship to the other geometry.
* @param geometry2 The comparison geometry that is tested for the "disjoint" relationship to the other geometry.
- *
+ *
*/
disjoint(geometry1: Geometry, geometry2: Geometry): IPromise;
/**
- * Calculates the shortest planar distance between two geometries. Distance is reported in the linear units specified by `distanceUnit` or, if `distanceUnit` is null, the units of the spatialReference of input geometry.
+ * Calculates the shortest planar distance between two geometries. Distance is reported in the linear units specified by `distanceUnit` or, if `distanceUnit` is null, the units of the spatialReference of input geometry.
* > To calculate the geodesic distance between two points, first construct a [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html) using the two points of interest as the beginning and ending points of a single path. Then use the polyline as input for the [geodesicLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicLength) method.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#distance)
- *
+ *
* @param geometry1 First input geometry.
* @param geometry2 Second input geometry.
* @param distanceUnit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
distance(geometry1: Geometry, geometry2: Geometry, distanceUnit: string | number): IPromise;
/**
* Indicates if two geometries are equal.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#equals)
- *
+ *
* @param geometry1 First input geometry.
* @param geometry2 Second input geometry.
- *
+ *
*/
equals(geometry1: Geometry, geometry2: Geometry): IPromise;
/**
* Returns an Object containing additional information about the input spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#extendedSpatialReferenceInfo)
- *
+ *
* @param spatialReference The input spatial reference.
- *
+ *
*/
extendedSpatialReferenceInfo(spatialReference: SpatialReference): IPromise;
/**
* Flips a geometry on the horizontal axis. Can optionally be flipped around a point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#flipHorizontal)
- *
+ *
* @param geometry The input geometry to be flipped.
* @param flipOrigin Point to flip the geometry around. Defaults to the centroid of the geometry.
- *
+ *
*/
flipHorizontal(geometry: Geometry, flipOrigin?: Point): IPromise;
/**
* Flips a geometry on the vertical axis. Can optionally be flipped around a point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#flipVertical)
- *
+ *
* @param geometry The input geometry to be flipped.
* @param flipOrigin Point to flip the geometry around. Defaults to the centroid of the geometry.
- *
+ *
*/
flipVertical(geometry: Geometry, flipOrigin?: Point): IPromise;
/**
* Performs the generalize operation on the geometries in the cursor. Point and Multipoint geometries are left unchanged. Envelope is converted to a Polygon and then generalized.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#generalize)
- *
+ *
* @param geometry The input geometry to be generalized.
* @param maxDeviation The maximum allowed deviation from the generalized geometry to the original geometry.
* @param removeDegenerateParts When `true` the degenerate parts of the geometry will be removed from the output (may be undesired for drawing).
* @param maxDeviationUnit Measurement unit for maxDeviation. Defaults to the units of the input geometry. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
- generalize(geometry: Geometry, maxDeviation: number, removeDegenerateParts?: boolean, maxDeviationUnit?: string | number): IPromise;
+ generalize(
+ geometry: Geometry,
+ maxDeviation: number,
+ removeDegenerateParts?: boolean,
+ maxDeviationUnit?: string | number
+ ): IPromise;
/**
* Calculates the area of the input geometry. As opposed to [planarArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarArea), geodesicArea takes into account the curvature of the earth when performing this calculation. Therefore, when using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate areas using geodesicArea(). If the input geometries have a projected coordinate system other than Web Mercator, use [planarArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarArea) instead. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicArea)
- *
+ *
* @param geometry The input polygon.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for area units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.AreaUnit.Code.ACRE). **Possible Values:** acres | ares | hectares | square-feet | square-meters | square-yards | square-kilometers | square-miles
- *
+ *
*/
geodesicArea(geometry: Polygon, unit: string | number): IPromise;
/**
* Creates geodesic buffer polygons at a specified distance around the input geometries. When calculating distances, this method takes the curvature of the earth into account, which provides highly accurate results when dealing with very large geometries and/or geometries that spatially vary on a global scale where one projected coordinate system could not accurately plot coordinates and measure distances for all the geometries. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references. In general, if your input geometries are assigned one of those two spatial references, you should always use geodesicBuffer() to obtain the most accurate results for those geometries. If needing to buffer points assigned a [projected coordinate system other than Web Mercator](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm), use [buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#buffer) instead. If the input geometries have a [geographic coordinate system](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) other than WGS84 (wkid: 4326), use [GeometryService.buffer()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#buffer).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicBuffer)
- *
+ *
* @param geometry The buffer input geometry. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array.
* @param distance The specified distance(s) for buffering. The `geometry` and `distance` parameters must be specified as either both arrays or both non-arrays. Never specify one as an array and the other a non-array. When using an array of geometries as input, the length of the geometry array does not have to equal the length of the `distance` array. For example, if you pass an array of four geometries: `[g1, g2, g3, g4]` and an array with one distance: `[d1]`, all four geometries will be buffered by the single distance value. If instead you use an array of three distances: `[d1, d2, d3]`, `g1` will be buffered by `d1`, `g2` by `d2`, and `g3` and `g4` will both be buffered by `d3`. The value of the geometry array will be matched one to one with those in the distance array until the final value of the distance array is reached, in which case that value will be applied to the remaining geometries.
* @param unit Measurement unit of the distance(s). Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
* @param unionResults Determines whether the output geometries should be unioned into a single polygon.
- *
+ *
*/
- geodesicBuffer(geometry: Geometry | Geometry[], distance: number | number[], unit: string | number, unionResults?: boolean): IPromise;
+ geodesicBuffer(
+ geometry: Geometry | Geometry[],
+ distance: number | number[],
+ unit: string | number,
+ unionResults?: boolean
+ ): IPromise;
/**
* Returns a geodesically densified version of the input geometry. Use this function to draw the line(s) of the geometry along great circles.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicDensify)
- *
+ *
* @param geometry A polyline or polygon to densify.
* @param maxSegmentLength The maximum segment length allowed. This must be a positive value.
* @param maxSegmentLengthUnit Measurement unit for `maxSegmentLength`. If a unit is not specified, the units are considered to be the same as the units of the `geometry`. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
- geodesicDensify(geometry: Polyline | Polygon, maxSegmentLength: number, maxSegmentLengthUnit: string | number): IPromise;
+ geodesicDensify(
+ geometry: Polyline | Polygon,
+ maxSegmentLength: number,
+ maxSegmentLengthUnit: string | number
+ ): IPromise;
/**
* Calculates the length of the input geometry. As opposed to [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarLength), geodesicLength() takes into account the curvature of the earth when performing this calculation. Therefore, when using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate lengths using geodesicLength(). If the input geometries have a projected coordinate system other than Web Mercator, use [planarLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarLength) instead. This method only works with WGS84 (wkid: 4326) and [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator) spatial references.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicLength)
- *
+ *
* @param geometry The input geometry.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometry. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
geodesicLength(geometry: Geometry, unit: string | number): IPromise;
/**
* Creates a new geometry through intersection between two geometries.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#intersect)
- *
+ *
* @param geometry The input geometry(ies).
* @param intersector The geometry being intersected.
- *
+ *
*/
intersect(geometry: Geometry | Geometry[], intersector: Geometry): IPromise;
/**
* Indicates if one geometry intersects another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#intersects)
- *
+ *
* @param geometry1 The geometry that is tested for the intersects relationship to the other geometry.
* @param geometry2 The geometry being intersected.
- *
+ *
*/
intersects(geometry1: Geometry, geometry2: Geometry): IPromise;
/**
* Indicates if the given geometry is topologically simple.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#isSimple)
- *
+ *
* @param geometry The input geometry.
- *
+ *
*/
isSimple(geometry: Geometry): IPromise;
/**
* Finds the coordinate of the geometry that is closest to the specified point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#nearestCoordinate)
- *
+ *
* @param geometry The geometry to consider.
* @param inputPoint The point used to search the nearest coordinate in the geometry.
- *
+ *
*/
nearestCoordinate(geometry: Geometry, inputPoint: Point): IPromise;
/**
* Finds vertex on the geometry nearest to the specified point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#nearestVertex)
- *
+ *
* @param geometry The geometry to consider.
* @param inputPoint The point used to search the nearest vertex in the geometry.
- *
+ *
*/
nearestVertex(geometry: Geometry, inputPoint: Point): IPromise;
/**
* Finds all vertices in the given distance from the specified point, sorted from the closest to the furthest and returns them as an array of Objects.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#nearestVertices)
- *
+ *
* @param geometry The geometry to consider.
* @param inputPoint The point from which to measure.
* @param searchRadius The distance to search from the inputPoint in the units of the view's spatial reference.
* @param maxVertexCountToReturn The maximum number of vertices to return.
- *
+ *
*/
- nearestVertices(geometry: Geometry, inputPoint: Point, searchRadius: number, maxVertexCountToReturn: number): IPromise;
+ nearestVertices(
+ geometry: Geometry,
+ inputPoint: Point,
+ searchRadius: number,
+ maxVertexCountToReturn: number
+ ): IPromise;
/**
* The offset operation creates a geometry that is a constant planar distance from an input polyline or polygon. It is similar to buffering, but produces a one-sided result.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#offset)
- *
+ *
* @param geometry The geometries to offset.
* @param offsetDistance The planar distance to offset from the input geometry. If offsetDistance > 0, then the offset geometry is constructed to the right of the oriented input geometry, if offsetDistance = 0, then there is no change in the geometries, otherwise it is constructed to the left. For a simple polygon, the orientation of outer rings is clockwise and for inner rings it is counter clockwise. So the "right side" of a simple polygon is always its inside.
* @param offsetUnit Measurement unit of the offset distance. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
* @param joinType The join type. **Possible values:** round | bevel | miter | square
* @param bevelRatio Applicable when `joinType = 'miter'`; bevelRatio is multiplied by the offset distance and the result determines how far a mitered offset intersection can be located before it is beveled.
* @param flattenError Applicable when `joinType = 'round'`; flattenError determines the maximum distance of the resulting segments compared to the true circular arc. The algorithm never produces more than around 180 vertices for each round join.
- *
+ *
*/
- offset(geometry: Geometry | Geometry[], offsetDistance: number, offsetUnit: string | number, joinType: string, bevelRatio?: number, flattenError?: number): IPromise;
+ offset(
+ geometry: Geometry | Geometry[],
+ offsetDistance: number,
+ offsetUnit: string | number,
+ joinType: string,
+ bevelRatio?: number,
+ flattenError?: number
+ ): IPromise;
/**
* Indicates if one geometry overlaps another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#overlaps)
- *
+ *
* @param geometry1 The base geometry that is tested for the "overlaps" relationship with the other geometry.
* @param geometry2 The comparison geometry that is tested for the "overlaps" relationship with the other geometry.
- *
+ *
*/
overlaps(geometry1: Geometry, geometry2: Geometry): IPromise;
/**
* Calculates the area of the input geometry. As opposed to [geodesicArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicArea), planarArea() performs this calculation using projected coordinates and does not take into account the earth's curvature. When using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate areas using [geodesicArea()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicArea). If the input geometries have a projected coordinate system other than Web Mercator, use planarArea() instead.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarArea)
- *
+ *
* @param geometry The input polygon.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for area units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.AreaUnit.Code.ACRE). **Possible Values:** acres | ares | hectares | square-feet | square-meters | square-yards | square-kilometers | square-miles
- *
+ *
*/
planarArea(geometry: Polygon, unit: string | number): IPromise;
/**
* Calculates the length of the input geometry. As opposed to [geodesicLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicLength), planarLength() uses projected coordinates and does not take into account the curvature of the earth when performing this calculation. When using input geometries with a spatial reference of either WGS84 (wkid: 4326) or [Web Mercator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator), it is best practice to calculate lengths using [geodesicLength()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#geodesicLength). If the input geometries have a projected coordinate system other than Web Mercator, use planarLength() instead.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#planarLength)
- *
+ *
* @param geometry The input geometry.
* @param unit Measurement unit of the return value. Defaults to the units of the input geometries. Use one of the possible values listed below or any of the [numeric codes for linear units](https://developers.arcgis.com/java/api-reference/constant-values.html#com.esri.core.geometry.LinearUnit.Code.CENTIMETER). **Possible Values:** meters | feet | kilometers | miles | nautical-miles | yards
- *
+ *
*/
planarLength(geometry: Geometry, unit: string | number): IPromise;
/**
* Indicates if the given DE-9IM relation holds for the two geometries.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#relate)
- *
+ *
* @param geometry1 The first geometry for the relation.
* @param geometry2 The second geometry for the relation.
* @param relation The Dimensionally Extended 9 Intersection Model (DE-9IM) matrix relation (encoded as a string) to test against the relationship of the two geometries. This string contains the test result of each intersection represented in the DE-9IM matrix. Each result is one character of the string and may be represented as either a number (maximum dimension returned: `0`,`1`,`2`), a Boolean value (`T` or `F`), or a mask character (for ignoring results: '\*'). Example: Each of the following DE-9IM string codes are valid for testing whether a polygon geometry completely contains a line geometry: `TTTFFTFFT` (Boolean), 'T\*\*\*\*\*FF\*' (ignore irrelevant intersections), or '102FF\*FF\*' (dimension form). Each returns the same result. See [this article](https://en.wikipedia.org/wiki/DE-9IM) and [this ArcGIS help page](https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/relational-functions-for-st-geometry.htm) for more information about the DE-9IM model and how string codes are constructed.
- *
+ *
*/
relate(geometry1: Geometry, geometry2: Geometry, relation: string): IPromise;
/**
* Rotates a geometry counterclockwise by the specified number of degrees. Rotation is around the centroid, or a given rotation point.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#rotate)
- *
+ *
* @param geometry The geometry to rotate.
* @param angle The rotation angle in degrees.
* @param rotationOrigin Point to rotate the geometry around. Defaults to the centroid of the geometry.
- *
+ *
*/
rotate(geometry: Geometry, angle: number, rotationOrigin?: Point): IPromise;
/**
* Performs the simplify operation on the geometry which alters the given geometries to make their definitions topologically legal with respect to their geometry type.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#simplify)
- *
+ *
* @param geometry The geometry to be simplified.
- *
+ *
*/
simplify(geometry: Geometry): IPromise;
/**
* Creates the symmetric difference of two geometries. The symmetric difference includes the parts that are in either of the sets, but not in both.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#symmetricDifference)
- *
+ *
* @param leftGeometry One of the Geometry instances in the XOR operation.
* @param rightGeometry One of the Geometry instances in the XOR operation.
- *
+ *
*/
symmetricDifference(leftGeometry: Geometry | Geometry[], rightGeometry: Geometry): IPromise;
/**
* Indicates if one geometry touches another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#touches)
- *
+ *
* @param geometry1 The geometry to test the "touches" relationship with the other geometry.
* @param geometry2 The geometry to be touched.
- *
+ *
*/
touches(geometry1: Geometry, geometry2: Geometry): IPromise;
/**
* All inputs must be of the same type of geometries and share one spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#union)
- *
+ *
* @param geometries An array of Geometries to union.
- *
+ *
*/
union(geometries: Geometry[]): IPromise;
/**
* Indicates if one geometry is within another geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngineAsync.html#within)
- *
+ *
* @param innerGeometry The base geometry that is tested for the "within" relationship to the other geometry.
* @param outerGeometry The comparison geometry that is tested for the "contains" relationship to the other geometry.
- *
+ *
*/
within(innerGeometry: Geometry, outerGeometry: Geometry): IPromise;
}
@@ -3428,39 +3575,37 @@ declare namespace __esri {
interface HeightModelInfo extends Accessor, JSONSupport {
/**
- * The surface type or height model of the vertical coordinate system (VCS). A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers containing data that is compatible with the HeightModelInfo of the scene.
- *
+ * The surface type or height model of the vertical coordinate system (VCS). A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers containing data that is compatible with the HeightModelInfo of the scene.
+ *
* Value | Description
* ------|------------
* gravity-related-height | A gravity-related VCS may set its zero point through a local mean sea level or a benchmark, and is compatible with other gravity-related VCS for the purposes of rendering.
* ellipsoidal | An ellipsoidal VCS defines heights that are referenced to an ellipsoid of a geographic coordinate system.
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#heightModel)
- *
+ *
* @default "gravity-related-height"
*/
readonly heightModel: string;
/**
* The unit of the vertical coordinate system. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will use this property to check that the vertical data of layers that define a HeightModelInfo is compatible with the view. **Possible Values:** meters | feet | us-feet | clarke-feet | clarke-yards | clarke-links | sears-yards | sears-feet | sears-chains | benoit-1895-b-chains | indian-yards | indian-1937-yards | gold-coast-feet | sears-1922-truncated-chains | 50-kilometers | 150-kilometers
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#heightUnit)
- *
+ *
* @default "meters"
*/
readonly heightUnit: string;
/**
* The datum realization of the vertical coordinate system. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers that define a HeightModelInfo with an identical `vertCRS` to that of the scene, when using an `ellipsoidal` height model.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#vertCRS)
*/
readonly vertCRS: string;
}
interface HeightModelInfoConstructor {
-
-
- new(properties?: HeightModelInfoProperties): HeightModelInfo;
+ new (properties?: HeightModelInfoProperties): HeightModelInfo;
fromJSON(json: any): HeightModelInfo;
}
@@ -3469,30 +3614,30 @@ declare namespace __esri {
interface HeightModelInfoProperties {
/**
- * The surface type or height model of the vertical coordinate system (VCS). A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers containing data that is compatible with the HeightModelInfo of the scene.
- *
+ * The surface type or height model of the vertical coordinate system (VCS). A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers containing data that is compatible with the HeightModelInfo of the scene.
+ *
* Value | Description
* ------|------------
* gravity-related-height | A gravity-related VCS may set its zero point through a local mean sea level or a benchmark, and is compatible with other gravity-related VCS for the purposes of rendering.
* ellipsoidal | An ellipsoidal VCS defines heights that are referenced to an ellipsoid of a geographic coordinate system.
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#heightModel)
- *
+ *
* @default "gravity-related-height"
*/
heightModel?: string;
/**
* The unit of the vertical coordinate system. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will use this property to check that the vertical data of layers that define a HeightModelInfo is compatible with the view. **Possible Values:** meters | feet | us-feet | clarke-feet | clarke-yards | clarke-links | sears-yards | sears-feet | sears-chains | benoit-1895-b-chains | indian-yards | indian-1937-yards | gold-coast-feet | sears-1922-truncated-chains | 50-kilometers | 150-kilometers
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#heightUnit)
- *
+ *
* @default "meters"
*/
heightUnit?: string;
/**
* The datum realization of the vertical coordinate system. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers that define a HeightModelInfo with an identical `vertCRS` to that of the scene, when using an `ellipsoidal` height model.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#vertCRS)
*/
vertCRS?: string;
@@ -3501,94 +3646,94 @@ declare namespace __esri {
interface Mesh extends Geometry {
/**
* An array of mesh components that can be used to apply materials to different regions of the same mesh. There are three common usage patterns for components. 1. **Specify a material for the whole mesh.** In this case, use a single component with only a material (leaving faces as `null`). 2. **Reuse vertex attributes.** When modeling continuous surfaces, it can be convenient to only specify vertices once and then simply refer to them. In this case, use a single component with faces set to index the vertex attributes that form triangles. 3. **Specify multiple materials for the same mesh.** In this case, use multiple components with faces that determine to which region of the mesh the material of the component applies.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#components)
*/
components: MeshComponent[];
/**
* For Mesh, the type is always `mesh`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#type)
*/
readonly type: "mesh";
/**
* Object describing the attributes of each vertex of the mesh. Vertex attributes are flat numerical arrays that describe the position (mandatory), normal (used for lighting calculations and shading) and uv (used for mapping material images to the mesh surface) for each vertex. Vertex attributes can be addressed by indices specified in the components [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property. If the mesh does not contain any components, or if a component does not specify any faces, then the vertex attributes are interpreted as if each consecutive vertex triple makes up a triangle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
vertexAttributes: MeshVertexAttributes;
/**
* Adds a component to the mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#addComponent)
- *
+ *
* @param component The component to add.
- *
+ *
*/
addComponent(component: MeshComponent): void;
/**
* Centers the mesh at the specified location without changing its scale. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [centerAt()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt)
- *
+ *
* @param location The location at which to center the mesh.
* @param params Additional parameters.
* @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset applied to center the mesh is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
* @param params.origin The origin at which to center. If not specified, the mesh will be centered at the mesh extent center.
- *
+ *
*/
centerAt(location: Point, params?: MeshCenterAtParams): Mesh;
/**
* Creates a deep clone of the Mesh object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone)
- *
- *
+ *
+ *
*/
clone(): Mesh;
/**
* Offsets the mesh geometry by the specified distance in x, y, and z. The units of x, y, and z are the units of the spatial reference. When the offset is applied geographically (default for either WGS84 or WebMercator), then the offsets are interpreted in meters. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [offset()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset)
- *
+ *
* @param dx The amount to offset the geometry in the x direction.
* @param dy The amount to offset the geometry in the y direction.
* @param dz The amount to offset the geometry in the z direction.
* @param params Additional parameters.
* @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
- *
+ *
*/
offset(dx: number, dy: number, dz: number, params?: MeshOffsetParams): Mesh;
/**
* Removes a component from the mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#removeComponent)
- *
+ *
* @param component The component to remove.
- *
+ *
*/
removeComponent(component: MeshComponent): void;
/**
* Rotates the mesh geometry around its x, y and z axis (in that order). For each rotation angle, the rotation direction is clockwise when looking in the direction of the respective axis. The mesh will be modified in place. To modify a copy of the mesh instead, use [clone()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#clone) before calling [rotate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate)
- *
+ *
* @param angleX The angle by which to rotate around the x-axis (in degrees).
* @param angleY The angle by which to rotate around the y-axis (in degrees).
* @param angleZ The angle by which to rotate around the z-axis (in degrees).
* @param params Additional parameters.
* @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the rotation is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
* @param params.origin The origin around which to rotate. If not specified, the mesh will be rotated around the mesh extent center.
- *
+ *
*/
rotate(angleX: number, angleY: number, angleZ: number, params?: MeshRotateParams): Mesh;
/**
* Notifies that any cached values that depend on vertex attributes need to be recalculated. Use this method after modifying the vertex attributes in place so that values that depend on them (such as the calculation of the extent) are recalculated accordingly.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributesChanged)
- *
- *
+ *
+ *
*/
vertexAttributesChanged(): void;
}
@@ -3596,78 +3741,77 @@ declare namespace __esri {
interface MeshConstructor {
/**
* A mesh is a general, client-side 3D [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) type composed of [vertices with attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes). The vertices include geographic position, normals that affect lighting/shading and uv coordinates that can be used to map images to the mesh. Vertices are combined into 3D primitives to render the mesh in the scene (only triangle primitives are currently supported).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html)
*/
- new(properties?: MeshProperties): Mesh;
-
+ new (properties?: MeshProperties): Mesh;
/**
* Creates a mesh representing a box. The spatial reference of the resulting mesh is the same as the location where it is placed. **Box UV coordinate space** The box geometry will have UV coordinates generated according to the following scheme:
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
- *
+ *
* @param location The location bottom center of the box.
* @param params Additional parameters.
* @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location.
* @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
* @param params.material The material to be used for the mesh.
* @param params.imageFace The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box.
- *
+ *
*/
createBox(location: Point, params?: MeshCreateBoxParams): Mesh;
/**
* Creates a mesh representing a cylinder. The spatial reference of the resulting mesh is the same as the location where it is placed. **Cylinder UV coordinate space** The cylinder geometry will have UV coordinates generated according to the following scheme (example is shown for 8 vertices cylinder):
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
- *
+ *
* @param location The location of the bottom center of the cylinder.
* @param params Additional parameters.
* @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location.
* @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
* @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance).
* @param params.material The material to be used for the mesh.
- *
+ *
*/
createCylinder(location: Point, params?: MeshCreateCylinderParams): Mesh;
/**
* Creates a new mesh geometry from a polygon geometry. The resulting mesh contains only a position vertex attribute and a single component with faces. The default shading will be set to `flat`. The spatial reference of the resulting mesh is the same as the input polygon. The resulting mesh will not contain any uv nor normal vertex attributes.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon)
- *
+ *
* @param polygon The input polygon.
* @param params Optional parameters.
* @param params.material The material to be used for the mesh.
- *
+ *
*/
createFromPolygon(polygon: Polygon, params?: MeshCreateFromPolygonParams): Mesh;
/**
* Creates a mesh representing a plane. The spatial reference of the resulting mesh is the same as the location where it is placed. A plane consists of two triangles and may be conveniently oriented at creation time. **Plane UV coordinate space** The plane geometry will have UV coordinates generated according to the following scheme:
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
- *
+ *
* @param location The location of the bottom center of the plane.
* @param params Additional parameters.
* @param params.size A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location.
* @param params.facing Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`,
* @param params.geographic Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
* @param params.material The material to be used for the mesh.
- *
+ *
*/
createPlane(location: Point, params?: MeshCreatePlaneParams): Mesh;
/**
* Creates a mesh representing a sphere. The spatial reference of the resulting mesh is the same as the location where it is placed. **Sphere UV coordinate space** The sphere geometry will have UV coordinates generated according to the following scheme (example is shown for 8x8 vertices sphere):
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
- *
+ *
* @param location The location of the bottom center of the sphere.
* @param params Additional parameters.
* @param params.size A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location.
* @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
* @param params.densificationFactor The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance).
* @param params.material The material to be used for the mesh.
- *
+ *
*/
createSphere(location: Point, params?: MeshCreateSphereParams): Mesh;
@@ -3679,337 +3823,319 @@ declare namespace __esri {
interface MeshProperties extends GeometryProperties {
/**
* An array of mesh components that can be used to apply materials to different regions of the same mesh. There are three common usage patterns for components. 1. **Specify a material for the whole mesh.** In this case, use a single component with only a material (leaving faces as `null`). 2. **Reuse vertex attributes.** When modeling continuous surfaces, it can be convenient to only specify vertices once and then simply refer to them. In this case, use a single component with faces set to index the vertex attributes that form triangles. 3. **Specify multiple materials for the same mesh.** In this case, use multiple components with faces that determine to which region of the mesh the material of the component applies.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#components)
*/
components?: MeshComponentProperties[];
/**
* Object describing the attributes of each vertex of the mesh. Vertex attributes are flat numerical arrays that describe the position (mandatory), normal (used for lighting calculations and shading) and uv (used for mapping material images to the mesh surface) for each vertex. Vertex attributes can be addressed by indices specified in the components [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property. If the mesh does not contain any components, or if a component does not specify any faces, then the vertex attributes are interpreted as if each consecutive vertex triple makes up a triangle.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
vertexAttributes?: MeshVertexAttributesProperties;
}
-
export interface MeshCenterAtParams extends Object {
/**
* Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset applied to center the mesh is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt)
*/
geographic?: boolean;
/**
* The origin at which to center. If not specified, the mesh will be centered at the mesh extent center.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#centerAt)
*/
origin?: Point;
}
-
export interface MeshCreateBoxParams extends Object {
/**
* A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
size?: number | MeshCreateBoxParamsSize;
/**
* Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
geographic?: boolean;
/**
* The material to be used for the mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
material?: MeshCreateBoxParamsMaterial;
/**
* The face for generating image uv coordinates. By default, a single set of unwrapped UV coordinates are generated for all the faces. By setting the `imageFace` parameter to one of `east`, `west`, `north`, `south`, `up` or `down`, the specified face will have full sized UV coordinates while the other faces will pertain their regular unwrapped UV coordinates. This is useful for applying an image only to a single face of the box. The provided `material` parameter will be applied to the specified `imageFace`. The resulting mesh will have two components, the first contains the selected image face and the second contains the other faces of the box.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
imageFace?: string;
}
-
export interface MeshCreateBoxParamsMaterial extends Object {
/**
* The material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[];
}
-
export interface MeshCreateBoxParamsSize extends Object {
/**
* The width of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
width?: number;
/**
* The depth of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
depth?: number;
/**
* The height of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createBox)
*/
height?: number;
}
-
export interface MeshCreateCylinderParams extends Object {
/**
* A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
size?: number | MeshCreateCylinderParamsSize;
/**
* Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
geographic?: boolean;
/**
* The additional number of subdivisions for generating the mesh representing a cylinder. A densificationFactor parameter of 0 will generate a default of 16 vertices to approximate the cylinder. A densificationFactor of 1 will generate 32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect cylinder (at the cost of processing and rendering performance).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
densificationFactor?: number;
/**
* The material to be used for the mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
material?: MeshCreateCylinderParamsMaterial;
}
-
export interface MeshCreateCylinderParamsMaterial extends Object {
/**
* The material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
color: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[];
}
-
export interface MeshCreateCylinderParamsSize extends Object {
/**
* The width of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
width?: number;
/**
* The depth of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
depth?: number;
/**
* The height of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createCylinder)
*/
height?: number;
}
-
export interface MeshCreateFromPolygonParams extends Object {
/**
* The material to be used for the mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon)
*/
material?: MeshCreateFromPolygonParamsMaterial;
}
-
export interface MeshCreateFromPolygonParamsMaterial extends Object {
/**
* The material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createFromPolygon)
*/
color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[];
}
-
export interface MeshCreatePlaneParams extends Object {
/**
* A uniform size value or an object containing individual values width and height. The unit of the size values is derived from the spatial reference of the provided location.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
*/
size?: number | MeshCreatePlaneParamsSize;
/**
* Direction the plane is facing. Possible values are `east`, `west`, `north`, `south`, `up` and `down`. Defaults to `up`,
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
*/
facing?: string;
/**
* Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
*/
geographic?: boolean;
/**
* The material to be used for the mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
*/
material?: MeshCreatePlaneParamsMaterial;
}
-
export interface MeshCreatePlaneParamsMaterial extends Object {
/**
* The material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
*/
color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[];
}
-
export interface MeshCreatePlaneParamsSize extends Object {
/**
* The width of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
*/
width?: number;
/**
* The height of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createPlane)
*/
height?: number;
}
-
export interface MeshCreateSphereParams extends Object {
/**
* A uniform size value or an object containing individual values width, height and depth. The unit of the size values is derived from the spatial reference of the provided location.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
size?: number | MeshCreateSphereParamsSize;
/**
* Indicates whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the mesh is created in a Cartesian system with respect to the local coordinate system on the globe and sizes are specified in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
geographic?: boolean;
/**
* The additional number of subdivisions for generating the mesh representing a sphere. A densificationFactor parameter of 0 will generate a default of 16-by-16 vertices to approximate the sphere. A densificationFactor of 1 will generate 32-by-32 vertices, etc. The larger the densificationFactor, the better the mesh will approximate a perfect sphere (at the cost of processing and rendering performance).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
densificationFactor?: number;
/**
* The material to be used for the mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
material?: MeshCreateSphereParamsMaterial;
}
-
export interface MeshCreateSphereParamsMaterial extends Object {
/**
* The material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[];
}
-
export interface MeshCreateSphereParamsSize extends Object {
/**
* The width of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
width?: number;
/**
* The depth of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
depth?: number;
/**
* The height of the created mesh.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#createSphere)
*/
height?: number;
}
-
export interface MeshOffsetParams extends Object {
/**
* Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the offset is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#offset)
*/
geographic?: boolean;
}
-
export interface MeshRotateParams extends Object {
/**
* Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator). This parameter defaults to `true` for WebMercator and WGS84, and `false` for any other PCS. When true, the rotation is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate)
*/
geographic?: boolean;
/**
* The origin around which to rotate. If not specified, the mesh will be rotated around the mesh extent center.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#rotate)
*/
origin?: Point;
}
-
export interface MeshVertexAttributesProperties extends Object {
/**
* A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
position?: Float64Array | number[] | Float32Array;
/**
* A flat array of vertex uv coordinates (2 elements per vertex).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
uv?: Float32Array | number[] | Float64Array;
/**
* A flat array of the vertex normals (3 elements per vertex ranging from -1 to 1).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
normal?: Float32Array | number[] | Float64Array;
/**
* **Since: 4.9** A flat array of the vertex colors (4 elements per vertex ranging from 0 to 255). Vertex colors are multiplied by the component material color (if any is defined).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
color?: Uint8Array | number[] | Uint8ClampedArray;
@@ -4018,25 +4144,25 @@ declare namespace __esri {
export interface MeshVertexAttributes extends AnonymousAccessor {
/**
* A flat array of vertex positions. Vertex positions have x, y and z coordinates and they should be in the spatial reference system of the geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
position: Float64Array;
/**
* A flat array of vertex uv coordinates (2 elements per vertex).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
uv?: Float32Array;
/**
* A flat array of the vertex normals (3 elements per vertex ranging from -1 to 1).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
normal?: Float32Array;
/**
* **Since: 4.9** A flat array of the vertex colors (4 elements per vertex ranging from 0 to 255). Vertex colors are multiplied by the component material color (if any is defined).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes)
*/
color?: Uint8Array;
@@ -4045,68 +4171,66 @@ declare namespace __esri {
interface Multipoint extends Geometry {
/**
* An array of points.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#points)
*/
points: number[][];
/**
* For Multipoint, the type is always `multipoint`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#type)
*/
readonly type: "multipoint";
/**
* Adds a point to the Multipoint.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#addPoint)
- *
+ *
* @param point The point to add to the multipoint. The point can either be a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or an array of numbers representing XY coordinates.
- *
+ *
*/
addPoint(point: Point | number[]): Multipoint;
/**
* Creates a deep clone of Multipoint object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#clone)
- *
- *
+ *
+ *
*/
clone(): Multipoint;
/**
* Returns the point at the specified index.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#getPoint)
- *
+ *
* @param index The index of the point in the [points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#points) property.
- *
+ *
*/
getPoint(index: number): Point;
/**
* Removes a point from the Multipoint. The index specifies which point to remove.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#removePoint)
- *
+ *
* @param index The index of the point to remove.
- *
+ *
*/
removePoint(index: number): Point;
/**
* Updates the point at the specified index.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#setPoint)
- *
+ *
* @param index The index of the point in the [points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#points) property.
* @param point Point geometry that specifies the new location.
- *
+ *
*/
setPoint(index: number, point: Point): Multipoint;
}
interface MultipointConstructor {
-
-
- new(properties?: MultipointProperties): Multipoint;
+ new (properties?: MultipointProperties): Multipoint;
fromJSON(json: any): Multipoint;
}
@@ -4116,7 +4240,7 @@ declare namespace __esri {
interface MultipointProperties extends GeometryProperties {
/**
* An array of points.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#points)
*/
points?: number[][];
@@ -4125,97 +4249,97 @@ declare namespace __esri {
interface Point extends Geometry {
/**
* The latitude of the point if the spatial reference is Web Mercator (wkid: 3857) or WGS84 (wkid: 4326).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#latitude)
*/
latitude: number;
/**
* The longitude of the point if the spatial reference is Web Mercator (wkid: 3857) or WGS84 (wkid: 4326).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#longitude)
*/
longitude: number;
/**
* The m-coordinate of the point in map units.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#m)
- *
+ *
* @default undefined
*/
m: number;
/**
* For Point, the type is always `point`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#type)
*/
readonly type: "point";
/**
* The x-coordinate (easting) of the point in map units.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#x)
- *
+ *
* @default 0
*/
x: number;
/**
* The y-coordinate (northing) of the point in map units.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#y)
- *
+ *
* @default 0
*/
y: number;
/**
- * The z-coordinate (or elevation) of the point in map units.
+ * The z-coordinate (or elevation) of the point in map units.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#z)
- *
+ *
* @default undefined
*/
z: number;
/**
* Creates a deep clone of Point object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#clone)
- *
- *
+ *
+ *
*/
clone(): Point;
/**
* Copies all values from another Point instance.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#copy)
- *
+ *
* @param other The point to copy from.
- *
+ *
*/
copy(other: Point): void;
/**
* Computes the Euclidean distance between this Point and a given Point. Points must have the same spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#distance)
- *
+ *
* @param other The point to compute the distance to.
- *
+ *
*/
distance(other: Point): number;
/**
* Determines if the input point is equal to the point calling the function.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#equals)
- *
+ *
* @param point The input point to test.
- *
+ *
*/
equals(point: Point): boolean;
/**
* Modifies the point geometry in-place by shifting the X-coordinate to within +/- 180 span in map units. You should [clone](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#clone) the point object before calling this method where appropriate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#normalize)
- *
- *
+ *
+ *
*/
normalize(): Point;
}
@@ -4223,11 +4347,11 @@ declare namespace __esri {
interface PointConstructor {
/**
* A location defined by X, Y, and Z coordinates.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html)
*/
- new(properties?: PointProperties): Point;
+ new (properties?: PointProperties): Point;
fromJSON(json: any): Point;
}
@@ -4237,46 +4361,46 @@ declare namespace __esri {
interface PointProperties extends GeometryProperties {
/**
* The latitude of the point if the spatial reference is Web Mercator (wkid: 3857) or WGS84 (wkid: 4326).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#latitude)
*/
latitude?: number;
/**
* The longitude of the point if the spatial reference is Web Mercator (wkid: 3857) or WGS84 (wkid: 4326).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#longitude)
*/
longitude?: number;
/**
* The m-coordinate of the point in map units.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#m)
- *
+ *
* @default undefined
*/
m?: number;
/**
* The x-coordinate (easting) of the point in map units.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#x)
- *
+ *
* @default 0
*/
x?: number;
/**
* The y-coordinate (northing) of the point in map units.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#y)
- *
+ *
* @default 0
*/
y?: number;
/**
- * The z-coordinate (or elevation) of the point in map units.
+ * The z-coordinate (or elevation) of the point in map units.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html#z)
- *
+ *
* @default undefined
*/
z?: number;
@@ -4285,121 +4409,121 @@ declare namespace __esri {
interface Polygon extends Geometry {
/**
* The centroid of the polygon. For a polygon with multiple rings, it represents the centroid of the largest ring.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#centroid)
*/
centroid: Point;
/**
* Checks to see if polygon rings cross each other and indicates if the polygon is self-intersecting, which means the ring of the polygon crosses itself.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#isSelfIntersecting)
*/
isSelfIntersecting: boolean;
/**
* An array of rings. Each ring is a two-dimensional array of numbers representing the coordinates of each vertex in the ring in the spatial reference of the view. The first vertex of each ring should always be the same as the last vertex. Each vertex is an array of two, three, or four numbers. The table below shows the various structures of a vertex array.
- *
+ *
* Case | Vertex array
* --- | ---
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM)| [x, y]
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) | [x, y, m]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) | [x, y, z]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) | [x, y, z, m]
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#rings)
*/
rings: number[][][];
/**
* For Polygon, the type is always `polygon`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#type)
*/
readonly type: "polygon";
/**
* Adds a ring to the Polygon. The ring can be one of the following: an array of numbers or an array of points. When added the index of the ring is incremented by one.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#addRing)
- *
+ *
* @param points A polygon ring. The first and last coordinates/points in the ring must be the same. This can either be defined as an array of Point geometries or an array of XY coordinates.
- *
+ *
*/
addRing(points: Point[] | number[][]): Polygon;
/**
* Creates a deep clone of Polygon object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#clone)
- *
- *
+ *
+ *
*/
clone(): Polygon;
/**
* Checks on the client if the input point is inside the polygon. A point on the polygon line is considered inside.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#contains)
- *
+ *
* @param point The point to test whether it is contained within the testing polygon.
- *
+ *
*/
contains(point: Point): boolean;
/**
* Returns a point specified by a ring and point in the path.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#getPoint)
- *
+ *
* @param ringIndex The index of the ring containing the desired point.
* @param pointIndex The index of the desired point within the ring.
- *
+ *
*/
getPoint(ringIndex: number, pointIndex: number): Point;
/**
* Inserts a new point into the polygon.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#insertPoint)
- *
+ *
* @param ringIndex The index of the ring in which to insert the point.
* @param pointIndex The index of the point to insert within the ring.
* @param point The point to insert.
- *
+ *
*/
insertPoint(ringIndex: number, pointIndex: number, point: Point | number[]): Polygon;
/**
* Checks if a Polygon ring is clockwise.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#isClockwise)
- *
+ *
* @param ring A polygon ring. The first and last coordinates/points in the ring must be the same. This can either be defined as an array of Point geometries or an array of XY coordinates.
- *
+ *
*/
isClockwise(ring: Point[] | number[][]): boolean;
/**
* Removes a point from the polygon at the given `pointIndex` within the ring identified by `ringIndex`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#removePoint)
- *
+ *
* @param ringIndex The index of the ring containing the point to remove.
* @param pointIndex The index of the point to remove within the ring.
- *
+ *
*/
removePoint(ringIndex: number, pointIndex: number): Point[];
/**
* Removes a ring from the Polygon. The index specifies which ring to remove.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#removeRing)
- *
+ *
* @param index The index of the ring to remove.
- *
+ *
*/
removeRing(index: number): Point[];
/**
* Updates a point in the polygon.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#setPoint)
- *
+ *
* @param ringIndex The index of the ring containing the point to update.
* @param pointIndex The index of the point to update within the ring.
* @param point The new point geometry.
- *
+ *
*/
setPoint(ringIndex: number, pointIndex: number, point: Point | number[]): Polygon;
}
@@ -4407,20 +4531,19 @@ declare namespace __esri {
interface PolygonConstructor {
/**
* A polygon contains an array of [rings](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#rings) and a [spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#spatialReference). Each ring is represented as an array points. The first and last points of a ring must be the same. A polygon also has boolean-valued [hasM](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) and [hasZ](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) fields.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html)
*/
- new(properties?: PolygonProperties): Polygon;
-
+ new (properties?: PolygonProperties): Polygon;
/**
* Converts the given Extent to a Polygon instance. This is useful for scenarios in which you would like to display an area of interest, which is typically defined by an Extent or bounding box, as a polygon with a fill symbol in the view. Some geoprocessing tools require input geometries to be of a Polygon type and not an Extent.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#fromExtent)
- *
+ *
* @param extent An extent object to convert to a polygon.
- *
+ *
*/
fromExtent(extent: Extent): Polygon;
@@ -4432,27 +4555,27 @@ declare namespace __esri {
interface PolygonProperties extends GeometryProperties {
/**
* The centroid of the polygon. For a polygon with multiple rings, it represents the centroid of the largest ring.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#centroid)
*/
centroid?: PointProperties;
/**
* Checks to see if polygon rings cross each other and indicates if the polygon is self-intersecting, which means the ring of the polygon crosses itself.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#isSelfIntersecting)
*/
isSelfIntersecting?: boolean;
/**
* An array of rings. Each ring is a two-dimensional array of numbers representing the coordinates of each vertex in the ring in the spatial reference of the view. The first vertex of each ring should always be the same as the last vertex. Each vertex is an array of two, three, or four numbers. The table below shows the various structures of a vertex array.
- *
+ *
* Case | Vertex array
* --- | ---
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM)| [x, y]
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) | [x, y, m]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) | [x, y, z]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#hasM) | [x, y, z, m]
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#rings)
*/
rings?: number[][][];
@@ -4461,99 +4584,97 @@ declare namespace __esri {
interface Polyline extends Geometry {
/**
* An array of paths, or line segments, that make up the polyline. Each path is a two-dimensional array of numbers representing the coordinates of each vertex in the path in the spatial reference of the view. Each vertex is represented as an array of two, three, or four numbers. The table below shows the various structures of a vertex array.
- *
+ *
* Case | Vertex array
* --- | ---
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y]
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y, m]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y, z]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y, z, m]
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#paths)
*/
paths: number[][][];
/**
* For Polyline, the type is always `polyline`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#type)
*/
readonly type: "polyline";
/**
* Adds a path, or line segment, to the polyline. When added, the index of the path is incremented by one.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#addPath)
- *
+ *
* @param points A polyline path. This can either be defined as an array of Point geometries or an array of XY coordinates.
- *
+ *
*/
addPath(points: Point[] | number[][]): Polyline;
/**
* Creates a deep clone of Polyline object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#clone)
- *
- *
+ *
+ *
*/
clone(): Polyline;
/**
* Returns a point specified by a path and point in the path.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#getPoint)
- *
+ *
* @param pathIndex The index of a path in the polyline.
* @param pointIndex The index of a point in a path.
- *
+ *
*/
getPoint(pathIndex: number, pointIndex: number): Point;
/**
* Inserts a new point into a polyline.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#insertPoint)
- *
+ *
* @param pathIndex The index of the path in which to insert a point.
* @param pointIndex The index of the inserted point in the path.
* @param point The point to insert.
- *
+ *
*/
insertPoint(pathIndex: number, pointIndex: number, point: Point | number[]): Polyline;
/**
* Removes a path from the Polyline. The index specifies which path to remove.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#removePath)
- *
+ *
* @param index The index of the path to remove from the polyline.
- *
+ *
*/
removePath(index: number): Point[];
/**
* Removes a point from the polyline at the given `pointIndex` within the path identified by the given `pathIndex`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#removePoint)
- *
+ *
* @param pathIndex The index of the path containing the point to be removed.
* @param pointIndex The index of the point to be removed within the path.
- *
+ *
*/
removePoint(pathIndex: number, pointIndex: number): Point;
/**
* Updates a point in a polyline.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#setPoint)
- *
+ *
* @param pathIndex The index of the path that contains the point to be updated.
* @param pointIndex The index of the point to be updated in the path.
* @param point Point geometry to update in the path.
- *
+ *
*/
setPoint(pathIndex: number, pointIndex: number, point: Point | number[]): Polyline;
}
interface PolylineConstructor {
-
-
- new(properties?: PolylineProperties): Polyline;
+ new (properties?: PolylineProperties): Polyline;
fromJSON(json: any): Polyline;
}
@@ -4563,15 +4684,15 @@ declare namespace __esri {
interface PolylineProperties extends GeometryProperties {
/**
* An array of paths, or line segments, that make up the polyline. Each path is a two-dimensional array of numbers representing the coordinates of each vertex in the path in the spatial reference of the view. Each vertex is represented as an array of two, three, or four numbers. The table below shows the various structures of a vertex array.
- *
+ *
* Case | Vertex array
* --- | ---
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y]
* [without z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y, m]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [without m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y, z]
* [with z](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasZ) and [with m](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#hasM) | [x, y, z, m]
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html#paths)
*/
paths?: number[][][];
@@ -4579,74 +4700,86 @@ declare namespace __esri {
/**
* A client-side projection engine for converting geometries from one [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) to another. When projecting geometries the starting spatial reference must be specified on the input geometry. You can specify a specific geographic (datum) transformation for the [project](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) operation, or accept the default transformation if one is needed.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html)
*/
interface projection {
/**
- * Returns the default geographic transformation used to convert the geometry from the input spatial reference to the output spatial reference. The default transformation is used when [projecting geometries](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) where the datum transformation is required but not specified in the `geographicTransformation` parameter.
- * > **Known Limitations**
+ * Returns the default geographic transformation used to convert the geometry from the input spatial reference to the output spatial reference. The default transformation is used when [projecting geometries](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) where the datum transformation is required but not specified in the `geographicTransformation` parameter.
+ * > **Known Limitations**
* * This method returns equation-based geographic transformations only.
* * Geographic transformations are returned with their maximum number of [steps](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps). Currently, number of steps is limited to 2.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformation)
- *
+ *
* @param inSpatialReference The input spatial reference from which to project geometries. This is the spatial reference of the input geometries.
* @param outSpatialReference The spatial reference to which you are converting the geometries.
* @param extent An extent used to determine the suitability of the returned transformation. The extent will be re-projected to the `inSpatialReference` if it has a different spatial reference.
- *
+ *
*/
- getTransformation(inSpatialReference: SpatialReference | SpatialReferenceProperties, outSpatialReference: SpatialReference | SpatialReferenceProperties, extent?: Extent): GeographicTransformation;
+ getTransformation(
+ inSpatialReference: SpatialReference | SpatialReferenceProperties,
+ outSpatialReference: SpatialReference | SpatialReferenceProperties,
+ extent?: Extent
+ ): GeographicTransformation;
/**
- * Returns a list of all geographic transformations suitable to convert geometries from the input spatial reference to the specified output spatial reference. The list is ordered in descending order by suitability, with the most suitable being first in the list.
- * > **Known Limitations**
+ * Returns a list of all geographic transformations suitable to convert geometries from the input spatial reference to the specified output spatial reference. The list is ordered in descending order by suitability, with the most suitable being first in the list.
+ * > **Known Limitations**
* * This method returns all the suitable equation-based geographic transformations.
* * Geographic transformations are returned with their maximum number of [steps](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps). Currently, number of steps is limited to 2.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformations)
- *
+ *
* @param inSpatialReference The spatial reference that the geometries are currently using.
* @param outSpatialReference The spatial reference to which you are converting the geometries to.
* @param extent An extent used to determine the suitability of the returned transformations. The extent will be re-projected to the input spatial reference if necessary.
- *
+ *
*/
- getTransformations(inSpatialReference: SpatialReference | SpatialReferenceProperties, outSpatialReference: SpatialReference | SpatialReferenceProperties, extent?: Extent): GeographicTransformation[];
+ getTransformations(
+ inSpatialReference: SpatialReference | SpatialReferenceProperties,
+ outSpatialReference: SpatialReference | SpatialReferenceProperties,
+ extent?: Extent
+ ): GeographicTransformation[];
/**
* Indicates if all dependencies of this module have been loaded.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#isLoaded)
- *
- *
+ *
+ *
*/
isLoaded(): boolean;
/**
* Indicates if this module is supported in the browser. The browser must support [WebAssembly](https://caniuse.com/#feat=wasm).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#isSupported)
- *
- *
+ *
+ *
*/
isSupported(): boolean;
/**
* Loads this module's dependencies. This method must be called before [projecting](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project) geometries.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#load)
- *
- *
+ *
+ *
*/
load(): IPromise;
/**
- * Projects a geometry or an array of geometries to the specified output spatial reference. A default geographic transformation is used if not explicitly provided, but required. Use the [getTransformation()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformation) method to find out which transformation is used by default for the given input and output spatial references. Note that you must [load](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#load) this module before attempting to project geometries.
+ * Projects a geometry or an array of geometries to the specified output spatial reference. A default geographic transformation is used if not explicitly provided, but required. Use the [getTransformation()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#getTransformation) method to find out which transformation is used by default for the given input and output spatial references. Note that you must [load](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#load) this module before attempting to project geometries.
* > **Known Limitations** This method uses the spatial reference of the first geometry as an input spatial reference. Therefore all geometries in the array must have the same spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project)
- *
+ *
* @param geometry The geometry or geometries to project.
* @param outSpatialReference The spatial reference to which you are converting the geometries' coordinates.
* @param geographicTransformation The geographic transformation used to transform the geometries. Specify this parameter to project a geometry when the default transformation is not appropriate for your requirements.
- *
+ *
*/
- project(geometry: Geometry | Geometry[], outSpatialReference: SpatialReference | SpatialReferenceProperties, geographicTransformation?: GeographicTransformation): Geometry | Geometry[];
+ project(
+ geometry: Geometry | Geometry[],
+ outSpatialReference: SpatialReference | SpatialReferenceProperties,
+ geographicTransformation?: GeographicTransformation
+ ): Geometry | Geometry[];
}
export const projection: projection;
@@ -4654,35 +4787,33 @@ declare namespace __esri {
interface ScreenPoint extends Accessor {
/**
* X-coordinate in pixels relative to the top-left corner of the view.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#x)
- *
+ *
* @default 0
*/
x: number;
/**
* Y-coordinate in pixels relative to the top-left corner of the view.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#y)
- *
+ *
* @default 0
*/
y: number;
/**
* Creates a deep clone of ScreenPoint object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#clone)
- *
- *
+ *
+ *
*/
clone(): ScreenPoint;
}
interface ScreenPointConstructor {
-
-
- new(properties?: ScreenPointProperties): ScreenPoint;
+ new (properties?: ScreenPointProperties): ScreenPoint;
}
export const ScreenPoint: ScreenPointConstructor;
@@ -4690,17 +4821,17 @@ declare namespace __esri {
interface ScreenPointProperties {
/**
* X-coordinate in pixels relative to the top-left corner of the view.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#x)
- *
+ *
* @default 0
*/
x?: number;
/**
* Y-coordinate in pixels relative to the top-left corner of the view.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-ScreenPoint.html#y)
- *
+ *
* @default 0
*/
y?: number;
@@ -4709,75 +4840,72 @@ declare namespace __esri {
interface SpatialReference extends Accessor, JSONSupport {
/**
* Indicates if the spatial reference refers to a geographic coordinate system.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isGeographic)
*/
readonly isGeographic: boolean;
/**
* Indicates if the [wkid](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid) of the spatial reference object is one of the following values: `102113`, `102100`, `3857`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWebMercator)
*/
readonly isWebMercator: boolean;
/**
* Indicates if the [wkid](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid) of the spatial reference object is `4326`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWGS84)
*/
readonly isWGS84: boolean;
/**
* Indicates if the spatial reference of the map supports wrapping around the International Date Line. Value is `true` if the spatial reference is Web Mercator or WGS84.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#isWrappable)
*/
readonly isWrappable: boolean;
/**
* The well-known ID of a spatial reference. See [Projected Coordinate Systems](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) and [Geographic Coordinate Systems](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) for the list of supported spatial references.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid)
*/
wkid: number;
/**
* The well-known text that defines a spatial reference. Many browsers have a limit to the length of a GET request of approximately 2048 characters. When using well-known text to specify the spatial reference you can easily exceed this limit. In these cases, you will need to setup and use a proxy page.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkt)
*/
wkt: string;
/**
* Returns a deep clone of the spatial reference object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#clone)
- *
- *
+ *
+ *
*/
clone(): SpatialReference;
/**
* Checks if the specified spatial reference object has the same [wkid](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid) or [wkt](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkt) as this spatial reference object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#equals)
- *
+ *
* @param spatialReference The spatial reference to compare to.
- *
+ *
*/
equals(spatialReference: SpatialReference): boolean;
}
interface SpatialReferenceConstructor {
-
-
- new(properties?: SpatialReferenceProperties): SpatialReference;
-
+ new (properties?: SpatialReferenceProperties): SpatialReference;
/**
* A convenience spatial reference instance for Web Mercator.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#WebMercator)
*/
WebMercator: SpatialReference;
/**
* A convenience spatial reference instance for WGS84.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#WGS84)
*/
WGS84: SpatialReference;
@@ -4790,13 +4918,13 @@ declare namespace __esri {
interface SpatialReferenceProperties {
/**
* The well-known ID of a spatial reference. See [Projected Coordinate Systems](https://developers.arcgis.com/rest/services-reference/projected-coordinate-systems.htm) and [Geographic Coordinate Systems](https://developers.arcgis.com/rest/services-reference/geographic-coordinate-systems.htm) for the list of supported spatial references.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkid)
*/
wkid?: number;
/**
* The well-known text that defines a spatial reference. Many browsers have a limit to the length of a GET request of approximately 2048 characters. When using well-known text to specify the spatial reference you can easily exceed this limit. In these cases, you will need to setup and use a proxy page.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html#wkt)
*/
wkt?: string;
@@ -4805,17 +4933,17 @@ declare namespace __esri {
interface GeographicTransformation {
/**
* Geographic transformation steps. Each step represents a geographic transformation that will be used in the process of transforming coordinates from one geographic coordinate system to another.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#steps)
*/
steps: GeographicTransformationStep[];
/**
* Returns the inverse of the geographic transformation calling this method or `null` if the transformation is not invertible. The inverse of a transformation converts coordinates using the same method and parameters, but in the opposite direction of the original object. For example if the original object represents the `NAD_1983_HARN_To_NAD_1983_NSRS2007_1` transformation, then the inverse will transform from `NAD 83 (NSRS 2007)` to `NAD 83 (HARN)`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html#getInverse)
- *
- *
+ *
+ *
*/
getInverse(): GeographicTransformation;
}
@@ -4823,12 +4951,11 @@ declare namespace __esri {
interface GeographicTransformationConstructor {
/**
* Projecting your data between coordinate systems sometimes requires transforming between geographic coordinate systems. Geographic transformations are used to transform coordinates between spatial references that have different geographic coordinate systems, and thus different datums. Using the most suitable transformation ensures the best possible accuracy when converting geometries from one spatial reference to another.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformation.html)
*/
-
- new(properties?: any): GeographicTransformation;
+ new (properties?: any): GeographicTransformation;
}
export const GeographicTransformation: GeographicTransformationConstructor;
@@ -4836,40 +4963,37 @@ declare namespace __esri {
interface GeographicTransformationStep {
/**
* Indicates with the geographic transformation is inverted.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#isInverse)
- *
+ *
* @default false
*/
isInverse: boolean;
/**
* The well-known id (wkid) hat represents a known geographic transformation. See [Geographic datum transformations](https://developers.arcgis.com/java/10-2/guide/datum-transformations.htm#ESRI_SECTION1_7635FE2A60E6449898D5AD0ADE2CA0C3) for the list of supported equation-based geographic transformations.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#wkid)
*/
wkid: number;
/**
* The well-known text (wkt) that represents a known geographic transformation. See [Geographic datum transformations](https://developers.arcgis.com/java/10-2/guide/datum-transformations.htm#ESRI_SECTION1_7635FE2A60E6449898D5AD0ADE2CA0C3) for the list of supported equation-based geographic transformations.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#wkt)
*/
wkt: string;
/**
* Gets the inverse of the geographic transformation step used to call this method or `null` if the transformation step is not invertible. The inverse of a transformation converts coordinates using the same method and parameters, but in the opposite direction of the original object. For example if the original object represents the `NAD_1983_HARN_To_NAD_1983_NSRS2007_1` transformation, then the inverse will transform from `NAD 83 (NSRS 2007)` to `NAD 83 (HARN)`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-GeographicTransformationStep.html#getInverse)
- *
- *
+ *
+ *
*/
getInverse(): GeographicTransformationStep;
}
interface GeographicTransformationStepConstructor {
-
-
-
- new(properties?: any): GeographicTransformationStep;
+ new (properties?: any): GeographicTransformationStep;
}
export const GeographicTransformationStep: GeographicTransformationStepConstructor;
@@ -4877,37 +5001,37 @@ declare namespace __esri {
interface ImageMeshColor extends Accessor {
/**
* A direct reference to the image data. The image data can be an [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). The data property is mutually exclusive with the url property, setting the data will clear the url (if there is one).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#data)
*/
data: HTMLImageElement | HTMLCanvasElement | ImageData;
/**
* Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. In all other cases it defaults to `false`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#transparent)
- *
+ *
* @default undefined
*/
transparent: boolean;
/**
* For ImageMeshColor the type is always `image`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#type)
*/
readonly type: "image";
/**
* The url to the image resource. This can either be a remote url (absolute or relative) or a data url. The url property is mutually exclusive with the data property, setting the url will clear the data (if there is one).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#url)
*/
url: string;
/**
* Creates a deep clone.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#clone)
- *
- *
+ *
+ *
*/
clone(): ImageMeshColor;
}
@@ -4915,11 +5039,11 @@ declare namespace __esri {
interface ImageMeshColorConstructor {
/**
* ImageMeshColor is a type of mesh color that represents an image mapped to the mesh by its uv vertex attributes. ImageMeshColor instances can be used with the [MeshComponent.material.color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property. Images can be referred to either by url or directly by data ( [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)
*/
- new(properties?: ImageMeshColorProperties): ImageMeshColor;
+ new (properties?: ImageMeshColorProperties): ImageMeshColor;
}
export const ImageMeshColor: ImageMeshColorConstructor;
@@ -4927,44 +5051,43 @@ declare namespace __esri {
interface ImageMeshColorProperties {
/**
* A direct reference to the image data. The image data can be an [image element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement), [canvas element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) or [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData). The data property is mutually exclusive with the url property, setting the data will clear the url (if there is one).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#data)
*/
data?: HTMLImageElement | HTMLCanvasElement | ImageData;
/**
* Indicates whether the image data should be interpreted as being semi-transparent. The default value is automatically derived when the data property contains a canvas element or an ImageData object. In all other cases it defaults to `false`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#transparent)
- *
+ *
* @default undefined
*/
transparent?: boolean;
/**
* The url to the image resource. This can either be a remote url (absolute or relative) or a data url. The url property is mutually exclusive with the data property, setting the url will clear the data (if there is one).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html#url)
*/
url?: string;
}
-
interface jsonUtils {
/**
* Creates a new instance of an appropriate [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input `json` parameter often comes from a response to a query operation in the REST API or a [toJSON()](http://pro.arcgis.com/en/pro-app/tool-reference/conversion/features-to-json.htm) method from another ArcGIS product. See the [Using fromJSON()](https://developers.arcgis.com/javascript/latest/guide/using-fromjson/index.html) topic in the Guide for details and examples of when and how to use this function.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-jsonUtils.html#fromJSON)
- *
+ *
* @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
- *
+ *
*/
fromJSON(json: any): Geometry;
/**
* Returns the type for a given geometry in the JSON format used by the ArcGIS platform. This only applies to geometries that can be processed by the server.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-jsonUtils.html#getJsonType)
- *
+ *
* @param geometry The input geometry object.
- *
+ *
*/
getJsonType(geometry: Geometry): string;
}
@@ -4974,36 +5097,36 @@ declare namespace __esri {
interface MeshComponent extends Accessor {
/**
* A flat array of indices that refer to vertices in the [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) of the mesh to which the component belongs. Each triple of indices defines a triangle to render (i.e. the faces array must always have a length that is a multiple of 3). Note that the indices refer to **vertices** and not to the index of the first coordinate of a vertex in the [vertexAttributes.position](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) array. If faces is `null`, then all the vertices in the mesh will be rendered as triangles for this component.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces)
*/
faces: Uint32Array;
/**
* The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material)
*/
material: MeshComponentMaterial;
/**
- * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported:
- *
+ * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported:
+ *
* | Type | Description |
* |------|-------------|
* | source | Shading uses the normals as defined in the vertex attributes. If no normals are defined, then shading defaults back to `flat` |
* | flat | Shading uses normals created per triangle face. This type of shading is good for objects with sharp edges such as boxes. |
* | smooth | Shading uses per-vertex normals that average the normals of all the faces a vertex is a part of. This type of shading is good for meshes that approximate curved surfaces such as spheres. |
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#shading)
*/
shading: string;
/**
* Creates a deep clone.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#clone)
- *
- *
+ *
+ *
*/
clone(): MeshComponent;
}
@@ -5011,11 +5134,11 @@ declare namespace __esri {
interface MeshComponentConstructor {
/**
* The MeshComponent class is used to apply one or more materials to a single [Mesh](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html). The [faces](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces) property is a flat array of indices in the mesh [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) and defines the region of vertices in the mesh on which to apply the material. Each triple of values in the flat array of indices specifies a triangle to be rendered.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html)
*/
- new(properties?: MeshComponentProperties): MeshComponent;
+ new (properties?: MeshComponentProperties): MeshComponent;
}
export const MeshComponent: MeshComponentConstructor;
@@ -5023,36 +5146,35 @@ declare namespace __esri {
interface MeshComponentProperties {
/**
* A flat array of indices that refer to vertices in the [vertexAttributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) of the mesh to which the component belongs. Each triple of indices defines a triangle to render (i.e. the faces array must always have a length that is a multiple of 3). Note that the indices refer to **vertices** and not to the index of the first coordinate of a vertex in the [vertexAttributes.position](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes) array. If faces is `null`, then all the vertices in the mesh will be rendered as triangles for this component.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#faces)
*/
faces?: Uint32Array | number[] | Uint16Array;
/**
* The material determines how the component is visualized. Materials specify a color that may either be a single color value (a [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)) or an image ( an [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)), which is mapped to the uv coordinate specified for each vertex in the mesh vertex attributes. The material property supports a number of convenience autocast types, including hex color strings and well known color strings (autocasts to [ValueMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)), or strings representing urls, HTMLImageElements or HTMLCanvasElements (autocasts to [ImageMeshColor](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ImageMeshColor.html)).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material)
*/
material?: MeshComponentMaterialProperties;
/**
- * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported:
- *
+ * Specifies the type of normals used for lighting. This determines whether the object has a smooth or an angular appearance. The following shading types are supported:
+ *
* | Type | Description |
* |------|-------------|
* | source | Shading uses the normals as defined in the vertex attributes. If no normals are defined, then shading defaults back to `flat` |
* | flat | Shading uses normals created per triangle face. This type of shading is good for objects with sharp edges such as boxes. |
* | smooth | Shading uses per-vertex normals that average the normals of all the faces a vertex is a part of. This type of shading is good for meshes that approximate curved surfaces such as spheres. |
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#shading)
*/
shading?: string;
}
-
export interface MeshComponentMaterialProperties extends Object {
/**
* the material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material)
*/
color?: ValueMeshColorProperties | ImageMeshColorProperties;
@@ -5061,123 +5183,155 @@ declare namespace __esri {
export interface MeshComponentMaterial extends AnonymousAccessor {
/**
* the material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material)
*/
color: ValueMeshColor | ImageMeshColor;
}
-
interface meshUtils {
/**
* Creates a mesh geometry by sampling elevation data from an elevation service on a regular grid.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation)
- *
+ *
* @param source The source from which to query the elevation data.
* @param extent The extent from which to create the mesh.
* @param params Optional parameters.
* @param params.material The material.
* @param params.demResolution Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer.queryElevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details on the different settings.
- *
+ *
*/
- createFromElevation(source: ElevationLayer | Ground | ElevationSampler, extent: Extent, params?: meshUtilsCreateFromElevationParams): IPromise;
+ createFromElevation(
+ source: ElevationLayer | Ground | ElevationSampler,
+ extent: Extent,
+ params?: meshUtilsCreateFromElevationParams
+ ): IPromise;
/**
* Georeferences vertices specified in a Cartesian coordinate system. This is useful when converting general 3D model meshes not typically georeferenced. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from a local (0, 0, 0) Cartesian system to the properly georeferenced coordinates at the specified `location`. The `location`'s coordinate system determines the units of the converted positions. If the coordinate system is WGS84, metric units are used.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference)
- *
+ *
* @param vertexAttributes The position and normal buffers to georeference.
* @param location The location at which to georeference the position and normal buffers.
* @param params Optional parameters.
* @param params.geographic Indicates whether to georeference relative to the globe or the projected coordinate system.
- *
+ *
*/
- georeference(vertexAttributes: VertexAttributes, location: Point, params?: meshUtilsGeoreferenceParams): VertexAttributes;
+ georeference(
+ vertexAttributes: VertexAttributes,
+ location: Point,
+ params?: meshUtilsGeoreferenceParams
+ ): VertexAttributes;
/**
* Merges multiple meshes into a single mesh. All mesh geometries must be in the same spatial reference.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#merge)
- *
+ *
* @param geometries One or more meshes.
- *
+ *
*/
merge(geometries: Mesh[]): Mesh;
+ /**
+ * Projects georeferenced vertices to a Cartesian coordinate system. This is useful for converting existing scene geometry so that it can be used as source material for generating new 3D meshes. This method operates on mesh vertex attributes and will convert positions and normals (if specified) from georeferenced coordinates at the specified `location` to a local (0, 0, 0) Cartesian system. The units of the input positions are determined by the `location`'s coordinate system. If the coordinate system is WGS84, metric units are used.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference)
+ *
+ * @param vertexAttributes The georeferenced position and normal buffers.
+ * @param location The location to which the position and normal buffers are georeferenced.
+ * @param params Optional parameters.
+ * @param params.geographic Indicates whether the coordinates are georeferenced relative to the globe or the projected coordinate system.
+ *
+ */
+ ungeoreference(
+ vertexAttributes: VertexAttributes,
+ location: Point,
+ params?: meshUtilsUngeoreferenceParams
+ ): VertexAttributes;
}
export const meshUtils: meshUtils;
- /**
- * Represents the position and normal vertex attribute buffers of a mesh.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes)
- */
- export interface VertexAttributes extends Object {
- /**
- * The position buffer.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes)
- */
- position: Float64Array;
- /**
- * The normal buffer.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes)
- */
- normal?: Float32Array;
- }
-
-
export interface meshUtilsCreateFromElevationParams extends Object {
/**
* The material.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation)
*/
material?: meshUtilsCreateFromElevationParamsMaterial;
/**
* Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer.queryElevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details on the different settings.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation)
- *
+ *
* @default auto
*/
demResolution?: number | string;
}
-
export interface meshUtilsCreateFromElevationParamsMaterial extends Object {
/**
* The material color.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#createFromElevation)
*/
color?: ValueMeshColor | ImageMeshColor | string | HTMLImageElement | HTMLCanvasElement | number[];
}
-
export interface meshUtilsGeoreferenceParams extends Object {
/**
* Indicates whether to georeference relative to the globe or the projected coordinate system.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#georeference)
*/
geographic?: boolean;
}
+ export interface meshUtilsUngeoreferenceParams extends Object {
+ /**
+ * Indicates whether the coordinates are georeferenced relative to the globe or the projected coordinate system.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#ungeoreference)
+ */
+ geographic?: boolean;
+ }
+
+ /**
+ * Represents the position and normal vertex attribute buffers of a mesh.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes)
+ */
+ export interface VertexAttributes extends Object {
+ /**
+ * The position buffer.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes)
+ */
+ position: Float64Array;
+ /**
+ * The normal buffer.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-meshUtils.html#VertexAttributes)
+ */
+ normal?: Float32Array;
+ }
interface normalizeUtils {
/**
* Normalizes geometries that intersect the central meridian or fall outside the world extent so they stay within the coordinate system of the view. Only supported for Web Mercator and WGS84 spatial references.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-normalizeUtils.html#normalizeCentralMeridian)
- *
+ *
* @param geometries An array of geometries to normalize.
* @param geometryService A geometry service used to perform the normalization. If this value is `null` then the default geometry service in [esriConfig.geometryServiceUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#geometryServiceUrl) is used.
* @param requestOptions Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#esriRequest) to be used for the data request.
- *
+ *
*/
- normalizeCentralMeridian(geometries: Geometry[], geometryService?: GeometryService, requestOptions?: any): IPromise;
+ normalizeCentralMeridian(
+ geometries: Geometry[],
+ geometryService?: GeometryService,
+ requestOptions?: any
+ ): IPromise;
}
export const normalizeUtils: normalizeUtils;
@@ -5185,23 +5339,23 @@ declare namespace __esri {
interface ValueMeshColor extends Accessor {
/**
* For ValueMeshColor the type is always `value`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#type)
*/
readonly type: "value";
/**
* The color value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value)
*/
value: Color;
/**
* Creates a deep clone.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#clone)
- *
- *
+ *
+ *
*/
clone(): ValueMeshColor;
}
@@ -5209,11 +5363,11 @@ declare namespace __esri {
interface ValueMeshColorConstructor {
/**
* ValueMeshColor is a type of mesh color that represents a single uniform color to be applied to a mesh component. ValueMeshColor instances can be used with the [MeshComponent.material.color](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshComponent.html#material) property.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html)
*/
- new(properties?: ValueMeshColorProperties): ValueMeshColor;
+ new (properties?: ValueMeshColorProperties): ValueMeshColor;
}
export const ValueMeshColor: ValueMeshColorConstructor;
@@ -5221,150 +5375,198 @@ declare namespace __esri {
interface ValueMeshColorProperties {
/**
* The color value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-ValueMeshColor.html#value)
*/
value?: Color | number[] | string;
}
-
interface webMercatorUtils {
/**
* Returns `true` if the `source` spatial reference can be projected to the `target` spatial reference with the [project()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#project) function, or if the `source` and `target` are the same [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#canProject)
- *
+ *
* @param source The input [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) or an object with `spatialReference` property such as [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) or [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html).
* @param target The target [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) or an object with `spatialReference` property such as [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) or [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html).
- *
+ *
*/
canProject(source: SpatialReference | any, target: SpatialReference | any): boolean;
/**
* Converts a geometry from geographic units (wkid: 4326) to Web Mercator units (wkid: 3857).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#geographicToWebMercator)
- *
+ *
* @param geometry The input geometry to convert.
- *
+ *
*/
geographicToWebMercator(geometry: Geometry): Geometry;
/**
* Translates the given latitude and longitude (decimal degree) values to Web Mercator XY values.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#lngLatToXY)
- *
+ *
* @param long The longitude value to convert.
* @param lat The latitude value to convert.
- *
+ *
*/
lngLatToXY(long: number, lat: number): number[];
/**
* Projects the geometry clientside (if possible). You should test the input geometry in [canProject()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#canProject) prior to using this function. If the result of [canProject()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#canProject) is `true`, then proceed to project. If [canProject()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#canProject) returns `false`, then `project()` won't return useful results. Use [GeometryService.project()](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html#project) instead.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#project)
- *
+ *
* @param geometry The input geometry.
* @param spatialReference The target [SpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html) or an object with `spatialReference` property such as [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) or [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html).
- *
+ *
*/
project(geometry: Geometry, spatialReference: SpatialReference | any): Geometry;
/**
* Converts a geometry from Web Mercator units (wkid: 3857) to geographic units (wkid: 4326).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#webMercatorToGeographic)
- *
+ *
* @param geometry The input geometry to convert.
- *
+ *
*/
webMercatorToGeographic(geometry: Geometry): Geometry;
/**
* Translates the given Web Mercator coordinates to Longitude and Latitude values (decimal degrees). By default the returned longitude is normalized so that it is within -180 and +180.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-webMercatorUtils.html#xyToLngLat)
- *
+ *
* @param x The X coordinate value to convert.
* @param y The Y coordinate value to convert.
- *
+ *
*/
xyToLngLat(x: number, y: number): number[];
}
export const webMercatorUtils: webMercatorUtils;
+ /**
+ * Extent.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Extent)
+ */
+ export type geometryExtent = Extent;
+
+ /**
+ * Geometry types.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Geometry)
+ */
+ export type geometryGeometry = Extent | Multipoint | Point | Polygon | Polyline | Mesh;
+
+ /**
+ * Mesh.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Mesh)
+ */
+ export type geometryMesh = Mesh;
+
+ /**
+ * Multipoint.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Multipoint)
+ */
+ export type geometryMultipoint = Multipoint;
+
+ /**
+ * Point.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Point)
+ */
+ export type geometryPoint = Point;
+
+ /**
+ * Polygon.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Polygon)
+ */
+ export type geometryPolygon = Polygon;
+
+ /**
+ * Polyline.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry.html#Polyline)
+ */
+ export type geometryPolyline = Polyline;
+
interface Graphic extends Accessor, JSONSupport {
/**
* Name-value pairs of fields and field values associated with the graphic.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes)
*/
attributes: any;
/**
- * The geometry that defines the graphic's location.
+ * The geometry that defines the graphic's location.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry)
*/
geometry: Geometry;
/**
* If applicable, references the layer in which the graphic is stored.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#layer)
*/
layer: Layer;
/**
* The template for displaying content in a [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) when the graphic is selected. The [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) may be used to access a graphic's [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) and display their values in the view's default popup. See the documentation for [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) for details on how to display attribute values in the popup. As of 4.8 to get the actual `popupTemplate` of the graphic, see the [getEffectivePopupTemplate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#getEffectivePopupTemplate) method that either returns this value or the `popupTemplate` of the graphic's layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#popupTemplate)
*/
popupTemplate: PopupTemplate;
/**
* The [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html) for the graphic. Choosing a symbol for a graphic depends on the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) type (SceneView or MapView), and the [geometry type](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#type) of the graphic. Each graphic may have its own symbol specified when the parent layer is a [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html). For a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) the symbol of each graphic should not be set by the developer since the graphics' rendering properties are determined by the layer's [renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol)
*/
symbol: Symbol;
/**
* Indicates the visibility of the graphic.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#visible)
- *
+ *
* @default true
*/
visible: boolean;
/**
* Creates a deep clone of the graphic object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#clone)
- *
- *
+ *
+ *
*/
clone(): Graphic;
/**
* Returns the value of the specified attribute.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#getAttribute)
- *
+ *
* @param name The name of the attribute.
- *
+ *
*/
getAttribute(name: string): any;
/**
* Returns the popup template applicable for the graphic. It's either the value of [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#popupTemplate) or the `popupTemplate` from the graphic's layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#getEffectivePopupTemplate)
- *
- *
+ *
+ *
*/
getEffectivePopupTemplate(): PopupTemplate;
/**
* Sets a new value to the specified attribute.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#setAttribute)
- *
+ *
* @param name The name of the attribute to set.
* @param newValue The new value to set on the named attribute.
- *
+ *
*/
setAttribute(name: string, newValue: any): void;
}
@@ -5372,11 +5574,11 @@ declare namespace __esri {
interface GraphicConstructor {
/**
* A Graphic is a vector representation of real world geographic phenomena. It can contain [geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry), a [symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol), and [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes). A Graphic is displayed in the [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)
*/
- new(properties?: GraphicProperties): Graphic;
+ new (properties?: GraphicProperties): Graphic;
fromJSON(json: any): Graphic;
}
@@ -5386,40 +5588,40 @@ declare namespace __esri {
interface GraphicProperties {
/**
* Name-value pairs of fields and field values associated with the graphic.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes)
*/
attributes?: any;
/**
- * The geometry that defines the graphic's location.
+ * The geometry that defines the graphic's location.
* > **Z-values** defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#geometry)
*/
geometry?: GeometryProperties;
/**
* If applicable, references the layer in which the graphic is stored.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#layer)
*/
layer?: LayerProperties;
/**
* The template for displaying content in a [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) when the graphic is selected. The [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) may be used to access a graphic's [attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#attributes) and display their values in the view's default popup. See the documentation for [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) for details on how to display attribute values in the popup. As of 4.8 to get the actual `popupTemplate` of the graphic, see the [getEffectivePopupTemplate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#getEffectivePopupTemplate) method that either returns this value or the `popupTemplate` of the graphic's layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#popupTemplate)
*/
popupTemplate?: PopupTemplateProperties;
/**
* The [Symbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Symbol.html) for the graphic. Choosing a symbol for a graphic depends on the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) type (SceneView or MapView), and the [geometry type](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html#type) of the graphic. Each graphic may have its own symbol specified when the parent layer is a [GraphicsLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GraphicsLayer.html). For a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) the symbol of each graphic should not be set by the developer since the graphics' rendering properties are determined by the layer's [renderer](https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#symbol)
*/
symbol?: SymbolProperties;
/**
* Indicates the visibility of the graphic.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#visible)
- *
+ *
* @default true
*/
visible?: boolean;
@@ -5428,90 +5630,93 @@ declare namespace __esri {
interface Ground extends Accessor, Loadable, JSONSupport {
/**
* A collection of [ElevationLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html) that define the elevation or terrain that makes up the ground surface. When elevation layers are added to the ground, the topographical variations of the surface are rendered in 3D as they would appear in the real world.  When the layers collection is empty, the ground surface is flat. 
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers)
*/
layers: Collection;
/**
* Indicates whether the instance has loaded. When `true`, the properties of the object can be accessed. A Ground is considered loaded when its [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers) are fully created, but not yet loaded.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#loaded)
- *
+ *
* @default false
*/
readonly loaded: boolean;
/**
* Specifies the user navigation constraints relative to the ground surface.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#navigationConstraint)
*/
navigationConstraint: GroundNavigationConstraint;
/**
* Opacity of the ground, including surface default color and the basemap (without reference layers). This property can be used for a see-through ground effect.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity)
- *
+ *
* @default 1
*/
opacity: number;
/**
* The color of the ground surface, displayed underneath the basemap. If this is null, a grid is displayed instead. The alpha value in the color is ignored. Use the [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the opacity of the ground.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#surfaceColor)
- *
+ *
* @default null
*/
surfaceColor: Color;
/**
* Creates a deep clone of this object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#clone)
- *
- *
+ *
+ *
*/
clone(): Ground;
/**
* Creates an elevation sampler for the given extent by querying the ground layers for elevation data and caching it so values may be sampled quickly afterwards. The sampler uses the elevation data from the first layer that has data available. For getting elevation data from a specific layer use [ElevationLayer.createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler)
- *
+ *
* @param extent The extent for which to create the sampler.
* @param options Additional sampler options.
* @param options.noDataValue The value to use when there is no data available.
- *
+ *
*/
createElevationSampler(extent: Extent, options?: GroundCreateElevationSamplerOptions): IPromise;
/**
* Loads all the externally loadable resources associated with the ground. For the ground this will load all the layers.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#loadAll)
- *
- *
+ *
+ *
*/
loadAll(): IPromise;
/**
* Queries the ground layer services for elevation values for the given geometry. The returned result contains a copy of the geometry with z-values sampled from elevation data from the first layer that has data available.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#queryElevation)
- *
+ *
* @param geometry The geometry to sample.
* @param options Additional query options.
* @param options.returnSampleInfo Indicates whether to return additional sample information for each sampled coordinate.
* @param options.noDataValue The value that appears in the resulting geometry when there is no data available.
- *
+ *
*/
- queryElevation(geometry: Point | Multipoint | Polyline, options?: GroundQueryElevationOptions): IPromise;
+ queryElevation(
+ geometry: Point | Multipoint | Polyline,
+ options?: GroundQueryElevationOptions
+ ): IPromise;
}
interface GroundConstructor {
/**
* The Ground class contains properties that specify how the ground surface is displayed in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). It contains a [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers) property, which is a collection of [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html) that defines the elevation or terrain of the map's surface.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html)
*/
- new(properties?: GroundProperties): Ground;
+ new (properties?: GroundProperties): Ground;
fromJSON(json: any): Ground;
}
@@ -5521,29 +5726,29 @@ declare namespace __esri {
interface GroundProperties extends LoadableProperties {
/**
* A collection of [ElevationLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html) that define the elevation or terrain that makes up the ground surface. When elevation layers are added to the ground, the topographical variations of the surface are rendered in 3D as they would appear in the real world.  When the layers collection is empty, the ground surface is flat. 
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers)
*/
layers?: CollectionProperties;
/**
* Specifies the user navigation constraints relative to the ground surface.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#navigationConstraint)
*/
navigationConstraint?: GroundNavigationConstraintProperties;
/**
* Opacity of the ground, including surface default color and the basemap (without reference layers). This property can be used for a see-through ground effect.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity)
- *
+ *
* @default 1
*/
opacity?: number;
/**
* The color of the ground surface, displayed underneath the basemap. If this is null, a grid is displayed instead. The alpha value in the color is ignored. Use the [opacity](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#opacity) property to control the opacity of the ground.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#surfaceColor)
- *
+ *
* @default null
*/
surfaceColor?: Color | number[] | string;
@@ -5551,54 +5756,52 @@ declare namespace __esri {
/**
* Object returned when [queryElevation()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#queryElevation) promise resolves:
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#ElevationQueryResult)
*/
export interface ElevationQueryResult extends Object {
/**
* The geometry with sampled z-values.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#ElevationQueryResult)
*/
geometry: Point | Multipoint | Polyline;
/**
* Contains additional information about how the geometry was sampled. This property is present depending on whether the user set `options.returnSampleInfo = true`, for each coordinate in the geometry.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#ElevationQueryResult)
*/
sampleInfo?: ElevationQueryResultSampleInfo[];
/**
* The value used when there is no data available.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#ElevationQueryResult)
*/
noDataValue: number;
}
-
export interface GroundCreateElevationSamplerOptions extends Object {
/**
* The value to use when there is no data available.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler)
- *
+ *
* @default 0
*/
noDataValue?: number;
}
-
export interface GroundNavigationConstraintProperties extends Object {
/**
- * The type of the constraint. It can be one of the following:
- *
+ * The type of the constraint. It can be one of the following:
+ *
* Value | Description
* -----------|--------------------
* stay-above | User can only navigate above ground surface
* none | User can navigate above and below the ground surface
- *
+ *
* Default value: stay-above
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#navigationConstraint)
*/
type?: string;
@@ -5606,51 +5809,49 @@ declare namespace __esri {
export interface GroundNavigationConstraint extends AnonymousAccessor {
/**
- * The type of the constraint. It can be one of the following:
- *
+ * The type of the constraint. It can be one of the following:
+ *
* Value | Description
* -----------|--------------------
* stay-above | User can only navigate above ground surface
* none | User can navigate above and below the ground surface
- *
+ *
* Default value: stay-above
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#navigationConstraint)
*/
type: string;
}
-
export interface GroundQueryElevationOptions extends Object {
/**
* Indicates whether to return additional sample information for each sampled coordinate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#queryElevation)
- *
+ *
* @default false
*/
returnSampleInfo?: boolean;
/**
* The value that appears in the resulting geometry when there is no data available.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#queryElevation)
- *
+ *
* @default 0
*/
noDataValue?: number;
}
-
export interface ElevationQueryResultSampleInfo extends Object {
/**
* The resolution at which the z-value was sampled. If no data was available for sampling for a given coordinate, the dem resolution value will be -1 for that coordinate.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#ElevationQueryResult)
*/
demResolution: number;
/**
* The elevation source from which the data for the corresponding coordinate was sampled.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#ElevationQueryResult)
*/
source: ElevationLayer;
@@ -5659,69 +5860,71 @@ declare namespace __esri {
interface Credential extends Accessor {
/**
* Token expiration time specified as number of milliseconds since 1 January 1970 00:00:00 UTC.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#expires)
*/
expires: number;
/**
- * Indicates whether this credential belongs to a user with admin privileges.
- *
+ * Indicates that this credential was created to access the [ArcGIS REST Admin service](https://developers.arcgis.com/rest/services-reference/rest-api-admin.htm).
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#isAdmin)
*/
isAdmin: boolean;
/**
* The Identity Manager's [setOAuthRedirectionHandler](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthRedirectionHandler) returns an object that contains a `state` property. This information is returned for this property.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#oAuthState)
*/
oAuthState: any;
/**
* The server url.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#server)
*/
server: string;
/**
* Indicates whether the resources accessed using this credential should be fetched over HTTPS protocol.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#ssl)
*/
ssl: boolean;
/**
* Token generated by the token service using the specified userId and password.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#token)
*/
token: string;
/**
* User associated with the Credential object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#userId)
*/
userId: string;
/**
* Destroys the credential. When the credential is destroyed, you should remove any map layers that are using this credential.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#destroy)
- *
- *
+ *
+ *
*/
destroy(): void;
/**
* Generates a new token and updates the Credential's [token](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#token) property with the newly acquired token. Tokens are typically kept valid using a timer that automatically triggers a refresh before the token expires. Use this method in cases where the timer has been delayed or stopped.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#refreshToken)
- *
- *
+ *
+ *
*/
refreshToken(): void;
+
+ on(name: "token-change", eventHandler: CredentialTokenChangeEventHandler): IHandle;
+
+ on(name: "destroy", eventHandler: CredentialDestroyEventHandler): IHandle;
}
interface CredentialConstructor {
-
-
- new(properties?: CredentialProperties): Credential;
+ new (properties?: CredentialProperties): Credential;
}
export const Credential: CredentialConstructor;
@@ -5729,570 +5932,486 @@ declare namespace __esri {
interface CredentialProperties {
/**
* Token expiration time specified as number of milliseconds since 1 January 1970 00:00:00 UTC.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#expires)
*/
expires?: number;
/**
- * Indicates whether this credential belongs to a user with admin privileges.
- *
+ * Indicates that this credential was created to access the [ArcGIS REST Admin service](https://developers.arcgis.com/rest/services-reference/rest-api-admin.htm).
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#isAdmin)
*/
isAdmin?: boolean;
/**
* The Identity Manager's [setOAuthRedirectionHandler](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthRedirectionHandler) returns an object that contains a `state` property. This information is returned for this property.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#oAuthState)
*/
oAuthState?: any;
/**
* The server url.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#server)
*/
server?: string;
/**
* Indicates whether the resources accessed using this credential should be fetched over HTTPS protocol.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#ssl)
*/
ssl?: boolean;
/**
* Token generated by the token service using the specified userId and password.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#token)
*/
token?: string;
/**
* User associated with the Credential object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html#userId)
*/
userId?: string;
}
- interface IdentityManager extends IdentityManagerBase {
+ export interface CredentialDestroyEvent {}
+
+ export interface CredentialTokenChangeEvent {}
+
+ interface IdentityManager extends Evented {
/**
* Dialog box widget used to challenge the user for their credentials when the application attempts to access a secure resource. This property is available after the dialog-create event has fired.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#dialog)
*/
dialog: any;
-
- /**
- * Once a user successfully logs in, they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected. The IdentityManager calls the custom handler function with an object containing redirection properties.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthRedirectionHandler)
- *
- * @param handlerFunction When called, the callback passed to `setOAuthRedirectionHandler` receives an object containing the redirection properties.
- *
- */
- setOAuthRedirectionHandler(handlerFunction: HandlerCallback): void;
- /**
- * Use this method in the popup callback page to pass the token and other values back to the IdentityManager.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthResponseHash)
- *
- * @param hash The token information in addition to any other values needed to be passed back to the IdentityManager.
- *
- */
- setOAuthResponseHash(hash: string): void;
-
-
- on(name: "credential-create", eventHandler: IdentityManagerCredentialCreateEventHandler): IHandle;
-
- on(name: "credentials-destroy", eventHandler: IdentityManagerCredentialsDestroyEventHandler): IHandle;
- }
-
- interface IdentityManagerConstructor {
- /**
- * This object provides the framework and helper methods used in managing user credentials for the following resources:
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html)
- */
-
- new(): IdentityManager;
- }
-
- export const IdentityManager: IdentityManagerConstructor;
-
- export interface IdentityManagerCredentialCreateEvent {
-
- credential: Credential;
- }
-
- export interface IdentityManagerCredentialsDestroyEvent {
- }
-
- export type HandlerCallback = (authorizeParams: any, authorizeUrl: string, oAuthInfo: OAuthInfo, resourceUrl: string, serverInfo: ServerInfo) => void;
-
- interface IdentityManagerBase extends Evented {
/**
* The suggested lifetime of the token in minutes.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#tokenValidity)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#tokenValidity)
+ *
* @default 60
*/
tokenValidity: number;
/**
- * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. For instance, let's say an application accesses secure resources from ArcGIS.com or one of its subdomains. Once the application attempts to access this resource, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once a user successfully logs in, they are redirected back to the application. The same holds true if the application accesses secure resources from ArcGIS Enterprise as the IdentityManager will redirect the user to its sign-in page. If you do not wish for the application to automatically redirect, set this property to `false`. (Please note that this is not a common scenario. For most, using the OAuth sign-in behavior should handle most of their authentication needs.)
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#useSignInPage)
- *
+ * If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. For instance, let's say an application accesses secure resources from ArcGIS.com or one of its subdomains. Once the application attempts to access this resource, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once a user successfully logs in, they are redirected back to the application. The same holds true if the application accesses secure resources from ArcGIS Enterprise as the IdentityManager will redirect the user to its sign-in page. If you do not wish for the application to automatically redirect, set this property to `false`.
+ * > Please note that this is not a common scenario. For most, using the OAuth sign-in behavior should handle most of their authentication needs.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#useSignInPage)
+ *
* @default true
*/
useSignInPage: boolean;
/**
- * Returns the [Credential](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) if the user has already signed in to access the given resource. If the user has not signed in, then the promise will be rejected and its error callback will be called.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#checkSignInStatus)
- *
+ * Returns the [Credential](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) if the user has already signed in to access the given resource and is allowed to do so when using the given application id. If the user has not signed in or does not have access, then the promise will be rejected and its error callback will be called.
+ * > This scenario is generally not common unless you are building a licensed app. Also, please note that this method should only be used if your application is on the same domain as `*.arcgis.com` or ArcGIS Enterprise Server and is only applicable to applications registered as items in the `Esri` organization.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#checkAppAccess)
+ *
* @param resUrl The resource URL.
- *
+ * @param appId The registered OAuth application id.
+ *
+ */
+ checkAppAccess(resUrl: string, appId: string): IPromise;
+ /**
+ * Returns the [Credential](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) if the user has already signed in to access the given resource. If the user has not signed in, then the promise will be rejected and its error callback will be called.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#checkSignInStatus)
+ *
+ * @param resUrl The resource URL.
+ *
*/
checkSignInStatus(resUrl: string): IPromise;
/**
* Destroys all credentials.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#destroyCredentials)
- *
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#destroyCredentials)
+ *
+ *
*/
destroyCredentials(): void;
/**
* Returns the [Credential](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) for the resource identified by the specified url. Optionally, you can provide a userId to find credentials for a specific user.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#findCredential)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#findCredential)
+ *
* @param url The URL to a server.
* @param userId The userId for which you want to obtain credentials.
- *
+ *
*/
findCredential(url: string, userId?: string): Credential;
/**
* Returns the [OAuthInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html) configuration for the passed in Portal server URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#findOAuthInfo)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#findOauthInfo)
+ *
* @param url The URL to a Portal.
- *
+ *
*/
- findOAuthInfo(url: string): OAuthInfo;
+ findOauthInfo(url: string): OAuthInfo;
/**
* Returns information about the server that is hosting the specified URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#findServerInfo)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#findServerinfo)
+ *
* @param url The URL to the server
- *
+ *
*/
- findServerInfo(url: string): ServerInfo;
+ findServerinfo(url: string): ServerInfo;
/**
* Returns an object containing a token and its expiration time. It is necessary to provide the [ServerInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html) object that contains a token service URL and a user info object containing username and password. This is a helper method typically called by sub-classes to generate tokens.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#generateToken)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#generateToken)
+ *
* @param serverInfo A ServerInfo object that contains a token service URL.
* @param userInfo A user info object containing a user name and password.
* @param options See the table below for the structure of this object.
* @param options.serverUrl The server URL.
* @param options.token The server token.
* @param options.ssl Indicates if the server requires SSL.
- *
+ *
*/
- generateToken(serverInfo: ServerInfo, userInfo: any, options?: IdentityManagerBaseGenerateTokenOptions): IPromise;
+ generateToken(serverInfo: ServerInfo, userInfo: any, options?: IdentityManagerGenerateTokenOptions): IPromise;
/**
* Returns a [Credential](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) object that can be used to access the secured resource identified by the input URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#getCredential)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#getCredential)
+ *
* @param url The URL for the secure resource
* @param options See the table below for the structure of the **options** object.
* @param options.error Error object returned by the server from a previous attempt to fetch the given URL.
* @param options.oAuthPopupConfirmation If set to *false*, the user will not be shown a dialog before the OAuth popup window is opened.
- * @param options.retry Determines if the method should make additional attempts to get the credentials after a failure.
* @param options.token Token used for a previous unsuccessful attempt to fetch the given URL.
- *
+ *
*/
- getCredential(url: string, options?: IdentityManagerBaseGetCredentialOptions): IPromise;
+ getCredential(url: string, options?: IdentityManagerGetCredentialOptions): IPromise;
/**
- * Call this method during application initialization with the JSON previously obtained from the [toJSON()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#toJSON) method used to re-hydrate the state of IdentityManager.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#initialize)
- *
- * @param json The JSON obtained from the [toJSON()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#toJSON) method.
- *
+ * Call this method during application initialization with the JSON previously obtained from the [toJSON()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#toJSON) method used to re-hydrate the state of IdentityManager.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#initialize)
+ *
+ * @param json The JSON obtained from the [toJSON()](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#toJSON) method.
+ *
*/
initialize(json: any): void;
/**
- * Indicates if the IdentityManager is busy accepting user input. For example, it returns `true` if the user has invoked [signIn](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#signIn) and is waiting for a response.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#isBusy)
- *
- *
+ * Indicates if the IdentityManager is busy accepting user input. For example, it returns `true` if the user has invoked [signIn](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#signIn) and is waiting for a response.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#isBusy)
+ *
+ *
*/
isBusy(): boolean;
- /**
- * Subclasses must implement this method if OAuth support is required.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#oAuthSignIn)
- *
- * @param resUrl The resource URL.
- * @param serverInfo A ServerInfo object that contains the token service URL.
- * @param oAuthInfo An OAuthInfo object that contains the authorization configuration.
- * @param options See the table below for the structure of the **options** object.
- * @param options.error Error object returned by the server from a previous attempt to fetch the given URL.
- * @param options.oAuthPopupConfirmation Indicates whether the user will be shown a dialog before the OAuth popup window is opened.
- * @param options.token Token used for previous unsuccessful attempts to fetch the given URL.
- *
- */
- oAuthSignIn(resUrl: string, serverInfo: ServerInfo, oAuthInfo: OAuthInfo, options?: IdentityManagerBaseOAuthSignInOptions): IPromise;
/**
* Registers OAuth 2.0 configurations.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#registerOAuthInfos)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerOAuthInfos)
+ *
* @param oAuthInfos An array of OAuthInfo objects that defines the OAuth configurations.
- *
+ *
*/
registerOAuthInfos(oAuthInfos: OAuthInfo[]): void;
/**
* Register secure servers and the token endpoints.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#registerServers)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerServers)
+ *
* @param serverInfos An array of ServerInfos objects that defines the secure service and token endpoint. The IdentityManager makes its best guess to determine the location of the secure server and token endpoint. Therefore, in most cases calling this method is not necessary. However, if the location of your server or token endpoint is not standard, use this method to register the location.
- *
+ *
*/
registerServers(serverInfos: ServerInfo[]): void;
/**
- * Registers the given OAuth 2.0 access token or ArcGIS Server token with the IdentityManager. See [registerOAuthInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#registerOAuthInfos) for additional information. The `registerToken` method is an advanced workflow for pre-registering long-term tokens for when you don't want users to sign in. See also [resource-proxy](https://github.com/Esri/resource-proxy) for another workflow to achieve this result. Once a user logs in, the access token is registered with the IdentityManager. Subsequently, every AJAX request made by the application forwards this token when accessing web maps and other items stored in ArcGIS Online, or resources on your server.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#registerToken)
- *
+ * Registers the given OAuth 2.0 access token or ArcGIS Server token with the IdentityManager. See [registerOAuthInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerOAuthInfos) for additional information. The `registerToken` method is an advanced workflow for pre-registering long-term tokens for when you don't want users to sign in. See also [resource-proxy](https://github.com/Esri/resource-proxy) for another workflow to achieve this result. Once a user logs in, the access token is registered with the IdentityManager. Subsequently, every AJAX request made by the application forwards this token when accessing web maps and other items stored in ArcGIS Online, or resources on your server.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#registerToken)
+ *
* @param properties See the table below for the structure of the **properties** object.
* @param properties.expires Token expiration time specified as number of milliseconds since 1 January 1970 00:00:00 UTC.
* @param properties.server For ArcGIS Online or Portal, this is https://www.arcgis.com/sharing/rest or similar to https://www.example.com/portal/sharing/rest. For ArcGIS Server this is similar to https://www.example.com/arcgis/rest/services.
* @param properties.ssl Set this to `true` if the user has an ArcGIS Online organizational account and the organization is configured to allow access to resources only through SSL.
* @param properties.token The access token.
* @param properties.userId The id of the user who owns the access token.
- *
+ *
*/
- registerToken(properties: IdentityManagerBaseRegisterTokenProperties): void;
+ registerToken(properties: IdentityManagerRegisterTokenProperties): void;
+ /**
+ * Once a user successfully logs in, they are redirected back to the application. Use this method if the application needs to execute custom logic before the page is redirected. The IdentityManager calls the custom handler function with an object containing redirection properties.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthRedirectionHandler)
+ *
+ * @param handlerFunction When called, the callback passed to `setOAuthRedirectionHandler` receives an object containing the redirection properties.
+ *
+ */
+ setOAuthRedirectionHandler(handlerFunction: HandlerCallback): void;
+ /**
+ * Use this method in the popup callback page to pass the token and other values back to the IdentityManager.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setOAuthResponseHash)
+ *
+ * @param hash The token information in addition to any other values needed to be passed back to the IdentityManager.
+ *
+ */
+ setOAuthResponseHash(hash: string): void;
/**
* When accessing secured resources, the IdentityManager may prompt for username and password and send them to the server using a secure connection. Due to potential browser limitations, it may not be possible to establish a secure connection with the server if the application is being run over HTTP protocol. In such cases, the Identity Manager will abort the request to fetch the secured resource. To resolve this issue, configure your web application server with HTTPS support and run the application over HTTPS. This is the recommended solution for production environments. However, for internal development environments that don't have HTTPS support, you can define a protocol error handler that allows the Identity Manager to continue with the process over HTTP protocol.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setProtocolErrorHandler)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setProtocolErrorHandler)
+ *
* @param handlerFunction The function to call when the protocol is mismatched.
* @param handlerFunction.resourceUrl The secure resource URL.
* @param handlerFunction.serverInfo ServerInfo object describing the server where the secure resource is hosted.
- *
+ *
*/
- setProtocolErrorHandler(handlerFunction: IdentityManagerBaseSetProtocolErrorHandlerHandlerFunction): void;
+ setProtocolErrorHandler(handlerFunction: IdentityManagerSetProtocolErrorHandlerHandlerFunction): void;
/**
* If your application is on the same domain as *.arcgis.com or ArcGIS Enterprise Server, the IdentityManager will redirect the user to its sign-in page. For instance, let's say an application accesses secure resources from ArcGIS.com or one of its subdomains. Once the application attempts to access this resource, the IdentityManager redirects the user to the ArcGIS.com sign-in page. Once a user successfully logs in, they are redirected back to the application. The same holds true if the application accesses secure resources from ArcGIS Enterprise as the IdentityManager will redirect the user to its sign-in page. Use this method if the application needs to execute custom logic before the page is redirected by creating a custom redirection handler. The IdentityManager calls the custom handler function with an object containing the redirection properties.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setRedirectionHandler)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setRedirectionHandler)
+ *
* @param handlerFunction The function passed to setRedirectionHandler receives an object containing redirection properties. These properties are listed in the table below.
* @param handlerFunction.resourceUrl The URL of the secure resource that triggers the redirection to the ArcGIS.com sign-in page.
* @param handlerFunction.returnUrlParamName The application URL where the sign-in page redirects after a successful login. To create the return URL, append the application's URL to signInPage as a parameter. The *returnUrlParamName* contains the name of the parameter.
* @param handlerFunction.serverInfo The ServerInfo object describing the server where the secure resource is hosted.
* @param handlerFunction.signInPage URL of the sign-in page where users will be redirected.
- *
+ *
*/
- setRedirectionHandler(handlerFunction: IdentityManagerBaseSetRedirectionHandlerHandlerFunction): void;
- /**
- * Subclasses must implement this method to create and manage the user interface used to obtain a username and password from the end user. It should perform the following tasks:
- * * challenge the user for a username and password,
- * * generate a token and return it to the caller.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#signIn)
- *
- * @param url URL for the secured resource.
- * @param serverInfo A ServerInfo object that contains the token service URL.
- * @param options See the table below for the structure of the **options** object.
- * @param options.error Error object returned by the server from a previous attempt to fetch the given URL.
- *
- */
- signIn(url: string, serverInfo: ServerInfo, options?: IdentityManagerBaseSignInOptions): IPromise;
+ setRedirectionHandler(handlerFunction: IdentityManagerSetRedirectionHandlerHandlerFunction): void;
/**
* Return properties of this object in JSON format. It can be stored in a cookie or persisted in HTML5 LocalStorage and later used to:
* * Initialize the IdentityManager the next time a user opens your application.
* * Share the state of the IdentityManager between multiple web pages of your website. This way users will not be asked to sign in repeatedly when they launch your app multiple times or when navigating between multiple web pages in your website.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#toJSON)
- *
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#toJSON)
+ *
+ *
*/
toJSON(): any;
}
- interface IdentityManagerBaseConstructor {
+ interface IdentityManagerConstructor {
/**
- * This class provides the framework and helper methods required to implement a solution for managing user credentials.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html)
+ * This object provides the framework and helper methods used in managing user credentials for the following resources:
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html)
*/
- new(): IdentityManagerBase;
+ new (): IdentityManager;
}
- export const IdentityManagerBase: IdentityManagerBaseConstructor;
+ export const IdentityManager: IdentityManagerConstructor;
+ export type HandlerCallback = (
+ authorizeParams: any,
+ authorizeUrl: string,
+ oAuthInfo: OAuthInfo,
+ resourceUrl: string,
+ serverInfo: ServerInfo
+ ) => void;
- export interface IdentityManagerBaseGenerateTokenOptions extends Object {
+ export interface IdentityManagerGenerateTokenOptions extends Object {
/**
* The server URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#generateToken)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#generateToken)
*/
serverUrl: string;
/**
* The server token.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#generateToken)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#generateToken)
*/
token: string;
/**
* Indicates if the server requires SSL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#generateToken)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#generateToken)
*/
ssl: boolean;
}
-
- export interface IdentityManagerBaseGetCredentialOptions extends Object {
+ export interface IdentityManagerGetCredentialOptions extends Object {
/**
* Error object returned by the server from a previous attempt to fetch the given URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#getCredential)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#getCredential)
*/
error?: Error;
/**
* If set to *false*, the user will not be shown a dialog before the OAuth popup window is opened.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#getCredential)
- *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#getCredential)
+ *
* @default true
*/
oAuthPopupConfirmation?: boolean;
- /**
- * Determines if the method should make additional attempts to get the credentials after a failure.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#getCredential)
- */
- retry?: boolean;
/**
* Token used for a previous unsuccessful attempt to fetch the given URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#getCredential)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#getCredential)
*/
token?: string;
}
-
- export interface IdentityManagerBaseOAuthSignInOptions extends Object {
- /**
- * Error object returned by the server from a previous attempt to fetch the given URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#oAuthSignIn)
- */
- error?: Error;
- /**
- * Indicates whether the user will be shown a dialog before the OAuth popup window is opened.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#oAuthSignIn)
- *
- * @default true
- */
- oAuthPopupConfirmation?: boolean;
- /**
- * Token used for previous unsuccessful attempts to fetch the given URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#oAuthSignIn)
- */
- token?: string;
- }
-
-
- export interface IdentityManagerBaseRegisterTokenProperties extends Object {
+ export interface IdentityManagerRegisterTokenProperties extends Object {
/**
* Token expiration time specified as number of milliseconds since 1 January 1970 00:00:00 UTC.
- *
+ *
* [Read more...](properties.html)
*/
expires?: number;
/**
* For ArcGIS Online or Portal, this is https://www.arcgis.com/sharing/rest or similar to https://www.example.com/portal/sharing/rest. For ArcGIS Server this is similar to https://www.example.com/arcgis/rest/services.
- *
+ *
* [Read more...](properties.html)
*/
server: string;
/**
* Set this to `true` if the user has an ArcGIS Online organizational account and the organization is configured to allow access to resources only through SSL.
- *
+ *
* [Read more...](properties.html)
*/
ssl?: boolean;
/**
* The access token.
- *
+ *
* [Read more...](properties.html)
*/
token: string;
/**
* The id of the user who owns the access token.
- *
+ *
* [Read more...](properties.html)
*/
userId?: string;
}
-
- export interface IdentityManagerBaseSetProtocolErrorHandlerHandlerFunction extends Object {
+ export interface IdentityManagerSetProtocolErrorHandlerHandlerFunction extends Object {
/**
* The secure resource URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setProtocolErrorHandler)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setProtocolErrorHandler)
*/
resourceUrl: string;
/**
* ServerInfo object describing the server where the secure resource is hosted.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setProtocolErrorHandler)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setProtocolErrorHandler)
*/
serverInfo: ServerInfo;
}
-
- export interface IdentityManagerBaseSetRedirectionHandlerHandlerFunction extends Object {
+ export interface IdentityManagerSetRedirectionHandlerHandlerFunction extends Object {
/**
* The URL of the secure resource that triggers the redirection to the ArcGIS.com sign-in page.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setRedirectionHandler)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setRedirectionHandler)
*/
resourceUrl: string;
/**
* The application URL where the sign-in page redirects after a successful login. To create the return URL, append the application's URL to signInPage as a parameter. The *returnUrlParamName* contains the name of the parameter.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setRedirectionHandler)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setRedirectionHandler)
*/
returnUrlParamName: string;
/**
* The ServerInfo object describing the server where the secure resource is hosted.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setRedirectionHandler)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setRedirectionHandler)
*/
serverInfo: ServerInfo;
/**
* URL of the sign-in page where users will be redirected.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#setRedirectionHandler)
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#setRedirectionHandler)
*/
signInPage: string;
}
-
- export interface IdentityManagerBaseSignInOptions extends Object {
- /**
- * Error object returned by the server from a previous attempt to fetch the given URL.
- *
- * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManagerBase.html#signIn)
- */
- error: Error;
- }
-
interface OAuthInfo extends Accessor, JSONSupport {
/**
* The registered application id.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#appId)
*/
appId: string;
/**
* Applications with the same value will share the stored token on the same host.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#authNamespace)
- *
+ *
* @default / (forward slash)
*/
authNamespace: string;
/**
* The number of minutes that the token is valid.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#expiration)
- *
+ *
* @default 20160 (two weeks)
*/
expiration: number;
/**
* The locale for the OAuth sign in page. The default locale is based on your browser/OS and the organization locale. You can use the locale property to change this. The locale needs to follow the language dash country code syntax supported by ArcGIS.com.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#locale)
- *
+ *
* @default Based on your browser/OS and the organization locale.
*/
locale: string;
/**
* The minimum time in minutes before a saved token is due to expire that it should still be considered valid for use.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#minTimeUntilExpiration)
- *
+ *
* @default 30
*/
minTimeUntilExpiration: number;
/**
* Set to `true` to show the OAuth sign in page in a popup window.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#popup)
- *
+ *
* @default false
*/
popup: boolean;
/**
* Applicable if working with the popup user-login workflow. This is a relative page URL that redirects the user back to the secured application after successful login.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#popupCallbackUrl)
- *
+ *
* @default "oauth-callback.html"
*/
popupCallbackUrl: string;
/**
* The window features passed to [window.open()](https://developer.mozilla.org/en-US/docs/Web/API/Window/open).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#popupWindowFeatures)
- *
+ *
* @default height=490,width=800,resizable,scrollbars,status
*/
popupWindowFeatures: string;
/**
* The ArcGIS Enterprise portal URL.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl)
- *
+ *
* @default "https://www.arcgis.com"
*/
portalUrl: string;
/**
* Creates a copy of the OAuthInfo object.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#clone)
- *
- *
+ *
+ *
*/
clone(): OAuthInfo;
}
interface OAuthInfoConstructor {
-
-
- new(properties?: OAuthInfoProperties): OAuthInfo;
+ new (properties?: OAuthInfoProperties): OAuthInfo;
fromJSON(json: any): OAuthInfo;
}
@@ -6302,71 +6421,71 @@ declare namespace __esri {
interface OAuthInfoProperties {
/**
* The registered application id.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#appId)
*/
appId?: string;
/**
* Applications with the same value will share the stored token on the same host.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#authNamespace)
- *
+ *
* @default / (forward slash)
*/
authNamespace?: string;
/**
* The number of minutes that the token is valid.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#expiration)
- *
+ *
* @default 20160 (two weeks)
*/
expiration?: number;
/**
* The locale for the OAuth sign in page. The default locale is based on your browser/OS and the organization locale. You can use the locale property to change this. The locale needs to follow the language dash country code syntax supported by ArcGIS.com.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#locale)
- *
+ *
* @default Based on your browser/OS and the organization locale.
*/
locale?: string;
/**
* The minimum time in minutes before a saved token is due to expire that it should still be considered valid for use.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#minTimeUntilExpiration)
- *
+ *
* @default 30
*/
minTimeUntilExpiration?: number;
/**
* Set to `true` to show the OAuth sign in page in a popup window.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#popup)
- *
+ *
* @default false
*/
popup?: boolean;
/**
* Applicable if working with the popup user-login workflow. This is a relative page URL that redirects the user back to the secured application after successful login.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#popupCallbackUrl)
- *
+ *
* @default "oauth-callback.html"
*/
popupCallbackUrl?: string;
/**
* The window features passed to [window.open()](https://developer.mozilla.org/en-US/docs/Web/API/Window/open).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#popupWindowFeatures)
- *
+ *
* @default height=490,width=800,resizable,scrollbars,status
*/
popupWindowFeatures?: string;
/**
* The ArcGIS Enterprise portal URL.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-OAuthInfo.html#portalUrl)
- *
+ *
* @default "https://www.arcgis.com"
*/
portalUrl?: string;
@@ -6375,40 +6494,38 @@ declare namespace __esri {
interface ServerInfo extends Accessor, JSONSupport {
/**
* The token service URL used to generate tokens for ArcGIS Server Admin resources.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#adminTokenServiceUrl)
*/
adminTokenServiceUrl: string;
/**
* Version of the ArcGIS Server deployed on this server.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#currentVersion)
*/
currentVersion: number;
/**
* The server URL.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#server)
*/
server: string;
/**
* Validity of short-lived token in minutes.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#shortLivedTokenValidity)
*/
shortLivedTokenValidity: number;
/**
* The token service URL used to generate tokens for the secured resources on the server.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#tokenServiceUrl)
*/
tokenServiceUrl: string;
}
interface ServerInfoConstructor {
-
-
- new(properties?: ServerInfoProperties): ServerInfo;
+ new (properties?: ServerInfoProperties): ServerInfo;
fromJSON(json: any): ServerInfo;
}
@@ -6418,40 +6535,39 @@ declare namespace __esri {
interface ServerInfoProperties {
/**
* The token service URL used to generate tokens for ArcGIS Server Admin resources.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#adminTokenServiceUrl)
*/
adminTokenServiceUrl?: string;
/**
* Version of the ArcGIS Server deployed on this server.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#currentVersion)
*/
currentVersion?: number;
/**
* The server URL.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#server)
*/
server?: string;
/**
* Validity of short-lived token in minutes.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#shortLivedTokenValidity)
*/
shortLivedTokenValidity?: number;
/**
* The token service URL used to generate tokens for the secured resources on the server.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-ServerInfo.html#tokenServiceUrl)
*/
tokenServiceUrl?: string;
}
-
interface kernel {
/**
- * Current version of the ArcGIS API for JavaScript.
+ * Current version of the ArcGIS API for JavaScript.
* ```js
* require([
* "esri/kernel"
@@ -6459,7 +6575,7 @@ declare namespace __esri {
* console.log(esriNS.version);
* });
* ```
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-kernel.html#version)
*/
readonly version: string;
@@ -6470,37 +6586,36 @@ declare namespace __esri {
interface BaseDynamicLayer extends Layer, ScaleRangeLayer, RefreshableLayer {
/**
* Adds a promise to the layer's [loadable](https://developers.arcgis.com/javascript/latest/guide/loadable/index.html) chain. This is typically used in the [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html#load) method to ensure that all [loadable](https://developers.arcgis.com/javascript/latest/guide/loadable/index.html) resources required for the layer to function are loaded prior to this layer resolving and becoming [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html#loaded).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html#addResolvingPromise)
- *
+ *
* @param promiseToLoad A promise that must resolve for the layer to resolve and move from the `loading` [status](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html#loadStatus) to being [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html#loaded).
- *
+ *
*/
addResolvingPromise(promiseToLoad: IPromise): IPromise;
/**
* This method fetches the image for the specified extent and size. Override this method if the data returned from the server needs to be processed before it can be displayed. For example, if the server returns binary data, override this method to convert the binary data to an image.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html#fetchImage)
- *
+ *
* @param extent The extent of the view. This value is provided by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param width The width of the view in pixels. This value is provided by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param height The height of the view in pixels. This value is provided by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
- *
+ *
*/
fetchImage(extent: Extent, width: number, height: number): IPromise;
/**
* This method returns a URL to an image for a given extent, width, and height. Override this method to construct the URL for the image based on user interaction.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html#getImageUrl)
- *
+ *
* @param extent Extent of the view. This value is populated by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param width Width of the view in pixels. This value is populated by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param height Height of the view in pixels. This value is populated by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
- *
+ *
*/
getImageUrl(extent: Extent, width: number, height: number): IPromise | string;
-
on(name: "layerview-create", eventHandler: BaseDynamicLayerLayerviewCreateEventHandler): IHandle;
on(name: "layerview-destroy", eventHandler: BaseDynamicLayerLayerviewDestroyEventHandler): IHandle;
@@ -6509,28 +6624,24 @@ declare namespace __esri {
interface BaseDynamicLayerConstructor {
/**
* This class may be extended to create dynamic map layers. Dynamic layers display an image dynamically generated on the server based on a request, including the extent and size of the image. The exported image covers the entire view extent. Each interaction on the view (e.g. panning, zooming) will result in an export of a new image on the server. Each export is unique so it cannot be cached in the browser.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseDynamicLayer.html)
*/
- new(properties?: BaseDynamicLayerProperties): BaseDynamicLayer;
+ new (properties?: BaseDynamicLayerProperties): BaseDynamicLayer;
}
export const BaseDynamicLayer: BaseDynamicLayerConstructor;
- interface BaseDynamicLayerProperties extends LayerProperties, ScaleRangeLayerProperties, RefreshableLayerProperties {
-
- }
+ interface BaseDynamicLayerProperties extends LayerProperties, ScaleRangeLayerProperties, RefreshableLayerProperties {}
export interface BaseDynamicLayerLayerviewCreateEvent {
-
layerView: LayerView;
view: View;
}
export interface BaseDynamicLayerLayerviewDestroyEvent {
-
layerView: LayerView;
view: View;
@@ -6539,57 +6650,61 @@ declare namespace __esri {
interface BaseElevationLayer extends Layer {
/**
* The spatial reference of the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#spatialReference)
- *
+ *
* @default {@link module:esri/geometry/SpatialReference#WebMercator SpatialReference.WebMercator}
*/
spatialReference: SpatialReference;
/**
* The tiling scheme information for the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#tileInfo)
*/
tileInfo: TileInfo;
/**
* Adds a promise to the layer's [loadable](https://developers.arcgis.com/javascript/latest/guide/loadable/index.html) chain. This is typically used in the [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#load) method to ensure that all [loadable](https://developers.arcgis.com/javascript/latest/guide/loadable/index.html) resources required for the layer to function are loaded prior to this layer resolving and becoming [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#loaded).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#addResolvingPromise)
- *
+ *
* @param promiseToLoad A promise that must resolve for the layer to resolve and move from the `loading` [status](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#loadStatus) to being [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#loaded).
- *
+ *
*/
addResolvingPromise(promiseToLoad: IPromise): IPromise;
/**
- * Fetches a tile at the given level, row, and column present in the view. This method must be overwritten to display custom elevation values in the [Map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground). Note that this method must return a promise that resolves to an object with the properties defined in [ElevationTileData](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData). See the following samples for examples of how to overwrite this method:
+ * Fetches a tile at the given level, row, and column present in the view. This method must be overwritten to display custom elevation values in the [Map.ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#ground). Note that this method must return a promise that resolves to an object with the properties defined in [ElevationTileData](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData). See the following samples for examples of how to overwrite this method:
* * [Sample - Custom ElevationLayer: Exaggerating elevation](https://developers.arcgis.com/javascript/latest/sample-code/layers-custom-elevation-exaggerated/index.html)
* * [Sample - Custom ElevationLayer: Thematic data as elevation](https://developers.arcgis.com/javascript/latest/sample-code/layers-custom-elevation-thematic/index.html)
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#fetchTile)
- *
+ *
* @param level The level of detail of the tile to fetch.
* @param row The row (y) position of the tile to fetch.
* @param column The column (x) position of the tile to fetch.
* @param options Optional settings for the tile request.
* @param options.noDataValue The value representing pixels in the tile that don't contain an elevation value.
- *
+ *
*/
- fetchTile(level: number, row: number, column: number, options?: BaseElevationLayerFetchTileOptions): IPromise;
+ fetchTile(
+ level: number,
+ row: number,
+ column: number,
+ options?: BaseElevationLayerFetchTileOptions
+ ): IPromise;
/**
* Returns the bounds of the tile as an array of four numbers that can be readily converted to an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object. See the table in the `returns` section below for more details about the values returned by this method. This function can be used inside [fetchTile()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#fetchTile) so you can get the bounds of the current tile, convert it to an extent object, and request the desired data for the given extent. See the [Custom ElevationLayer: Thematic data as elevation](https://developers.arcgis.com/javascript/latest/sample-code/layers-custom-elevation-thematic/index.html) sample for an example of how this method works.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#getTileBounds)
- *
+ *
* @param level The level of detail (LOD) of the tile.
* @param row The tile's row (y) position in the dataset.
* @param column The tiles column (x) position in the dataset.
* @param out Array for storing the tile bounds or extent.
- *
+ *
*/
getTileBounds(level: number, row: number, column: number, out?: number[]): number[];
-
on(name: "layerview-create", eventHandler: BaseElevationLayerLayerviewCreateEventHandler): IHandle;
on(name: "layerview-destroy", eventHandler: BaseElevationLayerLayerviewDestroyEventHandler): IHandle;
@@ -6598,11 +6713,11 @@ declare namespace __esri {
interface BaseElevationLayerConstructor {
/**
* BaseElevationLayer is intended to be extended for creating custom elevation layers. You create a custom [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html) by calling [createSubclass()](https://dojotoolkit.org/reference-guide/1.10/dojo/_base/declare.html#createsubclass) on the `BaseElevationLayer`.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html)
*/
- new(properties?: BaseElevationLayerProperties): BaseElevationLayer;
+ new (properties?: BaseElevationLayerProperties): BaseElevationLayer;
}
export const BaseElevationLayer: BaseElevationLayerConstructor;
@@ -6610,25 +6725,24 @@ declare namespace __esri {
interface BaseElevationLayerProperties extends LayerProperties {
/**
* The spatial reference of the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#spatialReference)
- *
+ *
* @default {@link module:esri/geometry/SpatialReference#WebMercator SpatialReference.WebMercator}
*/
spatialReference?: SpatialReferenceProperties;
/**
* The tiling scheme information for the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#tileInfo)
*/
tileInfo?: TileInfoProperties;
}
-
export interface BaseElevationLayerFetchTileOptions extends Object {
/**
* The value representing pixels in the tile that don't contain an elevation value.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#fetchTile)
*/
noDataValue?: number;
@@ -6636,51 +6750,49 @@ declare namespace __esri {
/**
* Describes elevation contained in the pixels that comprise an elevation tile.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData)
*/
export interface ElevationTileData extends Object {
/**
* The elevation values of each pixel in the tile.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData)
*/
values: number[];
/**
* The width of the tile in pixels.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData)
*/
width: number;
/**
* The height of the tile in pixels.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData)
*/
height: number;
/**
* The maximum allowed error of the Z-value for each value in meters.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData)
*/
maxZError: number;
/**
* Indicating the pixel values where no elevation data is present.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseElevationLayer.html#ElevationTileData)
*/
noDataValue: number;
}
export interface BaseElevationLayerLayerviewCreateEvent {
-
layerView: LayerView;
view: View;
}
export interface BaseElevationLayerLayerviewDestroyEvent {
-
layerView: LayerView;
view: View;
@@ -6689,73 +6801,72 @@ declare namespace __esri {
interface BaseTileLayer extends Layer, ScaleRangeLayer, RefreshableLayer {
/**
* The spatial reference of the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#spatialReference)
- *
+ *
* @default {@link module:esri/geometry/SpatialReference#WebMercator SpatialReference.WebMercator}
*/
spatialReference: SpatialReference;
/**
* The tiling scheme information for the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#tileInfo)
*/
tileInfo: TileInfo;
/**
* Adds a promise to the layer's [loadable](https://developers.arcgis.com/javascript/latest/guide/loadable/index.html) chain. This is typically used in the [load()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#load) method to ensure that all [loadable](https://developers.arcgis.com/javascript/latest/guide/loadable/index.html) resources required for the layer to function are loaded prior to this layer resolving and becoming [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#loaded).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#addResolvingPromise)
- *
+ *
* @param promiseToLoad A promise that must resolve for the layer to resolve and move from the `loading` [status](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#loadStatus) to being [loaded](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#loaded).
- *
+ *
*/
addResolvingPromise(promiseToLoad: IPromise): IPromise;
/**
* This method fetches a tile for the given level, row and column present in the view. Override this method if the data or image returned from the server needs to be processed before it can be displayed.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#fetchTile)
- *
+ *
* @param level Level of detail of the tile to fetch. This value is provided by [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param row The row (y) position of the tile fetch. This value is provided by [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param col The column (x) position of the tile to fetch. This value is provided by [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param options Optional settings for the tile request. The options have the following properties.
- *
+ *
*/
fetchTile(level: number, row: number, col: number, options?: any): IPromise;
/**
- * Returns the bounds of the tile as an array of four numbers that be readily converted to an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object. The value for each item in the array is described in the following table:
- *
+ * Returns the bounds of the tile as an array of four numbers that be readily converted to an [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) object. The value for each item in the array is described in the following table:
+ *
* Index | Value
* ------|------
* 0 | Minimum x-value
* 1 | Minimum y-value
* 2 | Maximum x-value
* 3 | Maximum y-value
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#getTileBounds)
- *
+ *
* @param level The level of detail (LOD) of the tile.
* @param row The tile's row (y) position in the dataset.
* @param column The tiles column (x) position in the dataset.
* @param out Array for storing the tile bounds or extent.
- *
+ *
*/
getTileBounds(level: number, row: number, column: number, out?: number[]): number[];
/**
* This method returns a URL to an image for a given level, row and column. Override this method to construct the URL for the image based on user interaction.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#getTileUrl)
- *
+ *
* @param level Level of detail. This value is provided by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param row Tile row. This value is provided by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
* @param col Tile column. This value is provided by the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html).
- *
+ *
*/
getTileUrl(level: number, row: number, col: number): string;
-
on(name: "layerview-create", eventHandler: BaseTileLayerLayerviewCreateEventHandler): IHandle;
on(name: "layerview-destroy", eventHandler: BaseTileLayerLayerviewDestroyEventHandler): IHandle;
@@ -6764,11 +6875,11 @@ declare namespace __esri {
interface BaseTileLayerConstructor {
/**
* This class may be extended to create a custom [TileLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-TileLayer.html). Tile layers are composed of images, such as satellite imagery, that are composed of square tiles mosaicked together in columns and rows, giving the layer the appearance that it is one continuous image. These layers have several levels of detail (LOD) that permit users to zoom in to any region of the map and load additional tiles that depict features in higher resolution at larger map scales.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html)
*/
- new(properties?: BaseTileLayerProperties): BaseTileLayer;
+ new (properties?: BaseTileLayerProperties): BaseTileLayer;
}
export const BaseTileLayer: BaseTileLayerConstructor;
@@ -6776,29 +6887,27 @@ declare namespace __esri {
interface BaseTileLayerProperties extends LayerProperties, ScaleRangeLayerProperties, RefreshableLayerProperties {
/**
* The spatial reference of the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#spatialReference)
- *
+ *
* @default {@link module:esri/geometry/SpatialReference#WebMercator SpatialReference.WebMercator}
*/
spatialReference?: SpatialReferenceProperties;
/**
* The tiling scheme information for the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html#tileInfo)
*/
tileInfo?: TileInfoProperties;
}
export interface BaseTileLayerLayerviewCreateEvent {
-
layerView: LayerView;
view: View;
}
export interface BaseTileLayerLayerviewDestroyEvent {
-
layerView: LayerView;
view: View;
@@ -6807,50 +6916,55 @@ declare namespace __esri {
interface BingMapsLayer extends BaseTileLayer {
/**
* Expose Bing logo url.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#bingLogo)
*/
readonly bingLogo: string;
/**
* Copyright information.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#copyright)
*/
readonly copyright: string;
/**
* Provides culture specific map labels. For more information visit: https://msdn.microsoft.com/en-us/library/ff701709.aspx For a list of supported culture codes please visit: https://msdn.microsoft.com/en-us/library/hh441729.aspx
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#culture)
- *
+ *
* @default "en-US"
*/
culture: string;
+ /**
+ * Indicates if the layer has attribution data.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#hasAttributionData)
+ */
+ readonly hasAttributionData: boolean;
/**
* Bing Maps Key.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#key)
- *
+ *
* @default null
*/
key: string;
/**
* This will alter Geopolitical disputed borders and labels to align with the specified user region. For more information on Bing's region setting please visit: https://msdn.microsoft.com/en-us/library/ff701704.aspx For a list of supported country codes please visit: see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#region)
- *
+ *
* @default null
*/
region: string;
/**
* The three supported maps are: `road` | `aerial` | `hybrid` For more information on Bing map styles please visit: https://msdn.microsoft.com/en-us/library/ff701716.aspx
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#style)
- *
+ *
* @default "road"
*/
style: string;
-
on(name: "layerview-create", eventHandler: BingMapsLayerLayerviewCreateEventHandler): IHandle;
on(name: "layerview-destroy", eventHandler: BingMapsLayerLayerviewDestroyEventHandler): IHandle;
@@ -6859,11 +6973,11 @@ declare namespace __esri {
interface BingMapsLayerConstructor {
/**
* This layer supports Microsoft's Bing tiled map content. Three map styles are supported - `road`, `aerial` and `hybrid`. Please note that a valid [Bing Maps key](https://msdn.microsoft.com/en-us/library/ff428642.aspx) is required to use this layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html)
*/
- new(properties?: BingMapsLayerProperties): BingMapsLayer;
+ new (properties?: BingMapsLayerProperties): BingMapsLayer;
}
export const BingMapsLayer: BingMapsLayerConstructor;
@@ -6871,68 +6985,323 @@ declare namespace __esri {
interface BingMapsLayerProperties extends BaseTileLayerProperties {
/**
* Provides culture specific map labels. For more information visit: https://msdn.microsoft.com/en-us/library/ff701709.aspx For a list of supported culture codes please visit: https://msdn.microsoft.com/en-us/library/hh441729.aspx
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#culture)
- *
+ *
* @default "en-US"
*/
culture?: string;
/**
* Bing Maps Key.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#key)
- *
+ *
* @default null
*/
key?: string;
/**
* This will alter Geopolitical disputed borders and labels to align with the specified user region. For more information on Bing's region setting please visit: https://msdn.microsoft.com/en-us/library/ff701704.aspx For a list of supported country codes please visit: see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#region)
- *
+ *
* @default null
*/
region?: string;
/**
* The three supported maps are: `road` | `aerial` | `hybrid` For more information on Bing map styles please visit: https://msdn.microsoft.com/en-us/library/ff701716.aspx
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BingMapsLayer.html#style)
- *
+ *
* @default "road"
*/
style?: string;
}
export interface BingMapsLayerLayerviewCreateEvent {
-
layerView: LayerView;
view: View;
}
export interface BingMapsLayerLayerviewDestroyEvent {
-
layerView: LayerView;
view: View;
}
+ interface BuildingSceneLayer extends Layer, SceneService, PortalLayer {
+ /**
+ * A flat [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of all the [sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#sublayers) in the BuildingSublayer.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#allSublayers)
+ */
+ readonly allSublayers: Collection;
+ /**
+ * Specifies how features are placed on the vertical axis (z). This property only affects [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html) when using the `absolute-height` mode.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#elevationInfo)
+ */
+ elevationInfo: BuildingSceneLayerElevationInfo;
+ /**
+ * Hierarchical structure of sublayers in a BuildingSceneLayer. Usually contains an Overview [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html) and a Full Model [BuildingGroupSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html). However, some BuildingSceneLayers can contain only the Full Model [BuildingGroupSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html) or the discipline [BuildingGroupSublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html) directly.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#sublayers)
+ */
+ readonly sublayers: Collection;
+
+ on(name: "layerview-create", eventHandler: BuildingSceneLayerLayerviewCreateEventHandler): IHandle;
+
+ on(name: "layerview-destroy", eventHandler: BuildingSceneLayerLayerviewDestroyEventHandler): IHandle;
+ }
+
+ interface BuildingSceneLayerConstructor {
+ /**
+ * The BuildingSceneLayer is designed for visualizing buildings with detailed interiors in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). These building models are usually exported from Building Information Modeling (BIM) projects. The data in a BuildingSceneLayer can represent walls, lighting fixtures, mechanical systems, furniture and so on.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html)
+ */
+
+ new (properties?: BuildingSceneLayerProperties): BuildingSceneLayer;
+
+ fromJSON(json: any): BuildingSceneLayer;
+ }
+
+ export const BuildingSceneLayer: BuildingSceneLayerConstructor;
+
+ interface BuildingSceneLayerProperties extends LayerProperties, SceneServiceProperties, PortalLayerProperties {
+ /**
+ * Specifies how features are placed on the vertical axis (z). This property only affects [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html) when using the `absolute-height` mode.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#elevationInfo)
+ */
+ elevationInfo?: BuildingSceneLayerElevationInfo;
+ }
+
+ export interface BuildingSceneLayerElevationInfo extends Object {
+ /**
+ * Defines how features are placed on the vertical axis (z). Currently only `absolute-height` mode is supported.
+ *
+ * Mode | Description
+ * ------|------------
+ * absolute-height | Features are placed at an absolute elevation (z-value) above sea level. This z-value is determined by summing up the `offset` value and the point's z-value. It doesn't take the elevation of the terrain into account. This is the only supported elevation mode for a [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html).
+ *
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#elevationInfo)
+ */
+ mode: string;
+ /**
+ * An elevation offset, which is added to the vertical position of each feature.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#elevationInfo)
+ *
+ * @default 0
+ */
+ offset?: number;
+ /**
+ * The unit for `offset` values. **Possible Values:** feet | meters | kilometers | miles | us-feet | yards
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html#elevationInfo)
+ *
+ * @default meters
+ */
+ unit?: string;
+ }
+
+ export interface BuildingSceneLayerLayerviewCreateEvent {
+ layerView: LayerView;
+
+ view: View;
+ }
+
+ export interface BuildingSceneLayerLayerviewDestroyEvent {
+ layerView: LayerView;
+
+ view: View;
+ }
+
+ interface BuildingComponentSublayer extends BuildingSublayer, Loadable {
+ /**
+ * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when only a subset of the data in the layer should be displayed. Setting the definition expression of a layer automatically updates all layer views. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. Important to note is that the initial loading time of the features remains unchanged, even if they are filtered. This happens because, as opposed to Feature Layers, feature filtering is done client-side. As a result all features need to be downloaded always for filter evaluation. This property is evaluated on the client using the cached attributes and it only supports [standardized SQL](http://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm).
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#definitionExpression)
+ */
+ definitionExpression: string;
+ /**
+ * Indicates whether to display popups when features in the layer are clicked.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupEnabled)
+ *
+ * @default true
+ */
+ popupEnabled: boolean;
+ /**
+ * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate)
+ */
+ popupTemplate: PopupTemplate;
+ /**
+ * The renderer assigned to the sublayer. The renderer defines how to visualize each feature in the sublayer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#renderer)
+ */
+ renderer: Renderer;
+ /**
+ * The type for this sublayer is always `building-component`.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#type)
+ */
+ readonly type: "building-component";
+ }
+
+ interface BuildingComponentSublayerConstructor {
+ new (properties?: BuildingComponentSublayerProperties): BuildingComponentSublayer;
+
+ fromJSON(json: any): BuildingComponentSublayer;
+ }
+
+ export const BuildingComponentSublayer: BuildingComponentSublayerConstructor;
+
+ interface BuildingComponentSublayerProperties extends BuildingSublayerProperties, LoadableProperties {
+ /**
+ * The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when only a subset of the data in the layer should be displayed. Setting the definition expression of a layer automatically updates all layer views. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression. Important to note is that the initial loading time of the features remains unchanged, even if they are filtered. This happens because, as opposed to Feature Layers, feature filtering is done client-side. As a result all features need to be downloaded always for filter evaluation. This property is evaluated on the client using the cached attributes and it only supports [standardized SQL](http://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm).
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#definitionExpression)
+ */
+ definitionExpression?: string;
+ /**
+ * Indicates whether to display popups when features in the layer are clicked.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupEnabled)
+ *
+ * @default true
+ */
+ popupEnabled?: boolean;
+ /**
+ * The popup template for the sublayer. When set, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html). Setting a [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) on this layer type is done in the same way as a FeatureLayer.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#popupTemplate)
+ */
+ popupTemplate?: PopupTemplateProperties;
+ /**
+ * The renderer assigned to the sublayer. The renderer defines how to visualize each feature in the sublayer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html#renderer)
+ */
+ renderer?: RendererProperties;
+ }
+
+ interface BuildingGroupSublayer extends BuildingSublayer {
+ /**
+ * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) of sublayers.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#sublayers)
+ */
+ readonly sublayers: Collection;
+ /**
+ * The type for this sublayer is always `building-group`.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingGroupSublayer.html#type)
+ */
+ readonly type: "building-group";
+ }
+
+ interface BuildingGroupSublayerConstructor {
+ new (properties?: BuildingGroupSublayerProperties): BuildingGroupSublayer;
+
+ fromJSON(json: any): BuildingGroupSublayer;
+ }
+
+ export const BuildingGroupSublayer: BuildingGroupSublayerConstructor;
+
+ interface BuildingGroupSublayerProperties extends BuildingSublayerProperties {}
+
+ interface BuildingSublayer extends Accessor {
+ /**
+ * The sublayer's layer id as defined by the Scene Service.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#id)
+ */
+ readonly id: number;
+ /**
+ * The modelName is a standard name for each sublayer. For example the sublayer containing the doors in a building has the modelName "Doors". Use this property to retrieve sublayers in a [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html).
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#modelName)
+ */
+ readonly modelName: string;
+ /**
+ * Opacity of the sublayer.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#opacity)
+ *
+ * @default 1
+ */
+ opacity: number;
+ /**
+ * The title of the sublayer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) and [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widgets.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#title)
+ */
+ title: string;
+ /**
+ * Indicates if the sublayer is visible in the view.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#visible)
+ *
+ * @default true
+ */
+ visible: boolean;
+ }
+
+ interface BuildingSublayerConstructor {
+ new (properties?: BuildingSublayerProperties): BuildingSublayer;
+
+ fromJSON(json: any): BuildingSublayer;
+ }
+
+ export const BuildingSublayer: BuildingSublayerConstructor;
+
+ interface BuildingSublayerProperties {
+ /**
+ * Opacity of the sublayer.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#opacity)
+ *
+ * @default 1
+ */
+ opacity?: number;
+ /**
+ * The title of the sublayer used to identify it in places such as the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) and [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widgets.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#title)
+ */
+ title?: string;
+ /**
+ * Indicates if the sublayer is visible in the view.
+ *
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingSublayer.html#visible)
+ *
+ * @default true
+ */
+ visible?: boolean;
+ }
+
interface CSVLayer extends Layer {
/**
* Copyright information for the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#copyright)
*/
copyright: string;
/**
* The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#definitionExpression)
*/
definitionExpression: string;
/**
- * The column delimiter. See the table below for possible values.
- *
+ * The column delimiter. See the table below for possible values.
+ *
* | Value | Description|
* | --- | --- |
* | `,` | comma |
@@ -6940,208 +7309,206 @@ declare namespace __esri {
* | `;` | semicolon |
* | `|` | pipe |
* | `\t` | tab-delimited |
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#delimiter)
*/
delimiter: string;
/**
* Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo)
*/
elevationInfo: CSVLayerElevationInfo;
/**
* Configures the method for decluttering overlapping features in the view. If this property is not set (or set to `null`), every feature is drawn individually. Currently this property is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) for point features with non-draped [Icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html) or [Text](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html) symbol layers. 
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#featureReduction)
*/
featureReduction: CSVLayerFeatureReduction;
/**
* An array of fields in the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#fields)
*/
fields: Field[];
/**
- * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks).
+ * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks).
* > **Known Limitations** Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo)
*/
labelingInfo: LabelClass[];
/**
- * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) property.
- * > **Known Limitations**
+ * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) property.
+ * > **Known Limitations**
* * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
- * * Currently the `labelsVisible` property must be explicitly set to `true` for labels to be printed.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible)
- *
+ *
* @default true
*/
labelsVisible: boolean;
/**
* The latitude field name. If not specified, the API will look for following field names in the CSV source: "lat", "latitude", "y", "ycenter", "latitude83", "latdecdeg", "POINT-Y".
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#latitudeField)
*/
latitudeField: string;
/**
* Indicates whether the layer will be included in the legend.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#legendEnabled)
- *
+ *
* @default true
*/
legendEnabled: boolean;
/**
* The longitude field name. If not specified, the API will look for following field names in the CSV source: "lon", "lng", "long", "longitude", "x", "xcenter", "longitude83", "longdecdeg", "POINT-X".
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#longitudeField)
*/
longitudeField: string;
/**
* The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) value, and greater than or equal to the service specification.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale)
- *
+ *
* @default 0
*/
maxScale: number;
/**
* The minimum scale (most zoomed out) at which the layer is visible in the view. If the map is zoomed out beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a minimum scale. The minScale value should always be larger than the [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) value, and lesser than or equal to the service specification.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale)
- *
+ *
* @default 0
*/
minScale: number;
/**
* An array of field names to include in the CSVLayer. If not specified, the layer will include all fields.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#outFields)
*/
outFields: string[];
/**
* Indicates whether to display popups when features in the layer are clicked.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupEnabled)
- *
+ *
* @default true
*/
popupEnabled: boolean;
/**
* The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate)
*/
popupTemplate: PopupTemplate;
/**
* The renderer assigned to the layer. The renderer defines how to visualize each feature in the layer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#renderer)
*/
renderer: Renderer;
/**
- * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true`  `layer.screenSizePerspectiveEnabled = false` 
+ * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true`  `layer.screenSizePerspectiveEnabled = false` 
* > **Known Limitations** Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes with point features located far from the ground surface. In these cases it may be better to turn off screen size perspective. As screen size perspective changes the size based on distance to the camera, it should be set to false when using {@link module:esri/renderers/Renderer#SizeVisualVariable size visual variables}.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#screenSizePerspectiveEnabled)
- *
+ *
* @default true
*/
screenSizePerspectiveEnabled: boolean;
/**
- * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data.
+ * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data.
* > **Known Limitations** The browser must support [WebAssembly](https://caniuse.com/#feat=wasm) if a spatial reference other than WGS84 or Web Mercator is specified.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#spatialReference)
- *
+ *
* @default SpatialReference.WGS84
*/
spatialReference: SpatialReference;
/**
* The URL of the CSV file.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#url)
*/
url: string;
/**
* Creates query parameters that can be used to fetch features that satisfy the layer's current filters, and definitions.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#createQuery)
- *
- *
+ *
+ *
*/
createQuery(): Query;
/**
- * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned.
- * > **Known Limitations**
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If no parameters are specified, then the extent and count of all features satisfying the layer's configuration/filters are returned.
+ * > **Known Limitations**
* * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation.
* * Spatial queries are currently not supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
* * GDM 2000 (4742) – Malaysia
* * Gusterberg (Ferro) (8042) – Austria/Czech Republic
* * ISN2016 (8086) - Iceland
* * SVY21 (4757) - Singapore
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryExtent)
- *
+ *
* @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
- *
+ *
*/
queryExtent(params?: Query | QueryProperties): IPromise;
/**
- * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the number of features that satisfy the query. If no parameters are specified, then the total number of features satisfying the layer's configuration/filters is returned.
- * > **Known Limitations**
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns the number of features that satisfy the query. If no parameters are specified, then the total number of features satisfying the layer's configuration/filters is returned.
+ * > **Known Limitations**
* * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation.
* * Spatial queries are currently not supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
* * GDM 2000 (4742) – Malaysia
* * Gusterberg (Ferro) (8042) – Austria/Czech Republic
* * ISN2016 (8086) - Iceland
* * SVY21 (4757) - Singapore
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryFeatureCount)
- *
+ *
* @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
- *
+ *
*/
queryFeatureCount(params?: Query | QueryProperties): IPromise;
/**
- * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves. A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) features, which can be added to the [view's graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). This array will not be populated if zero results are found.
- * > **Known Limitations**
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html), which can be accessed using the `.then()` method once the promise resolves. A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) features, which can be added to the [view's graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#graphics). This array will not be populated if zero results are found.
+ * > **Known Limitations**
* * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation.
* * Spatial queries are not currently supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
* * GDM 2000 (4742) – Malaysia
* * Gusterberg (Ferro) (8042) – Austria/Czech Republic
* * ISN2016 (8086) - Iceland
* * SVY21 (4757) - Singapore
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryFeatures)
- *
+ *
* @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
- *
+ *
*/
queryFeatures(params?: Query | QueryProperties): IPromise;
/**
- * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns an array of Object IDs for features that satisfy the input query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned.
- * > **Known Limitations**
+ * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html) against the CSV data and returns an array of Object IDs for features that satisfy the input query. If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned.
+ * > **Known Limitations**
* * Spatial queries have the same limitations as those listed in the [projection engine](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html) documentation.
* * Spatial queries are currently not supported if the layer view has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
* * GDM 2000 (4742) – Malaysia
* * Gusterberg (Ferro) (8042) – Austria/Czech Republic
* * ISN2016 (8086) - Iceland
* * SVY21 (4757) - Singapore
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#queryObjectIds)
- *
+ *
* @param params Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features in the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's extent.
- *
+ *
*/
queryObjectIds(params?: Query | QueryProperties): IPromise;
-
on(name: "layerview-create", eventHandler: CSVLayerLayerviewCreateEventHandler): IHandle;
on(name: "layerview-destroy", eventHandler: CSVLayerLayerviewDestroyEventHandler): IHandle;
@@ -7150,11 +7517,11 @@ declare namespace __esri {
interface CSVLayerConstructor {
/**
* The CSVLayer is a point layer based on a CSV file (.csv, .txt). CSV is a plain-text file format used to represent tabular data, including geographic point features (latitude, longitude). Typically the latitude coordinate is the Y value, and the longitude coordinate is the X value. Features from the CSV file are accessible via the API so you can query features and use them as input to geometry or geoprocessing services.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html)
*/
- new(properties?: CSVLayerProperties): CSVLayer;
+ new (properties?: CSVLayerProperties): CSVLayer;
}
export const CSVLayer: CSVLayerConstructor;
@@ -7162,19 +7529,19 @@ declare namespace __esri {
interface CSVLayerProperties extends LayerProperties {
/**
* Copyright information for the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#copyright)
*/
copyright?: string;
/**
* The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). Setting a definition expression is useful when the dataset is large and you don't want to bring all features to the client for analysis. Definition expressions may be set when a layer is constructed prior to it loading in the view or after it has been added to the map. If the definition expression is set after the layer has been added to the map, the view will automatically refresh itself to display the features that satisfy the new definition expression.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#definitionExpression)
*/
definitionExpression?: string;
/**
- * The column delimiter. See the table below for possible values.
- *
+ * The column delimiter. See the table below for possible values.
+ *
* | Value | Description|
* | --- | --- |
* | `,` | comma |
@@ -7182,200 +7549,194 @@ declare namespace __esri {
* | `;` | semicolon |
* | `|` | pipe |
* | `\t` | tab-delimited |
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#delimiter)
*/
delimiter?: string;
/**
* Specifies how graphics are placed on the vertical axis (z). This property may only be used in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [ElevationInfo sample](https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/index.html) for an example of how this property may be used.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo)
*/
elevationInfo?: CSVLayerElevationInfo;
/**
* Configures the method for decluttering overlapping features in the view. If this property is not set (or set to `null`), every feature is drawn individually. Currently this property is only supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) for point features with non-draped [Icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html) or [Text](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol3DLayer.html) symbol layers. 
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#featureReduction)
*/
featureReduction?: CSVLayerFeatureReduction;
/**
* An array of fields in the layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#fields)
*/
fields?: FieldProperties[];
/**
- * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks).
+ * The label definition for this layer, specified as an array of [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify labeling properties for the layer. For labels to display in the view, the [labelsVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible) property of this layer must be set to `true`. Multiple Label classes with different `where` clauses can be used to define several labels with varying styles on the same feature. Likewise, multiple label classes may be used to label different types of features (for example blue labels for lakes and green labels for parks).
* > **Known Limitations** Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo)
*/
labelingInfo?: LabelClassProperties[];
/**
- * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) property.
- * > **Known Limitations**
+ * Indicates whether to display labels for this layer. If `true`, labels will appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelingInfo) property.
+ * > **Known Limitations**
* * Currently only one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) is supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
- * * Currently the `labelsVisible` property must be explicitly set to `true` for labels to be printed.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#labelsVisible)
- *
+ *
* @default true
*/
labelsVisible?: boolean;
/**
* The latitude field name. If not specified, the API will look for following field names in the CSV source: "lat", "latitude", "y", "ycenter", "latitude83", "latdecdeg", "POINT-Y".
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#latitudeField)
*/
latitudeField?: string;
/**
* Indicates whether the layer will be included in the legend.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#legendEnabled)
- *
+ *
* @default true
*/
legendEnabled?: boolean;
/**
* The longitude field name. If not specified, the API will look for following field names in the CSV source: "lon", "lng", "long", "longitude", "x", "xcenter", "longitude83", "longdecdeg", "POINT-X".
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#longitudeField)
*/
longitudeField?: string;
/**
* The maximum scale (most zoomed in) at which the layer is visible in the view. If the map is zoomed in beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a maximum scale. The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale) value, and greater than or equal to the service specification.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale)
- *
+ *
* @default 0
*/
maxScale?: number;
/**
* The minimum scale (most zoomed out) at which the layer is visible in the view. If the map is zoomed out beyond this scale, the layer will not be visible. A value of `0` means the layer does not have a minimum scale. The minScale value should always be larger than the [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#maxScale) value, and lesser than or equal to the service specification.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#minScale)
- *
+ *
* @default 0
*/
minScale?: number;
/**
* An array of field names to include in the CSVLayer. If not specified, the layer will include all fields.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#outFields)
*/
outFields?: string[];
/**
* Indicates whether to display popups when features in the layer are clicked.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupEnabled)
- *
+ *
* @default true
*/
popupEnabled?: boolean;
/**
* The popup template for the layer. When set on the layer, the `popupTemplate` allows users to access attributes and display their values in the [view's popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#popup) when a feature is selected using text and/or charts. See the [PopupTemplate sample](https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html) for an example of how [PopupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html) interacts with a [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html).
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#popupTemplate)
*/
popupTemplate?: PopupTemplateProperties;
/**
* The renderer assigned to the layer. The renderer defines how to visualize each feature in the layer. Depending on the renderer type, features may be visualized with the same symbol, or with varying symbols based on the values of provided attribute fields or functions.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#renderer)
*/
renderer?: RendererProperties;
/**
- * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true`  `layer.screenSizePerspectiveEnabled = false` 
+ * Apply perspective scaling to screen-size point symbols in a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). When `true`, screen sized objects such as [icons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html), [labels](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-LabelSymbol3D.html) or [callouts](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-callouts-Callout3D.html) integrate better in the 3D scene by applying a certain perspective projection to the sizing of features. This only applies when using a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). `layer.screenSizePerspectiveEnabled = true`  `layer.screenSizePerspectiveEnabled = false` 
* > **Known Limitations** Screen size perspective is currently not optimized for situations where the camera is very near the ground, or for scenes with point features located far from the ground surface. In these cases it may be better to turn off screen size perspective. As screen size perspective changes the size based on distance to the camera, it should be set to false when using {@link module:esri/renderers/Renderer#SizeVisualVariable size visual variables}.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#screenSizePerspectiveEnabled)
- *
+ *
* @default true
*/
screenSizePerspectiveEnabled?: boolean;
/**
- * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data.
+ * The spatial reference of the layer. The default value is WGS84. This property can be set explicitly to project the longitude and latitude coordinates when the layer parses the CSV file. While not required, explicitly setting the spatial reference of the layer will improve the performance when projecting to a spatial reference other than the one used by the coordinates in the raw data.
* > **Known Limitations** The browser must support [WebAssembly](https://caniuse.com/#feat=wasm) if a spatial reference other than WGS84 or Web Mercator is specified.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#spatialReference)
- *
+ *
* @default SpatialReference.WGS84
*/
spatialReference?: SpatialReferenceProperties;
/**
* The URL of the CSV file.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#url)
*/
url?: string;
}
-
export interface CSVLayerElevationInfo extends Object {
/**
- * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values.
- *
+ * Defines how the graphic is placed with respect to the terrain surface. See the table below for a list of possible values.
+ *
* Mode | Description
* ------|------------
* on-the-ground | Graphics are draped on the terrain surface. This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [ObjectSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html).
* relative-to-ground | Graphics are placed at an elevation relative to the terrain surface. The graphic's elevation is determined by summing up the terrain elevation and the result of `featureExpressionInfo` (if defined). This is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html).
- * absolute-height | Graphics are placed at an absolute height above sea level. This height is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account.
+ * absolute-height | Graphics are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the result of `featureExpressionInfo` (if defined). This mode doesn't take the elevation of the terrain into account.
* relative-to-scene | Graphics are aligned to buildings and other objects part of 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [IntegratedMeshLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html), depending on which has higher elevation. If the graphic is not directly above a building or any other feature, it is aligned to the terrain surface elevation. If defined, the result of `featureExpressionInfo` is added to the 3D Object/terrain surface elevation.
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo)
*/
mode: string;
/**
* An elevation offset, which is added to the vertical position of the graphic. If `unit` is not defined, the offset is in `meters`. When `mode = "on-the-ground"`, this property has no effect.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo)
*/
offset?: number;
/**
- * This object contains information about setting a custom height on the graphic. If this property is set, then z values are not considered for calculating graphic height.
- *
+ * This object contains information about setting a custom z-value on the feature.
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo)
*/
featureExpressionInfo?: CSVLayerElevationInfoFeatureExpressionInfo;
/**
* The unit for `featureExpressionInfo` and `offset` values. **Possible Values:** feet | meters | kilometers | miles | us-feet | yards
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo)
*/
unit?: string;
}
-
export interface CSVLayerElevationInfoFeatureExpressionInfo extends Object {
/**
- * An [Arcade expression](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) evaluating to a number that determines the height of the graphic. When `mode = "on-the-ground"`, this property has no effect. For line and polygon geometries the result of the expression is the same for all vertices of a feature.
- *
+ * An [Arcade expression](https://developers.arcgis.com/javascript/latest/guide/arcade/index.html) evaluating to a number that determines the z-value of the feature. When `mode = "on-the-ground"`, this property has no effect. For line and polygon geometries the result of the expression is the same for all vertices of a feature.
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#elevationInfo)
*/
expression?: string;
}
-
export interface CSVLayerFeatureReduction extends Object {
/**
* Type of the decluttering method. The only supported type at the moment is `selection`. In this method, some of the overlapping features are hidden such that none of the remaining features intersect on screen. Label deconfliction also respects this option and hides labels that would overlap with the features of this layer.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html#featureReduction)
*/
type: string;
}
export interface CSVLayerLayerviewCreateEvent {
-
layerView: LayerView;
view: View;
}
export interface CSVLayerLayerviewDestroyEvent {
-
layerView: LayerView;
view: View;
@@ -7384,51 +7745,59 @@ declare namespace __esri {
interface DynamicLayer {
/**
* The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#portalItem)
*/
portalItem: PortalItem;
/**
* The URL to the REST endpoint of the map service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#url)
*/
url: string;
/**
* This method fetches the image for the specified extent and size.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage)
- *
+ *
* @param extent The extent of the view.
* @param width The width of the view in pixels.
* @param height The height of the view in pixels.
* @param options The parameter options is an object with the following properties.
* @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3.
* @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at.
- *
+ *
*/
- fetchImage(extent: Extent, width: number, height: number, options?: DynamicLayerFetchImageOptions): IPromise;
+ fetchImage(
+ extent: Extent,
+ width: number,
+ height: number,
+ options?: DynamicLayerFetchImageOptions
+ ): IPromise;
/**
* This method returns a URL to an image for a given extent, width and height.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl)
- *
+ *
* @param extent The extent of the exported image.
* @param width The width of the view in pixels.
* @param height The height of the view in pixels.
* @param options The parameter options is an object with the following properties.
* @param options.pixelRatio The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at.
* @param options.rotation The rotation in degrees of the exported image. Available since ArcGIS Server 10.3.
- *
+ *
*/
- getImageUrl(extent: Extent, width: number, height: number, options?: DynamicLayerGetImageUrlOptions): IPromise | string;
+ getImageUrl(
+ extent: Extent,
+ width: number,
+ height: number,
+ options?: DynamicLayerGetImageUrlOptions
+ ): IPromise | string;
}
interface DynamicLayerConstructor {
-
-
- new(): DynamicLayer;
+ new (): DynamicLayer;
}
export const DynamicLayer: DynamicLayerConstructor;
@@ -7436,45 +7805,43 @@ declare namespace __esri {
interface DynamicLayerProperties {
/**
* The portal item from which the layer is loaded. This will load the layer along with any overridden properties (e.g. renderers, definition expressions, etc.) saved to the portal item, not the map service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#portalItem)
*/
portalItem?: PortalItemProperties;
/**
* The URL to the REST endpoint of the map service.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#url)
*/
url?: string;
}
-
export interface DynamicLayerFetchImageOptions extends Object {
/**
* The rotation in degrees of the exported image. Available since ArcGIS Server 10.3.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage)
*/
rotation?: number;
/**
* The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#fetchImage)
*/
pixelRatio?: number;
}
-
export interface DynamicLayerGetImageUrlOptions extends Object {
/**
* The ratio of the resolution in physical pixels of the image to the resolution it will be displayed at.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl)
*/
pixelRatio?: number;
/**
* The rotation in degrees of the exported image. Available since ArcGIS Server 10.3.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-DynamicLayer.html#getImageUrl)
*/
rotation?: number;
@@ -7483,64 +7850,67 @@ declare namespace __esri {
interface ElevationLayer extends Layer, ArcGISCachedService, PortalLayer {
/**
* URL pointing to the Elevation layer resource on an ArcGIS Image Server.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#url)
*/
url: string;
/**
* Creates an elevation sampler for the given [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) by querying the service layer for elevation data and caching it so values may be sampled quickly afterwards. The resolution of the cached data can be set using the `demResolution` option. In many cases, `auto` demResolution can be used to get high quality elevation samples without the need to know exactly where the data in the service is located. This is particularly useful for services which combine elevation data from many sources (such as the world elevation service). If more control, or higher quality samples are required, use either `finest-contiguous` or a fixed `{number}` resolution.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler)
- *
+ *
* @param extent The extent for which to create the sampler.
* @param options Additional query options. See the table below.
* @param options.demResolution Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See [ElevationLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation) for more details.
* @param options.noDataValue The value to use when there is no data available.
- *
+ *
*/
- createElevationSampler(extent: Extent, options?: ElevationLayerCreateElevationSamplerOptions): IPromise;
+ createElevationSampler(
+ extent: Extent,
+ options?: ElevationLayerCreateElevationSamplerOptions
+ ): IPromise;
/**
- * Requests a tile from the service and decodes the data into a linear array of elevation values. The returned promise resolves with a plain object describing the obtained elevation data for the tile. The object has the following properties:
- *
+ * Requests a tile from the service and decodes the data into a linear array of elevation values. The returned promise resolves with a plain object describing the obtained elevation data for the tile. The object has the following properties:
+ *
* Property | Type | Description
* ----------|--------------|------------
* values | Float32Array | The elevation values contained in the tile.
* width | number | The number of elevation values in one row of the tile.
* height | number | The number of elevation values in one column of the tile.
* maxZError | number | The upper bound for the compression error on the elevation values.
- *
- *
+ *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#fetchTile)
- *
+ *
* @param level the tile level.
* @param row the tile row.
* @param column the tile column.
* @param noDataValue the value to use when a tile is partially missing data.
- *
+ *
*/
fetchTile(level: number, row: number, column: number, noDataValue?: number): IPromise;
/**
* This method returns a URL to a tile for a given level, row and column.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#getTileUrl)
- *
+ *
* @param level The requested tile's level.
* @param row The requested tile's row.
* @param col The requested tile's column.
- *
+ *
*/
getTileUrl(level: number, row: number, col: number): string;
/**
* Queries the service layer for elevation values for the given geometry. The returned result contains a copy of the geometry with z-values sampled from elevation data from the service. The resolution from which the elevation is queried can be set using the `demResolution` option. In many cases, `auto` demResolution can be used to get high quality elevation samples without the need to know exactly where the data in the service is located. This is particularly useful for services which combine elevation data from many sources (such as the world elevation service). If more control, or higher quality samples are required, use either `finest-contiguous` or a fixed `{number}` resolution.
- *
+ *
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation)
- *
+ *
* @param geometry The geometry to use for sampling elevation data.
* @param options Additional query options. See the table below.
- * @param options.demResolution
- * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See the table below for more details on the different settings.
- *
+ * @param options.demResolution
+ * Controls the horizontal resolution (cell size) in meters from which elevation data is sampled (defaults to `auto`). See the table below for more details on the different settings.
+ *
* demResolution | Description
* -----------------------|-------------
* `auto` | Automatically chooses an appropriate resolution for each coordinate of the input geometry. The current implementation will try to use the finest available resolution given that the total required number of tile requests does not exceed a certain maximum amount (currently 20). Note that this may result in values being sampled from different resolutions.
@@ -7548,10 +7918,12 @@ declare namespace __esri {
* `{number}` | Sample elevation from the resolution closest to the specified resolution (in meters).
* @param options.returnSampleInfo Indicates whether to return additional sample information for each coordinate.
* @param options.noDataValue The value to use when there is no data available.
- *
+ *
*/
- queryElevation(geometry: Point | Multipoint | Polyline, options?: ElevationLayerQueryElevationOptions): IPromise