jmapcloud-ng-core-types 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +10 -0
- package/.vscode/settings.json +24 -0
- package/README.md +12 -0
- package/_config.yml +1 -0
- package/all-enums.ts +286 -0
- package/index.ts +1003 -0
- package/package.json +42 -0
- package/public/core.d.ts +12255 -0
- package/public/jmap/ajax.d.ts +31 -0
- package/public/jmap/date.d.ts +17 -0
- package/public/jmap/extension.d.ts +216 -0
- package/public/jmap/features.d.ts +32 -0
- package/public/jmap/form.d.ts +590 -0
- package/public/jmap/geocoding.d.ts +33 -0
- package/public/jmap/geometry.d.ts +44 -0
- package/public/jmap/language.d.ts +38 -0
- package/public/jmap/layer.d.ts +591 -0
- package/public/jmap/main.d.ts +30 -0
- package/public/jmap/map-context.d.ts +197 -0
- package/public/jmap/map.d.ts +622 -0
- package/public/jmap/mouseover.d.ts +62 -0
- package/public/jmap/photos.d.ts +43 -0
- package/public/jmap/project.d.ts +45 -0
- package/public/jmap/query.d.ts +41 -0
- package/public/jmap/selection.d.ts +25 -0
- package/public/jmap/server.d.ts +79 -0
- package/public/jmap/startup-options.d.ts +500 -0
- package/public/jmap/ui.d.ts +13 -0
- package/public/jmap/user.d.ts +96 -0
- package/tsconfig.json +25 -0
- package/tslint.json +86 -0
package/index.ts
ADDED
|
@@ -0,0 +1,1003 @@
|
|
|
1
|
+
import { Feature, FeatureCollection, LineString, MultiLineString, Point, Polygon } from "geojson"
|
|
2
|
+
import { Map } from "mapbox-gl"
|
|
3
|
+
import { Store } from "redux"
|
|
4
|
+
|
|
5
|
+
export interface JCoreService extends JCoreMainService {
|
|
6
|
+
Project: JProjectService
|
|
7
|
+
Layer: JLayerService
|
|
8
|
+
User: JUserService
|
|
9
|
+
Language: JLanguageService
|
|
10
|
+
Feature: JFeatureService
|
|
11
|
+
Map: JMapService
|
|
12
|
+
Geocoding: JGeocodingService
|
|
13
|
+
Geolocation: JGeolocationService
|
|
14
|
+
Geometry: JGeometryService
|
|
15
|
+
MouseOver: JMouseOverService
|
|
16
|
+
Form: JFormService
|
|
17
|
+
Query: JQueryService
|
|
18
|
+
Event: JEventService
|
|
19
|
+
History: JHistoryService
|
|
20
|
+
Extension: JExtensionService
|
|
21
|
+
Server: JServerService
|
|
22
|
+
Photo: JPhotoService
|
|
23
|
+
Util: JUtilService
|
|
24
|
+
Library: JLibraryService
|
|
25
|
+
Projection: JProjectionService
|
|
26
|
+
MapContext: JMapContextService
|
|
27
|
+
UI: JUIService
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface JUIService {
|
|
31
|
+
setMainLayoutVisibility(isVisible: boolean): void
|
|
32
|
+
openIFramePopup(params: JIFramePopupParams): void
|
|
33
|
+
closeIFramePopup(): void
|
|
34
|
+
getContainerWidth(): number
|
|
35
|
+
getContainerHeight(): number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface JLibraryService {
|
|
39
|
+
mapboxgl(): any
|
|
40
|
+
html2canvas(): any
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface JMapContextService {
|
|
44
|
+
isActive(): boolean
|
|
45
|
+
setActive(isActive: boolean): Promise<JMapContextSetActiveResult>
|
|
46
|
+
startCreation(): void
|
|
47
|
+
cancelCreation(): void
|
|
48
|
+
getAll(): JMapContext[]
|
|
49
|
+
getById(contextId: JId): JMapContext
|
|
50
|
+
existsById(contextId: JId): boolean
|
|
51
|
+
getUrlByUUID(contextUUID: string): string
|
|
52
|
+
applyContextById(contextId: JId): Promise<void>
|
|
53
|
+
deleteContextById(contextId: JId | JId[]): Promise<void>
|
|
54
|
+
create(params?: JMapContextMetaData): Promise<JMapContext>
|
|
55
|
+
update(contextId: JId, params?: JMapContextMetaData): Promise<JMapContext>
|
|
56
|
+
updateMetaData(contextId: JId, params: JMapContextMetaData): Promise<void>
|
|
57
|
+
setCreateTitle(newTitle: string): void
|
|
58
|
+
setCreateDescription(newDescription: string): void
|
|
59
|
+
setCreateTitleError(hasError: boolean): void
|
|
60
|
+
getContextTitle(contextId: JId): string
|
|
61
|
+
setContextTitle(contextId: JId, title: string): Promise<void>
|
|
62
|
+
getContextDescription(contextId: JId): string
|
|
63
|
+
setContextDescription(contextId: JId, description: string): Promise<void>
|
|
64
|
+
isLinkShared(contextId: JId): boolean
|
|
65
|
+
setLinkShare(contextId: JId, isShared: boolean): Promise<void>
|
|
66
|
+
getDefaultContext(): JMapContext | undefined
|
|
67
|
+
isDefaultContext(contextId: JId): boolean
|
|
68
|
+
setDefaultContext(contextId?: JId): Promise<void>
|
|
69
|
+
sortListBy(sortBy: JMAP_CONTEXT_SORT_BY_OPTIONS): void
|
|
70
|
+
getListSortBy(): JMAP_CONTEXT_SORT_BY_OPTIONS
|
|
71
|
+
getAllListSortBy(): JMAP_CONTEXT_SORT_BY_OPTIONS[]
|
|
72
|
+
setListSortDirection(sortByDirection: JMAP_CONTEXT_SORT_BY_DIRECTIONS): void
|
|
73
|
+
getListSortDirection(): JMAP_CONTEXT_SORT_BY_DIRECTIONS
|
|
74
|
+
getAllListSortDirection(): JMAP_CONTEXT_SORT_BY_DIRECTIONS[]
|
|
75
|
+
filterList(filter: string): void
|
|
76
|
+
getListFilter(): string
|
|
77
|
+
clearListFilter(): void
|
|
78
|
+
setPreviewImageSize(size: JSize): void
|
|
79
|
+
getPreviewImageSize(): JSize
|
|
80
|
+
addCssClassesToIgnoreForPreviewImage(classes: string[]): void
|
|
81
|
+
getIgnoredCssClassesForPreviewImage(): string[]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface JMapAttributionService {
|
|
85
|
+
getAll(): JMapAttribution[]
|
|
86
|
+
addSingle(attribution: JMapAttribution): void
|
|
87
|
+
addMultiple(attributions: JMapAttribution[]): void
|
|
88
|
+
removeByIds(attributionsIds: string[]): void
|
|
89
|
+
getById(attributionId: string): JMapAttribution
|
|
90
|
+
isDefaultAttributionId(attributionId: string): boolean
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface JDateService {
|
|
94
|
+
getDate(date: JDateLike): Date
|
|
95
|
+
getDateFnsLocale(displayTime?: boolean): any
|
|
96
|
+
is12HoursTimeFormat(): boolean
|
|
97
|
+
getDateFromISOString(isoDate: string): Date
|
|
98
|
+
add(date: JDateLike, amount: number, timeUnit: JTIME_UNITS): Date
|
|
99
|
+
substract(date: JDateLike, amount: number, timeUnit: JTIME_UNITS): Date
|
|
100
|
+
format(date: JDateLike, params?: JDateFormatParams): string
|
|
101
|
+
formatDistanceToNow(date: JDateLike, params?: JDateFormatParams): string
|
|
102
|
+
isBefore(date1: JDateLike, date2: JDateLike, checkTime?: boolean): boolean
|
|
103
|
+
isAfter(date1: JDateLike, date2: JDateLike, checkTime?: boolean): boolean
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface JUtilService {
|
|
107
|
+
Date: JDateService
|
|
108
|
+
LocalStorage: JLocalStorageService
|
|
109
|
+
Array: JArrayService
|
|
110
|
+
Ajax: JAjaxService
|
|
111
|
+
loadJSFile(fileUrl: string): Promise<void>
|
|
112
|
+
isJMapId(id: any, allowStringNumber?: boolean): boolean
|
|
113
|
+
checkJmapId(id: any, message?: string): void
|
|
114
|
+
getJmapIdAsIntegerIfPossible(id: any): JId
|
|
115
|
+
asyncProcess(callback: () => any, timeoutsInMilliseconds: number[]): () => void
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface JArrayService {
|
|
119
|
+
clear<T>(array: T[]): T[]
|
|
120
|
+
remove<T>(array: T[], element: T): T[]
|
|
121
|
+
findByProperty<T extends object>(array: T[], propertyName: string, value: any): T | undefined
|
|
122
|
+
findIndexByProperty<T extends object>(array: T[], propertyName: string, value: any, nonStrict?: boolean): number
|
|
123
|
+
removeByProperty<T extends object>(array: T[], propertyName: string, value: any, nonStrict?: boolean): T[]
|
|
124
|
+
getCopyWithoutDuplicate(array: Array<string | number>): Array<string | number>
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface JLocalStorageService {
|
|
128
|
+
isAvailable(): boolean
|
|
129
|
+
get(key: string): string | null
|
|
130
|
+
set(key: string, value: string): void
|
|
131
|
+
remove(key: string): void
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface JPhotoService {
|
|
135
|
+
displayFeaturePhotosPopup(layerId: JId, featureId: JId): Promise<void>
|
|
136
|
+
displayPhotosPopup(photos: JPhoto[], params?: JPhotoOpenPopupParams): void
|
|
137
|
+
downloadById(photoId: JId): Promise<void>
|
|
138
|
+
closePhotoPopup(): void
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface JFeatureService {
|
|
142
|
+
getById(layerId: JId, featureId: JId): Promise<GeoJSON.Feature>
|
|
143
|
+
getByIds(layerId: JId, featureIds: JId[]): Promise<GeoJSON.Feature[]>
|
|
144
|
+
geometryUpdateById(params: JFeatureGeometryUpdateParams): Promise<GeoJSON.Feature>
|
|
145
|
+
deleteById(layerId: JId, featureId: JId): Promise<GeoJSON.Feature>
|
|
146
|
+
deleteByIds(layerId: JId, featureIds: JId[]): Promise<JFeatureDeleteByIdsResult>
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface JCoreMainService {
|
|
150
|
+
getVersion(): string
|
|
151
|
+
getApiVersion(): string
|
|
152
|
+
getDataStore(): Store<JCoreState> | undefined
|
|
153
|
+
getRestUrl(): string
|
|
154
|
+
openDocumentation(): void
|
|
155
|
+
getOS(): JOPERATING_SYSTEMS
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface JGeocodingService {
|
|
159
|
+
isAvailable(): boolean
|
|
160
|
+
getMinimumSearchStringLength(): number
|
|
161
|
+
getInvalidSearchStringCharacters(): string
|
|
162
|
+
forwardSearch(searchText: string, options?: JGeocodingOptions): void
|
|
163
|
+
displayForwardSearchResult(forwardSearchResult: JGeocodingResult): void
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface JGeolocationService {
|
|
167
|
+
isSupportedByBrowser(): boolean
|
|
168
|
+
isEnabled(): boolean
|
|
169
|
+
getMyLocation(): Promise<JLocation>
|
|
170
|
+
goToMyLocation(options?: JPanAndZoomOptions): Promise<JLocation>
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface JQueryService {
|
|
174
|
+
initializeQueryFormById(layerId: JId, queryId: string): Promise<JQuery>
|
|
175
|
+
getAllGroups(): JQueryGroup[]
|
|
176
|
+
groupExist(groupId: JId): boolean
|
|
177
|
+
getQueriesByLayerId(layerId: JId): JQuery[]
|
|
178
|
+
getQueryByLayerId(layerId: JId, queryId: string): JQuery
|
|
179
|
+
getQueriesByGroupId(groupId: JId): JQuery[]
|
|
180
|
+
getQueryByGroupId(groupId: JId, queryId: string): JQuery
|
|
181
|
+
queryExist(groupId: JId, queryId: string): boolean
|
|
182
|
+
fetchFeatures(layerId: JId, queryId: string, data: any): Promise<Feature[]>
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface JAjaxService {
|
|
186
|
+
get(config: JRequestConfig): Promise<any>
|
|
187
|
+
post(config: JRequestConfig): Promise<any>
|
|
188
|
+
put(config: JRequestConfig): Promise<any>
|
|
189
|
+
del(config: JRequestConfig): Promise<any>
|
|
190
|
+
patch(config: JRequestConfig): Promise<any>
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface JEventService {
|
|
194
|
+
Main: JCoreEventModule
|
|
195
|
+
Layer: JLayerEventModule
|
|
196
|
+
Language: JLanguageEventModule
|
|
197
|
+
Map: JMapEventModule
|
|
198
|
+
Geocoding: JGeocodingEventModule
|
|
199
|
+
Photo: JPhotoEventModule
|
|
200
|
+
Project: JProjectEventModule
|
|
201
|
+
User: JUserEventModule
|
|
202
|
+
Feature: JFeatureEventModule
|
|
203
|
+
Form: JFormEventModule
|
|
204
|
+
Extension: JExtensionEventModule
|
|
205
|
+
MouseOver: JMouseOverEventModule
|
|
206
|
+
MapContext: JMapContextEventModule
|
|
207
|
+
Server: JServerEventModule
|
|
208
|
+
Query: JQueryEventModule
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export type JEventFunction = (params?: any) => void | Promise<any>
|
|
212
|
+
|
|
213
|
+
export interface JEventListener {
|
|
214
|
+
id: string
|
|
215
|
+
fn: JEventFunction
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type JEventSimpleListenerFunction = (listenerId: string, fn: JEventFunction) => void
|
|
219
|
+
|
|
220
|
+
export type JEventResourceListenerFunction = (listenerId: string, resourceId: JId, fn: JEventFunction) => void
|
|
221
|
+
|
|
222
|
+
export type JEventListenerFunction = JEventSimpleListenerFunction | JEventResourceListenerFunction
|
|
223
|
+
|
|
224
|
+
export interface JEventModule {
|
|
225
|
+
on: {
|
|
226
|
+
[method: string]: JEventListenerFunction
|
|
227
|
+
}
|
|
228
|
+
existById(listenerId: string): boolean
|
|
229
|
+
activate(listenerId: string): void
|
|
230
|
+
deactivate(listenerId: string): void
|
|
231
|
+
remove(listenerId: string): void
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface JQueryEventModule extends JEventModule {
|
|
235
|
+
on: {
|
|
236
|
+
queryFormLoad(listenerId: string, fn: (params: JQueryQueryFormHasLoadedEventParams) => void): void
|
|
237
|
+
beforeSubmit(listenerId: string, fn: (params: JQueryBeforeEventParams) => void): void
|
|
238
|
+
success(listenerId: string, fn: (params: JQuerySuccessEventParams) => void): void
|
|
239
|
+
error(listenerId: string, fn: (params: JQueryErrorEventParams) => void): void
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface JServerEventModule extends JEventModule {
|
|
244
|
+
on: {
|
|
245
|
+
infoReady(listenerId: string, fn: (params: JServerInfoReadyEventParams) => void): void
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface JFormEventModule extends JEventModule {
|
|
250
|
+
on: {
|
|
251
|
+
layerDialogOpened(listenerId: string, fn: (params: JFormLayerDialogOpenEventParams) => void): void
|
|
252
|
+
layerDialogClosed(listenerId: string, fn: (params: JFormLayerDialogCloseEventParams) => void): void
|
|
253
|
+
subFormDialogOpened(listenerId: string, fn: (params: JFormSubFormDialogOpenEventParams) => void): void
|
|
254
|
+
subFormDialogClosed(listenerId: string, fn: (params: JFormSubFormDialogCloseEventParams) => void): void
|
|
255
|
+
beforeSubmit(listenerId: string, fn: (params: JFormBeforeSubmitEventParams) => void | Promise<any>): void
|
|
256
|
+
submit(listenerId: string, fn: (params: JFormSubmitEventParams) => void): void
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface JMouseOverEventModule extends JEventModule {
|
|
261
|
+
on: {
|
|
262
|
+
beforeContentProcessed(listenerId: string, fn: (params: JMouseOverBeforeEventParams) => void): void
|
|
263
|
+
afterContentProcessed(listenerId: string, fn: (params: JMouseOverAfterEventParams) => void): void
|
|
264
|
+
popupOpened(listenerId: string, fn: (params: JMouseOverEventParams) => void): void
|
|
265
|
+
popupClosed(listenerId: string, fn: () => void): void
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface JExtensionEventModule extends JEventModule {
|
|
270
|
+
on: {
|
|
271
|
+
registration(listenerId: string, fn: (params: JExtensionEventParams) => void): void
|
|
272
|
+
beforeUnregistration(listenerId: string, fn: (params: JExtensionEventParams) => void): void
|
|
273
|
+
unregistration(listenerId: string, fn: (params: JExtensionEventParams) => void): void
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export interface JProjectEventModule extends JEventModule {
|
|
278
|
+
on: {
|
|
279
|
+
projectChange(listenerId: string, fn: (params: JProjectEventParams) => void): void
|
|
280
|
+
projectsChange(listenerId: string, fn: (params: JProjectAllEventParams) => void): void
|
|
281
|
+
preDeactivation(listenerId: string, fn: (params: JProjectEventParams) => void): void
|
|
282
|
+
postDeactivation(listenerId: string, fn: (params: JProjectEventParams) => void): void
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface JLanguageEventModule extends JEventModule {
|
|
287
|
+
on: {
|
|
288
|
+
localeChange(listenerId: string, fn: (params: JLanguageEventLocaleChangeParams) => void): void
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface JGeocodingEventModule extends JEventModule {
|
|
293
|
+
on: {
|
|
294
|
+
success(listenerId: string, fn: (params: JGeocodingSuccessEventParams) => void): void
|
|
295
|
+
error(listenerId: string, fn: (params: JGeocodingErrorEventParams) => void): void
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface JLayerEventModule extends JEventModule {
|
|
300
|
+
on: {
|
|
301
|
+
layersChange(listenerId: string, fn: (params: JLayerEventChangeParams) => void): void
|
|
302
|
+
thematicVisibilityChange(listenerId: string, fn: (params: JLayerEventThematicVisibilityParams) => void): void
|
|
303
|
+
thematicCategoriesVisibilityChange(
|
|
304
|
+
listenerId: string,
|
|
305
|
+
fn: (params: JLayerEventThematicCategoryVisibilityParams) => void
|
|
306
|
+
): void
|
|
307
|
+
thematicConditionsVisibilityChange(
|
|
308
|
+
listenerId: string,
|
|
309
|
+
fn: (params: JLayerEventThematicConditionVisibilityParams) => void
|
|
310
|
+
): void
|
|
311
|
+
visibilityChange(listenerId: string, fn: (params: JLayerEventVisibilityParams) => void): void
|
|
312
|
+
sourceChange(listenerId: string, fn: (params: JLayerEventParams) => void): void
|
|
313
|
+
selectabilityWillChange(listenerId: string, fn: (params: JLayerEventSelectabilityParams) => void): void
|
|
314
|
+
layerDeletion(listenerId: string, fn: (params: JLayerEventParams) => void): void
|
|
315
|
+
initialSearchApplied(listenerId: string, fn: (params: JLayerInitialSearchEventParams) => void): void
|
|
316
|
+
dynamicFilterSet(listenerId: string, fn: (params: JLayerDynamicFilterSetParams) => void): void
|
|
317
|
+
dynamicFilterActivationChange(listenerId: string, fn: (params: JLayerDynamicFilterActivationParams) => void): void
|
|
318
|
+
dynamicFilterConditionCreated(listenerId: string, fn: (params: JLayerDynamicFilterConditionCreated) => void): void
|
|
319
|
+
dynamicFilterConditionUpdated(listenerId: string, fn: (params: JLayerDynamicFilterConditionUpdated) => void): void
|
|
320
|
+
dynamicFilterConditionsRemoved(listenerId: string, fn: (params: JLayerDynamicFilterConditionsRemoved) => void): void
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export interface JMapEventModule extends JEventModule {
|
|
325
|
+
on: {
|
|
326
|
+
mapLoad(listenerId: string, fn: (params: JMapEventLoadedParams) => void): void
|
|
327
|
+
mapDestroy(listenerId: string, fn: () => void): void
|
|
328
|
+
moveStart(listenerId: string, fn: (params: JMapEventParams) => void): void
|
|
329
|
+
move(listenerId: string, fn: (params: JMapEventParams) => void): void
|
|
330
|
+
moveEnd(listenerId: string, fn: (params: JMapEventParams) => void): void
|
|
331
|
+
mouseMove(listenerId: string, fn: (params: JMapEventLayerParams) => void): void
|
|
332
|
+
mouseMoveOnLayer(listenerId: string, layerId: JId, fn: (params: JMapEventFeaturesParams) => void): void
|
|
333
|
+
mouseEnterOnLayer(listenerId: string, layerId: JId, fn: (params: JMapEventFeaturesParams) => void): void
|
|
334
|
+
mouseLeaveOnLayer(listenerId: string, layerId: JId, fn: (params: JMapEventLayerParams) => void): void
|
|
335
|
+
click(listenerId: string, fn: (params: JMapEventLocationParams) => void): void
|
|
336
|
+
zoomStart(listenerId: string, fn: (params: JMapEventZoomParams) => void): void
|
|
337
|
+
zoom(listenerId: string, fn: (params: JMapEventZoomParams) => void): void
|
|
338
|
+
zoomEnd(listenerId: string, fn: (params: JMapEventZoomParams) => void): void
|
|
339
|
+
rotateStart(listenerId: string, fn: (params: JMapEventRotateParams) => void): void
|
|
340
|
+
rotate(listenerId: string, fn: (params: JMapEventRotateParams) => void): void
|
|
341
|
+
rotateEnd(listenerId: string, fn: (params: JMapEventRotateParams) => void): void
|
|
342
|
+
pitchStart(listenerId: string, fn: (params: JMapEventPitchParams) => void): void
|
|
343
|
+
pitch(listenerId: string, fn: (params: JMapEventPitchParams) => void): void
|
|
344
|
+
pitchEnd(listenerId: string, fn: (params: JMapEventPitchParams) => void): void
|
|
345
|
+
containerReady(listenerId: string, fn: (params: JMapEventContainerReadyParams) => void): void
|
|
346
|
+
containerResized(listenerId: string, fn: (params: JMapEventContainerResizedParams) => void): void
|
|
347
|
+
selectionChanged(listenerId: string, fn: (params: JMapEventSelectionChangedParams) => void): void
|
|
348
|
+
basemapChanged(listenerId: string, fn: (params: JMapEventBasemapChangedParams) => void): void
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface JPhotoEventModule extends JEventModule {
|
|
353
|
+
on: {
|
|
354
|
+
containerCreated(listenerId: string, fn: (params: JPhotoEventContainerCreatedParams) => void): void
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface JFeatureEventModule extends JEventModule {
|
|
359
|
+
on: {
|
|
360
|
+
deletion(listenerId: string, fn: (params: JFeatureEventDeleteParams) => void): void
|
|
361
|
+
geometryChanged(listenerId: string, fn: (params: JFeatureEventGeometryUpdateParams) => void): void
|
|
362
|
+
creation(listenerId: string, fn: (params: JFeatureEventCreateParams) => void): void
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface JUserEventModule extends JEventModule {
|
|
367
|
+
on: {
|
|
368
|
+
sessionChanged(listenerId: string, fn: (params: JUserEventSessionChangedParams) => void): void
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface JCoreEventModule extends JEventModule {
|
|
373
|
+
on: {
|
|
374
|
+
coreReady(listenerId: string, fn: () => void): void
|
|
375
|
+
fatalError(listenerId: string, fn: (params: JMainFatalErrorEventParams) => void): void
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export interface JMapContextEventModule extends JEventModule {
|
|
380
|
+
on: {
|
|
381
|
+
beforeMapDataChange(listenerId: string, fn: (params: JMapContextBeforeMapDataChangeEventParams) => void): void
|
|
382
|
+
afterMapDataChange(listenerId: string, fn: (params: JMapContextAfterMapDataChangeEventParams) => void): void
|
|
383
|
+
beforeApply(listenerId: string, fn: (params: JMapContextBeforeApplyEventParams) => void): void
|
|
384
|
+
afterApply(listenerId: string, fn: (params: JMapContextAfterApplyEventParams) => void): void
|
|
385
|
+
applyError(listenerId: string, fn: (params: JMapContextEventParams) => void): void
|
|
386
|
+
initialized(listenerId: string, fn: (params: JMapContextSetActiveResult) => void): void
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface JCoreState {
|
|
391
|
+
map: JMapState
|
|
392
|
+
project: JProjectState
|
|
393
|
+
layer: JLayerState
|
|
394
|
+
user: JUserState
|
|
395
|
+
language: JLanguageState
|
|
396
|
+
photo: JPhotoState
|
|
397
|
+
query: JQueryState
|
|
398
|
+
geocoding: JGeocodingState
|
|
399
|
+
geolocation: JGeolocationState
|
|
400
|
+
form: JFormState
|
|
401
|
+
server: JServerState
|
|
402
|
+
mapContext: JMapContextState
|
|
403
|
+
ui: JUIState
|
|
404
|
+
external?: any
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export interface JUIState {
|
|
408
|
+
isMainLayoutVisible: boolean
|
|
409
|
+
iframePopup: JIFramePopup
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface JMapContextState {
|
|
413
|
+
isInitialized: boolean
|
|
414
|
+
isActive: boolean
|
|
415
|
+
isLoading: boolean
|
|
416
|
+
hasLoadingError: boolean
|
|
417
|
+
isApplying: boolean
|
|
418
|
+
activeTab: JMAP_CONTEXT_TABS
|
|
419
|
+
contexts: JMapContext[]
|
|
420
|
+
defaultContextId: JId | undefined
|
|
421
|
+
filter: string
|
|
422
|
+
sortBy: JMAP_CONTEXT_SORT_BY_OPTIONS
|
|
423
|
+
sortByDirection: JMAP_CONTEXT_SORT_BY_DIRECTIONS
|
|
424
|
+
createTitle: string
|
|
425
|
+
createDescription: string
|
|
426
|
+
createTitleError: boolean
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export interface JFormState {
|
|
430
|
+
layerId: JId // set as "" when no layer is set
|
|
431
|
+
formMetaDataById: JFormMetaDataById
|
|
432
|
+
isLoadingLayer: boolean
|
|
433
|
+
hasLoadingLayerError: boolean
|
|
434
|
+
isSubmitting: boolean
|
|
435
|
+
submitErrors: string[]
|
|
436
|
+
activeTabIndex: number
|
|
437
|
+
attributeForm: JForm | undefined
|
|
438
|
+
externalForms: JForm[]
|
|
439
|
+
subForms: JForm[]
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface JGeocodingState {
|
|
443
|
+
isAvailable: boolean
|
|
444
|
+
isLoadPending: boolean
|
|
445
|
+
isLoading: boolean
|
|
446
|
+
hasLoadingError: boolean
|
|
447
|
+
searchString: string
|
|
448
|
+
results: JGeocodingResult[]
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export interface JGeolocationState {
|
|
452
|
+
isLocationDisplayed: boolean
|
|
453
|
+
isEnabled: boolean
|
|
454
|
+
isSupported: boolean
|
|
455
|
+
currentLocation: JLocation | undefined
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export interface JMapState {
|
|
459
|
+
pitch: number
|
|
460
|
+
rotation: number
|
|
461
|
+
bearing: number
|
|
462
|
+
isLoaded: boolean
|
|
463
|
+
hasFirstLoaded: boolean
|
|
464
|
+
hasLoadingError: boolean
|
|
465
|
+
navigationHistory: JMapNavigationStep[]
|
|
466
|
+
center: JLocation
|
|
467
|
+
zoom: number
|
|
468
|
+
scale: number
|
|
469
|
+
boundaryBox: JBoundaryBox
|
|
470
|
+
activeBasemapId: string | undefined
|
|
471
|
+
basemaps: JBasemap[]
|
|
472
|
+
selection: JMapSelection
|
|
473
|
+
jmapLayerIdsSupportedByMapbox: JId[]
|
|
474
|
+
scaleControlPosition: JMAP_POSITIONS
|
|
475
|
+
distanceUnit: JMAP_DISTANCE_UNITS
|
|
476
|
+
isNavigationHistoryControlVisible: boolean
|
|
477
|
+
isScaleControlVisible: boolean
|
|
478
|
+
isMapRotationControlVisible: boolean
|
|
479
|
+
isInfoControlVisible: boolean
|
|
480
|
+
isInfoControlExpanded: boolean
|
|
481
|
+
defaultZoomOptions: JZoomOptions
|
|
482
|
+
containerWidth: number
|
|
483
|
+
containerHeight: number
|
|
484
|
+
modificationType: JMAP_MODIFICATION_TYPES
|
|
485
|
+
attributions: JMapAttribution[]
|
|
486
|
+
rasterOpacityByLayerId: { [id: JId]: number }
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface JProjectState {
|
|
490
|
+
isLoading: boolean
|
|
491
|
+
hasLoadingError: boolean
|
|
492
|
+
allProjects: JProject[]
|
|
493
|
+
selectedProject: JProject
|
|
494
|
+
disableProjectChange: boolean
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
export interface JLayerState {
|
|
498
|
+
isLoading: boolean
|
|
499
|
+
hasLoadingError: boolean
|
|
500
|
+
metadataSchema: JLayerMetadataSchemaItem[]
|
|
501
|
+
tree: JLayerTree
|
|
502
|
+
styleSamplesById: JLayerStyleSamplesById
|
|
503
|
+
allById: { [treeElementId: string]: JLayerTreeElement }
|
|
504
|
+
orderedLayerIds: JId[]
|
|
505
|
+
vectorLayerIds: JId[]
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface JPhotoState {
|
|
509
|
+
selectedPhotoId: JId | undefined
|
|
510
|
+
photos: JPhoto[]
|
|
511
|
+
isPopupOpened: boolean
|
|
512
|
+
isLoading: boolean
|
|
513
|
+
hasLoadingError: boolean
|
|
514
|
+
isDownloading: boolean
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface JQueryState {
|
|
518
|
+
groups: JQueryGroup[]
|
|
519
|
+
queriesByLayerId: { [key in JId]: JQuery[] }
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export interface JUserState extends JTokenInfo {
|
|
523
|
+
isAnonymous: boolean
|
|
524
|
+
isLoggingIn: boolean
|
|
525
|
+
isLoggingIntoOrganization: boolean
|
|
526
|
+
isReloadingSession: boolean
|
|
527
|
+
identity: JUserIdentity
|
|
528
|
+
currentOrganization: JOrganization // the organization in which the user is currently logged in
|
|
529
|
+
organizationInfos: JOrganizationInfo[] // the info about all organizations the user belongs to
|
|
530
|
+
informations: JUserInfo[]
|
|
531
|
+
changePasswordAllowed: boolean
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface JLanguageState {
|
|
535
|
+
locale: JLOCALES
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export interface JServerState extends JServerInfo {
|
|
539
|
+
isReady: boolean
|
|
540
|
+
isLoading: boolean
|
|
541
|
+
hasLoadingError: boolean
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export type JHistoryListener = (oldValue: string | undefined, newValue: string | undefined) => void
|
|
545
|
+
|
|
546
|
+
export interface JFormService {
|
|
547
|
+
// REPO METHODS
|
|
548
|
+
getFormsMetaDataByLayerId(layerId: JId): Promise<JFormMetaData[]>
|
|
549
|
+
getElement(params: JFormElementId): Promise<JFormElement | undefined>
|
|
550
|
+
getElements(params: JFormElementIds): Promise<JFormElement[]>
|
|
551
|
+
getEntries(params: JFormGetEntriesParams): Promise<JFormElement[]>
|
|
552
|
+
createAttributeFormElement(params: JFormCreateAttributeFormElementParams): Promise<GeoJSON.Feature>
|
|
553
|
+
createDatabaseFormEntry(params: JFormCreateElementParams): Promise<JFormElement>
|
|
554
|
+
updateAttributeFormElements(params: JFormUpdateElementsParams): Promise<JFormResult[]>
|
|
555
|
+
updateDatabaseFormEntries(params: JFormUpdateElementsParams): Promise<JFormElement[]>
|
|
556
|
+
deleteDatabaseFormEntries(params: JFormElements): Promise<JDeleteEntriesResult>
|
|
557
|
+
// DIALOG METHODS (UI)
|
|
558
|
+
getAllFormsMetaDataForCurrentLayer(): JFormMetaData[]
|
|
559
|
+
getFormMetaDataByIdForCurrentLayer(formId: JId): JFormMetaData
|
|
560
|
+
hasDisplayedForm(): boolean
|
|
561
|
+
getDisplayedForm(): JForm
|
|
562
|
+
resetDisplayedForm(): void
|
|
563
|
+
setActiveTabIndex(tabIndex: number): void
|
|
564
|
+
getActiveTabIndex(): number
|
|
565
|
+
hasAttributeForm(): boolean
|
|
566
|
+
getAttributeForm(): JForm
|
|
567
|
+
getExternalForms(): JForm[]
|
|
568
|
+
getSubForms(): JForm[]
|
|
569
|
+
openCreationDialogForLayer(layerId: JId, geometry: GeoJSON.Geometry): Promise<JFormMetaData[]>
|
|
570
|
+
openUpdateDialogForLayer(layerId: JId, elements: JFormElement[]): Promise<JFormMetaData[]>
|
|
571
|
+
openCreationDialogForSubForm(subFormId: JId, selectedParentElements: JFormElement[]): JFormMetaData
|
|
572
|
+
openUpdateDialogForSubForm(subFormId: JId, subFormElements: JFormElement[]): JFormMetaData
|
|
573
|
+
closeCurrentDisplayedDialog(): void
|
|
574
|
+
getFormValues(form: JForm, initialData?: JAttributeValueByName): JAttributeValueByName
|
|
575
|
+
setFormValues(form: JForm, attributeValueByName: JAttributeValueByName): JFormErrors
|
|
576
|
+
submit(params?: JFormSubmitParams): Promise<JFormSubmitResult>
|
|
577
|
+
getNextViewId(): number
|
|
578
|
+
incrementNextViewId(): void
|
|
579
|
+
processRule(rule: any, data: any): any
|
|
580
|
+
canCreateElementOnForm(params: JFormId): boolean
|
|
581
|
+
canUpdateElementOnForm(params: JFormId): boolean
|
|
582
|
+
canDeleteElementOnForm(params: JFormId): boolean
|
|
583
|
+
hasEditOwnRightsForAllElements(params: JFormElements): boolean
|
|
584
|
+
isOwnPermissionRespectedForAllElements(layerId: JId, elements: JFormElement[]): boolean
|
|
585
|
+
// PHOTOS
|
|
586
|
+
hasDisplayedFormAPhotoField(): boolean
|
|
587
|
+
getDisplayedFormPhotos(): JPhoto[]
|
|
588
|
+
addDisplayedFormPhoto(photo: JPhoto): JId
|
|
589
|
+
updateDisplayedFormPhoto(params: JFormPhotoUpdate): void
|
|
590
|
+
removeDisplayedFormPhotoById(photoId: JId): void
|
|
591
|
+
// PURE FORM METHODS (not integrated, also used by query service)
|
|
592
|
+
checkAndCorrectSchemas(schema: JFormSchema, uiSchema: JFormUISchema): void
|
|
593
|
+
getDefaultValues(formMetaData: JFormMetaData, initialData?: JAttributeValueByName): JAttributeValueByName
|
|
594
|
+
getPreparedData(formMetaData: JFormMetaData, data: JAttributeValueByName): JAttributeValueByName
|
|
595
|
+
validateData(formMetaData: JFormMetaData, data: JAttributeValueByName): JFormErrors
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export interface JHistoryService {
|
|
599
|
+
transformSearchParamsIntoHashParams(paramNames: string | string[]): void
|
|
600
|
+
goBack(): void
|
|
601
|
+
goForward(): void
|
|
602
|
+
getHashParameter(parameterName: string): string
|
|
603
|
+
getHashParameters(): { [key: string]: string }
|
|
604
|
+
pushHashParameters(parameterName: string, parameterValue: string): void
|
|
605
|
+
popHashParameters(parameterName: string): void
|
|
606
|
+
onParameterChange(parameterName: string, fn: JHistoryListener): string
|
|
607
|
+
removePropertyChangeListener(listenerId: string): void
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export interface JGeometryService {
|
|
611
|
+
checkLocation(location: JLocation): void
|
|
612
|
+
isValidLocation(location: JLocation | undefined): boolean
|
|
613
|
+
isValidBbox(bbox: JBoundaryBox | undefined): boolean
|
|
614
|
+
getNormalizedBbox(bbox: JBoundaryBox, ogcCompliant: boolean): JBoundaryBox
|
|
615
|
+
isValidGeometry(geometry: any): boolean
|
|
616
|
+
checkCircle(circle: JCircle): void
|
|
617
|
+
checkPolygon(polygon: JPolygon): void
|
|
618
|
+
checkLine(line: JLine): void
|
|
619
|
+
checkBbox(bbox: JBoundaryBox): void
|
|
620
|
+
getArea(feature: Feature): number
|
|
621
|
+
getLineLength(
|
|
622
|
+
feature: Feature<LineString> | Feature<MultiLineString>,
|
|
623
|
+
units?: JGEOMETRY_UNITS | JMAP_DISTANCE_UNITS
|
|
624
|
+
): number
|
|
625
|
+
getCentroid(feature: Feature | FeatureCollection): Feature<Point>
|
|
626
|
+
getFeatureFromLine(line: JLine): Feature<LineString>
|
|
627
|
+
getFeatureFromWkt(wkt: string): Feature
|
|
628
|
+
getPolygonFeatureFromCircle(circle: JCircle, units?: JGEOMETRY_UNITS): Feature<Polygon>
|
|
629
|
+
getFeatureFromPolygon(polygon: JPolygon): Feature<Polygon>
|
|
630
|
+
getBboxFromFeature(feature: Feature): JBoundaryBox
|
|
631
|
+
getBboxFromFeatures(features: Feature[]): JBoundaryBox
|
|
632
|
+
getBboxFromPolygon(polygon: JPolygon): JBoundaryBox
|
|
633
|
+
getBboxFromLine(line: JLine): JBoundaryBox
|
|
634
|
+
getPolygonFeatureFromBbox(boundaryBox: JBoundaryBox): Feature<Polygon>
|
|
635
|
+
bboxIntersect(bb1: JBoundaryBox, bb2: JBoundaryBox): boolean
|
|
636
|
+
polygonIntersect(feature1: Feature<Polygon>, feature2: Feature): boolean
|
|
637
|
+
lineIntersect(feature1: Feature<LineString>, feature2: Feature): boolean
|
|
638
|
+
getDistance(p1: JPoint | JLocation, p2: JPoint | JLocation): number // in km
|
|
639
|
+
getFeatureCollection(features: Feature[] | JLocation[] | JPoint[]): FeatureCollection
|
|
640
|
+
getCircleFeature(center: JPoint | JLocation, radius: number): Feature<Polygon> // radius in km
|
|
641
|
+
getPolygonFeature(coordinates: JPoint[], closeCoordinates?: boolean): Feature<Polygon>
|
|
642
|
+
isGeometryTypeValidForLayer(layerId: JId, geometryType: GeoJSON.GeoJsonGeometryTypes): boolean
|
|
643
|
+
getRotatedFeature(feature: GeoJSON.Feature, angle: number): GeoJSON.Feature
|
|
644
|
+
convertLength(length: number, toUnit: JMAP_DISTANCE_UNITS, fromUnit?: JMAP_DISTANCE_UNITS): number // fromUnit is km by default
|
|
645
|
+
convertArea(area: number, toUnit: JMAP_DISTANCE_UNITS, fromUnit?: JMAP_DISTANCE_UNITS): number // fromUnit is km by default
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export interface JMapService {
|
|
649
|
+
Interaction: JMapInteractionService
|
|
650
|
+
Filter: JMapFilterService
|
|
651
|
+
Selection: JMapSelectionService
|
|
652
|
+
Basemap: JMapBasemapService
|
|
653
|
+
Attribution: JMapAttributionService
|
|
654
|
+
getMap(): Map
|
|
655
|
+
getMapJSLib(): any
|
|
656
|
+
getDomContainerId(): string
|
|
657
|
+
getAllDistanceUnits(): JMAP_DISTANCE_UNITS[]
|
|
658
|
+
getDistanceUnit(): JMAP_DISTANCE_UNITS
|
|
659
|
+
setDistanceUnit(distanceUnit: JMAP_DISTANCE_UNITS): void
|
|
660
|
+
isMapCreated(): boolean
|
|
661
|
+
isMapLoaded(): boolean
|
|
662
|
+
getExtent(): JBoundaryBox
|
|
663
|
+
getCenter(): { x: number; y: number }
|
|
664
|
+
getZoom(): number
|
|
665
|
+
getMapBoxSourceIdByJMapLayerId(layerId: JId): string
|
|
666
|
+
isScaleControlVisible(): boolean
|
|
667
|
+
setScaleControlVisibility(isVisible: boolean, position?: JMAP_POSITIONS): void
|
|
668
|
+
setScaleControlUnits(units: "imperial" | "metric" | "nautical"): void
|
|
669
|
+
setScaleControlPosition(position: JMAP_POSITIONS): void
|
|
670
|
+
getScaleControlPosition(): JMAP_POSITIONS
|
|
671
|
+
isNavigationHistoryControlVisible(): boolean
|
|
672
|
+
setNavigationHistoryControlVisibility(isVisible: boolean): void
|
|
673
|
+
isMapRotationControlVisible(): boolean
|
|
674
|
+
setMapRotationControlVisibility(isVisible: boolean): void
|
|
675
|
+
isMapInfoControlVisible(): boolean
|
|
676
|
+
setMapInfoControlVisibility(isVisible: boolean): void
|
|
677
|
+
isMapInfoControlExpanded(): boolean
|
|
678
|
+
setMapInfoControlExpansion(isExpanded: boolean): void
|
|
679
|
+
isLayerRendered(layerId: JId): boolean
|
|
680
|
+
getLayersVisibilityStatus(): JMapLayersVisibilityStatus
|
|
681
|
+
getLayersVisibilityStatusAsArray(): JMapLayerVisibilityStatus[]
|
|
682
|
+
getMapboxSupportedJMapLayerIds(): JId[]
|
|
683
|
+
getMapboxSupportedJMapLayerBefore(layerId: JId): JId | undefined
|
|
684
|
+
getMapboxSupportedJMapLayerAfter(layerId: JId): JId | undefined
|
|
685
|
+
refreshLayerById(layerId: JId): void
|
|
686
|
+
getRenderedJMapLayerIds(): JId[]
|
|
687
|
+
getRenderedFeatures(layerId: JId, params?: JLocation | JBoundaryBox | JCircle | JGetRenderedFeaturesParams): Feature[]
|
|
688
|
+
getSourceFeatures(layerId: JId, params?: JGetSourceFeaturesParams): Feature[]
|
|
689
|
+
getRenderedFeaturesAttributeValues(
|
|
690
|
+
layerId: JId,
|
|
691
|
+
filter?: JLocation | JBoundaryBox | JCircle
|
|
692
|
+
): JMapFeatureAttributeValues[]
|
|
693
|
+
getPitch(): number
|
|
694
|
+
getRotation(): number
|
|
695
|
+
getBearing(): number
|
|
696
|
+
getNavigationHistoryStack(): JMapNavigationStep[]
|
|
697
|
+
undoLastNavigationStep(): JMapNavigationStep | undefined
|
|
698
|
+
setPitch(pitch: number): void
|
|
699
|
+
setRotation(rotation: number): void
|
|
700
|
+
setBearing(bearing: number): void
|
|
701
|
+
panTo(center: JLocation, stopJMapEventPropagation?: boolean): void
|
|
702
|
+
zoomTo(zoom: number, options?: JPanAndZoomOptions): void
|
|
703
|
+
zoomToRect(bbox: JBoundaryBox, options?: JPanAndZoomOptions): void
|
|
704
|
+
panAndZoomTo(center: JLocation, zoom: number, options?: JPanAndZoomOptions): void
|
|
705
|
+
setDefaultZoomOptions(options?: Partial<JZoomOptions>): void
|
|
706
|
+
navigateTo(params: JMapNavigateToParams): void
|
|
707
|
+
fitFeatures(features: Feature[], options?: JPanAndZoomOptions): void
|
|
708
|
+
flashLocation(location: JLocation, options?: JMapFlashLocationParams): void
|
|
709
|
+
flashLocations(locations: JLocation[], options?: JMapFlashLocationParams): void
|
|
710
|
+
clearFlashingLocations(): void
|
|
711
|
+
displayLayerExtent(layerId: JId, params?: JDisplayExtentParams): Promise<boolean>
|
|
712
|
+
displayExtent(extent: JBoundaryBox, params?: JDisplayExtentParams): void
|
|
713
|
+
getResolution(params?: JLatitudeAndZoom): number
|
|
714
|
+
getScale(params?: JLatitudeAndZoom): string
|
|
715
|
+
getScaleDenominator(params?: JLatitudeAndZoom): number
|
|
716
|
+
setScale(scaleDenominator: number, options?: JPanAndZoomOptions): number
|
|
717
|
+
getZoomFromScale(scaleDenominator: number, latitude?: number): number
|
|
718
|
+
getMouseCursor(): string
|
|
719
|
+
setMouseCursor(cursor: string): void
|
|
720
|
+
openModificationPopupForCenter(): void
|
|
721
|
+
openModificationPopupForScale(): void
|
|
722
|
+
closeModificationPopup(): void
|
|
723
|
+
getRasterLayerTransparency(layerId: JId): number
|
|
724
|
+
getRasterLayerInitialTransparency(layerId: JId): number
|
|
725
|
+
resetRasterLayerTransparency(layerId: JId): number
|
|
726
|
+
setRasterLayerTransparency(layerId: JId, transparency: number): void
|
|
727
|
+
applyCurrentPixelRatio(): Promise<void>
|
|
728
|
+
isPixelRatioCurrentlyValid(pixelRatio: number): boolean
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
export interface JMapBasemapService {
|
|
732
|
+
getAllIds(): string[]
|
|
733
|
+
isDisabled(): boolean
|
|
734
|
+
isActive(): boolean
|
|
735
|
+
isMapboxId(basemapId: string): boolean
|
|
736
|
+
isOSMId(basemapId: string): boolean
|
|
737
|
+
getActiveId(): string | undefined
|
|
738
|
+
existsById(basemapId: string): boolean
|
|
739
|
+
getById(basemapId: string): JBasemap
|
|
740
|
+
activateById(basemapId: string | undefined): void
|
|
741
|
+
deactivate(): void
|
|
742
|
+
add(basemap: JBasemap, activate?: boolean, beforeId?: string): void
|
|
743
|
+
removeById(basemapId: string): void
|
|
744
|
+
removeByIds(basemapIds: string[]): void
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export interface JMapInteractionService {
|
|
748
|
+
addInteractor(name: string, interactor: JMapInteractor, active?: boolean): void
|
|
749
|
+
terminateInteractorById(interactorId: string): void
|
|
750
|
+
getAllInteractorIds(): string[]
|
|
751
|
+
getActiveInteractorId(): string
|
|
752
|
+
activateInteractorById(interactorId: string, force?: boolean): void
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
export interface JMapSelectionService {
|
|
756
|
+
isEmpty(): boolean
|
|
757
|
+
isEmptyByLayerId(layerId: JId): boolean
|
|
758
|
+
getSelectionCentroid(selection: JMapSelection): JLocation
|
|
759
|
+
getSelectedFeatures(): JMapSelection
|
|
760
|
+
getSelectedFeaturesForLayer(layerId: JId): Feature[]
|
|
761
|
+
getSelectedFeatureIdsForLayer(layerId: JId): string[]
|
|
762
|
+
selectOnOneLayerAtLocation(layerId: JId, location: JLocation, params?: JMapSelectionParams | undefined): Feature[]
|
|
763
|
+
selectOnOneLayerFromCircle(layerId: JId, circle: JCircle, params?: JMapSelectionParams | undefined): Feature[]
|
|
764
|
+
selectOnOneLayerFromLine(layerId: JId, line: JLine, params?: JMapSelectionParams | undefined): Feature[]
|
|
765
|
+
selectOnOneLayerFromPolygon(layerId: JId, polygon: JPolygon, params?: JMapSelectionParams | undefined): Feature[]
|
|
766
|
+
selectOnAllLayersAtLocation(location: JLocation, params?: JMapSelectionParams | undefined): JMapSelection
|
|
767
|
+
selectOnAllLayersFromCircle(circle: JCircle, params?: JMapSelectionParams | undefined): JMapSelection
|
|
768
|
+
selectOnAllLayersFromLine(line: JLine, params?: JMapSelectionParams | undefined): JMapSelection
|
|
769
|
+
selectOnAllLayersFromPolygon(polygon: JPolygon, params?: JMapSelectionParams | undefined): JMapSelection
|
|
770
|
+
setLayerSelection(layerId: JId, features: Feature | Feature[]): void
|
|
771
|
+
setLayersSelection(params: JSelectionSetLayersSelectionParams[]): void
|
|
772
|
+
addFeaturesToLayerSelection(layerId: JId, features: Feature | Feature[]): void
|
|
773
|
+
removeFeaturesFromLayerSelection(layerId: JId, featureIds: JId | JId[]): void
|
|
774
|
+
clearSelection(layerId?: JId): void
|
|
775
|
+
clearLayersSelection(layerIds: JId[]): void
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
export interface JMapFilterService {
|
|
779
|
+
applyHasAttribute(layerId: JId, attributeId: string): string
|
|
780
|
+
applyHasNotAttribute(layerId: JId, attributeId: string): string
|
|
781
|
+
applyAttributeValueEqualTo(layerId: JId, attributeId: string, attributeValue: any): string
|
|
782
|
+
applyAttributeValueBetween(layerId: JId, attributeId: string, start: any, end: any): string
|
|
783
|
+
applyAttributeValueNotEqualTo(layerId: JId, attributeId: string, attributeValue: any): string
|
|
784
|
+
applyAttributeValueGreaterThan(layerId: JId, attributeId: string, attributeValue: any): string
|
|
785
|
+
applyAttributeValueGreaterOrEqualsTo(layerId: JId, attributeId: string, attributeValue: any): string
|
|
786
|
+
applyAttributeValueLowerThan(layerId: JId, attributeId: string, attributeValue: any): string
|
|
787
|
+
applyAttributeValueLowerOrEqualsTo(layerId: JId, attributeId: string, attributeValue: any): string
|
|
788
|
+
applyAttributeValueIn(layerId: JId, attributeId: string, attributeValues: any[]): string
|
|
789
|
+
applyAttributeValueNotIn(layerId: JId, attributeId: string, attributeValues: any[]): string
|
|
790
|
+
applySpatial(layerId: JId, filterGeometry: JPolygon | JCircle): string
|
|
791
|
+
removeByFilterId(filterId: string): void
|
|
792
|
+
removeAllFilters(layerId: JId): void
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export interface JProjectionService {
|
|
796
|
+
reprojectLocation(location: JLocation, toProjection: string, fromProjection?: string): JLocation
|
|
797
|
+
reprojectBoundaryBox(boundaryBox: JBoundaryBox, toProjection: string, fromProjection?: string): JBoundaryBox
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export interface JProjectService {
|
|
801
|
+
hasProjectActivated(): boolean
|
|
802
|
+
getActiveProject(): JProject
|
|
803
|
+
activateById(projectId: JId): JProject
|
|
804
|
+
activateByName(projectName: string): JProject
|
|
805
|
+
deactivate(): void
|
|
806
|
+
getAllProjects(): Promise<JProject[]>
|
|
807
|
+
existsById(projectId: JId): boolean
|
|
808
|
+
existsByName(projectName: string): boolean
|
|
809
|
+
getById(projectId: JId): JProject
|
|
810
|
+
getByName(projectName: string): JProject
|
|
811
|
+
getId(): JId
|
|
812
|
+
getName(): string
|
|
813
|
+
getDescription(): string
|
|
814
|
+
getProjection(): JProjection
|
|
815
|
+
getDefaultDistanceUnit(): JMAP_DISTANCE_UNITS
|
|
816
|
+
getMapUnit(): JMAP_DISTANCE_UNITS
|
|
817
|
+
getInitialRotation(): number
|
|
818
|
+
getSelectionColor(): string
|
|
819
|
+
getBackgroundColor(): string
|
|
820
|
+
getInitialExtent(): JBounds | null
|
|
821
|
+
getBase64ImageThumbnail(): string
|
|
822
|
+
loadAllProjectThumbnails(params?: JProjectLoadThumbnailsParams): Promise<void>
|
|
823
|
+
isChangeDisabled(): boolean
|
|
824
|
+
setChangeEnabled(): void
|
|
825
|
+
setChangeDisabled(): void
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export interface JLayerService {
|
|
829
|
+
Search: JLayerSearchService
|
|
830
|
+
Thematic: JLayerThematicService
|
|
831
|
+
DynamicFilter: JDynamicFilterService
|
|
832
|
+
getMetadataSchema(): JLayerMetadataSchemaItem[]
|
|
833
|
+
getLayerTree(): JLayerTree
|
|
834
|
+
getLayerTreeElementsById(): { [key in JId]: JLayerTreeElement }
|
|
835
|
+
getLayers(): JLayer[]
|
|
836
|
+
getLayerIds(): JId[]
|
|
837
|
+
getVectorLayers(): JLayer[]
|
|
838
|
+
getVectorLayerIds(): JId[]
|
|
839
|
+
getLayerAttributes(layerId: JId): JLayerAttribute[]
|
|
840
|
+
getLayerAttribute(layerId: JId, attributeName: string): JLayerAttribute
|
|
841
|
+
exists(layerId: JId): boolean
|
|
842
|
+
attributeExists(layerId: JId, attributeName: string): boolean
|
|
843
|
+
getById(layerId: JId): JLayerTreeElement
|
|
844
|
+
getSelfOrChildren(layerId: JId): JLayer[]
|
|
845
|
+
getName(layerId: JId): string
|
|
846
|
+
getDescription(layerId: JId): string
|
|
847
|
+
getEPSG4326Extent(layerId: JId): Promise<JBoundaryBox | null>
|
|
848
|
+
isVisible(layerId: JId, checkParentVisibility?: boolean): boolean
|
|
849
|
+
isVectorLayerById(layerId: JId): boolean
|
|
850
|
+
isSelectableById(layerId: JId): boolean
|
|
851
|
+
setSelectabilityById(layerId: JId, selectability: boolean, ignoreVisibility?: boolean): void
|
|
852
|
+
setLayersSelectability(params: JLayerSetLayersSelectabilityParams[]): void
|
|
853
|
+
isAllLayerParentsVisible(layerId: JId): boolean
|
|
854
|
+
setVisible(layerId: JId, visible: boolean): void
|
|
855
|
+
setLayersVisibility(params: JLayerSetLayersVisibilityParams[]): void
|
|
856
|
+
ensureLayerIsVisible(layerId: JId): void
|
|
857
|
+
ensureLayersAreVisible(layerIds: JId[]): void
|
|
858
|
+
setLayerGroupExpansion(layerGroupId: JId, isExpanded: boolean): void
|
|
859
|
+
setLayerGroupsExpansion(params: JLayerSetLayerGroupsExpansionParams[]): void
|
|
860
|
+
deleteLayer(layerId: JId): void
|
|
861
|
+
hasInformationReport(layerId: JId): boolean
|
|
862
|
+
openInformationReportInNewTab(layerId: JId, featureIds: JId[]): Promise<string>
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export interface JLayerSearchService {
|
|
866
|
+
byAttribute(params: JLayerSearchByAttributesParams): Promise<Feature[]>
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export interface JLayerThematicService {
|
|
870
|
+
getAllByLayerId(layerId: JId): JLayerThematic[]
|
|
871
|
+
getById(layerId: JId, thematicId: JId): JLayerThematic
|
|
872
|
+
existsById(layerId: JId, thematicId: JId): boolean
|
|
873
|
+
hasAnyVisibleByLayerId(layerId: JId): boolean
|
|
874
|
+
getAllVisibleByLayerId(layerId: JId): JLayerThematic[]
|
|
875
|
+
setVisibilityById(layerId: JId, thematicId: JId, visibility: boolean): void
|
|
876
|
+
setThematicsVisibility(params: JLayerThematicSetVisibilityParams[]): void
|
|
877
|
+
setCategoryVisibility(params: JLayerThematicSetCategoryVisibilityParams): void
|
|
878
|
+
setAllCategoriesVisibility(layerId: JId, thematicId: JId, visibility: boolean): void
|
|
879
|
+
setConditionVisibility(params: JLayerThematicSetConditionVisibilityParams): void
|
|
880
|
+
setAllConditionsVisibility(layerId: JId, thematicId: JId, visibility: boolean): void
|
|
881
|
+
getFamilyTypeById(layerId: JId, thematicId: JId): JLAYER_THEMATIC_FAMILY_TYPES
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export interface JUserService {
|
|
885
|
+
getToken(): string
|
|
886
|
+
getOrganization(): JOrganization
|
|
887
|
+
getFullName(): string
|
|
888
|
+
getUsername(): string
|
|
889
|
+
getPreference(name: string): Promise<string | null>
|
|
890
|
+
hasPreference(name: string): Promise<boolean>
|
|
891
|
+
removePreference(name: string): Promise<string | null>
|
|
892
|
+
setPreference(name: string, value: string | undefined): Promise<void>
|
|
893
|
+
setToken(token: string, organizationId?: string): Promise<JSessionData>
|
|
894
|
+
login(login: string, password: string): Promise<JSessionData>
|
|
895
|
+
loginIntoOrganization(organizationId: string): Promise<JSessionData>
|
|
896
|
+
loginWithIdentityProvider(providerId: string): void
|
|
897
|
+
logout(): Promise<void>
|
|
898
|
+
isLoggedIn(): boolean
|
|
899
|
+
getAllInfos(): JUserInfo[]
|
|
900
|
+
addInfo(info: JUserInfo): void
|
|
901
|
+
removeInfo(infoId: string): void
|
|
902
|
+
changePassword(newPassword: string, currentPassword: string): Promise<void>
|
|
903
|
+
changeFullName(newFullName: string): Promise<void>
|
|
904
|
+
getMinimumPasswordLength(): number
|
|
905
|
+
isPasswordCompliant(password: string): boolean
|
|
906
|
+
getPasswordPolicyCompliance(
|
|
907
|
+
password: string
|
|
908
|
+
): JJMapServerPasswordPolicyCompliance | JJMapCloudPasswordPolicyCompliance
|
|
909
|
+
isPseudoUser(): boolean
|
|
910
|
+
getOrganizationId(): string
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
export interface JLanguageService {
|
|
914
|
+
addBundle(bundle: JTranslationBundle): void
|
|
915
|
+
bundleExitsById(bundleId: string): boolean
|
|
916
|
+
getBundleById(bundleId: string): JTranslationBundle
|
|
917
|
+
getAllBundleIds(): string[]
|
|
918
|
+
getBundles(): JTranslationBundleById
|
|
919
|
+
getLocales(): JLOCALES[]
|
|
920
|
+
getLocale(): JLOCALES
|
|
921
|
+
getDateFnsLocale(displayTime?: boolean): any
|
|
922
|
+
getDefaultLocale(): JLOCALES
|
|
923
|
+
setLocale(locale: JLOCALES): void
|
|
924
|
+
translate(params: JTranslateParams): string
|
|
925
|
+
is12HoursTimeFormat(): boolean
|
|
926
|
+
isValidLocale(locale: JLOCALES): boolean
|
|
927
|
+
getDateFnsDateFormat(): string
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export interface JMouseOverService {
|
|
931
|
+
isPopupOpened(): boolean
|
|
932
|
+
closePopup(): void
|
|
933
|
+
openPopup(params: JMouseOverOpenPopupParams): void
|
|
934
|
+
openPopupForSelection(params: JMouseOverOpenPopupForSelectionParams): void
|
|
935
|
+
renderForFeaturesAtLocation(containerId: string, location: JLocation): boolean // return true if has mouseover
|
|
936
|
+
renderForFeaturesSelection(containerId: string, selection: JMapSelection): boolean // return true if has mouseover
|
|
937
|
+
openInformationReportInNewTab(layerId: JId): Promise<string>
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
export interface JExtensionService {
|
|
941
|
+
register(extension: JCoreExtension): void
|
|
942
|
+
isRegistered(extensionId: string): boolean
|
|
943
|
+
getAllRegisteredIds(): string[]
|
|
944
|
+
hasMouseOver(): boolean
|
|
945
|
+
renderMouseOver(layer: JLayer, feature: Feature): Array<JExtensionMouseOver | undefined>
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export interface JServerService {
|
|
949
|
+
isReady(): boolean
|
|
950
|
+
getVersion(): JServerVersion
|
|
951
|
+
getType(): JSERVER_TYPES
|
|
952
|
+
isSaas(): boolean
|
|
953
|
+
isLegacy(): boolean
|
|
954
|
+
getMinimumVersion(): JMinimumServerVersion
|
|
955
|
+
isMinimumVersionRespected(serverInfo?: JServerInfo): boolean
|
|
956
|
+
getShortVersion(): string
|
|
957
|
+
isStandardLoginAvailable(): boolean
|
|
958
|
+
getIdentityProviderById(providerId: string): JServerAnyIdentityProvider
|
|
959
|
+
getAllIdentityProvidersById(): JServerIdentityProviderById
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
export interface JDynamicFilterService {
|
|
963
|
+
isAvailable(layerId: JId): boolean
|
|
964
|
+
isActive(layerId: JId): boolean
|
|
965
|
+
setIsActive(layerId: JId, isActive: boolean): void
|
|
966
|
+
getByLayerId(layerId: JId): JDynamicFilter
|
|
967
|
+
getAllOperators(): JLAYER_DYNAMIC_FILTER_OPERATORS[]
|
|
968
|
+
getAllMultipleValuesOperators(): JLAYER_DYNAMIC_FILTER_OPERATORS[]
|
|
969
|
+
getAllTwoValuesOperators(): JLAYER_DYNAMIC_FILTER_OPERATORS[]
|
|
970
|
+
getOperatorsForAttributeType(attributeType: JLAYER_ATTRIBUTE_TYPES): JLAYER_DYNAMIC_FILTER_OPERATORS[]
|
|
971
|
+
getConditionError(condition: JDynamicFilterCondition): string | undefined
|
|
972
|
+
isConditionValid(condition: JDynamicFilterCondition): boolean
|
|
973
|
+
existSimilarCondition(condition: JDynamicFilterCondition, isUpdate?: boolean): boolean
|
|
974
|
+
set(params: JDynamicFilterSetParams[]): void
|
|
975
|
+
createCondition(condition: JDynamicFilterCondition): number
|
|
976
|
+
updateCondition(condition: JDynamicFilterCondition): void
|
|
977
|
+
removeConditions(layerId: JId, conditionsIds: number[]): void
|
|
978
|
+
isNoValueOperator(operator: JLAYER_DYNAMIC_FILTER_OPERATORS): boolean
|
|
979
|
+
isMultipleValuesOperator(operator: JLAYER_DYNAMIC_FILTER_OPERATORS): boolean
|
|
980
|
+
isTwoValuesOperator(operator: JLAYER_DYNAMIC_FILTER_OPERATORS): boolean
|
|
981
|
+
getConditionValueError(
|
|
982
|
+
operator: JLAYER_DYNAMIC_FILTER_OPERATORS,
|
|
983
|
+
attributeType: JLAYER_ATTRIBUTE_TYPES,
|
|
984
|
+
value?: any
|
|
985
|
+
): string | undefined
|
|
986
|
+
isConditionValueValid(
|
|
987
|
+
operator: JLAYER_DYNAMIC_FILTER_OPERATORS,
|
|
988
|
+
attributeType: JLAYER_ATTRIBUTE_TYPES,
|
|
989
|
+
value?: any
|
|
990
|
+
): boolean
|
|
991
|
+
canAttributeTypeAcceptMultipleValuesOperators(attributeType: JLAYER_ATTRIBUTE_TYPES): boolean
|
|
992
|
+
canAttributeTypeAcceptTwoValuesOperators(attributeType: JLAYER_ATTRIBUTE_TYPES): boolean
|
|
993
|
+
getIsBetweenValuesError(attributeType: JLAYER_ATTRIBUTE_TYPES, value1: any, value2: any): string | undefined
|
|
994
|
+
getNowValue(): string
|
|
995
|
+
getAllLastOperatorUnits(): string[]
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// MISC
|
|
999
|
+
export interface JObjectId {
|
|
1000
|
+
project: string
|
|
1001
|
+
layer: string
|
|
1002
|
+
element: string
|
|
1003
|
+
}
|