jmapcloud-ng-core-types 1.1.39 → 1.1.41
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/README.md +1 -1
- package/index.d.ts +4 -7
- package/package.json +2 -2
- package/public/core.d.ts +8 -51
- package/public/jmap/map.d.ts +3 -6
- package/public/jmap/project.d.ts +13 -19
- package/public/jmap/startup-options.d.ts +0 -31
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# jmapcloud-ng-core-types
|
|
2
|
+
|
|
2
3
|
JMap Cloud NG Core
|
|
3
4
|
|
|
4
5
|
The latest version of the JMap Cloud NG Core Javascript API documentation is available <a href="https://k2geospatial.github.io/jmapcloud-frontend/jmapcloud-ng-core-types/latest" target="_blank">here</a>.
|
|
5
6
|
|
|
6
7
|
Examples and user documentation are available <a href="https://docs.jmapcloud.io/en/jmap-ng/jmap-ng-developer-documentation" target="_blank">here</a>.
|
|
7
|
-
|
package/index.d.ts
CHANGED
|
@@ -613,10 +613,7 @@ export interface JMapService {
|
|
|
613
613
|
|
|
614
614
|
export interface JMapBasemapService {
|
|
615
615
|
getAllIds(): string[]
|
|
616
|
-
isDisabled(): boolean
|
|
617
616
|
isActive(): boolean
|
|
618
|
-
isMapboxId(basemapId: string): boolean
|
|
619
|
-
isOSMId(basemapId: string): boolean
|
|
620
617
|
getActiveId(): string | undefined
|
|
621
618
|
existsById(basemapId: string): boolean
|
|
622
619
|
getById(basemapId: string): JBasemap
|
|
@@ -693,13 +690,13 @@ export interface JProjectService {
|
|
|
693
690
|
getByName(projectName: string): JProject
|
|
694
691
|
getId(): JId
|
|
695
692
|
getName(): string
|
|
696
|
-
getDescription(): string
|
|
693
|
+
getDescription(): string | undefined
|
|
697
694
|
getProjection(): JProjection
|
|
698
695
|
getDefaultDistanceUnit(): JMAP_DISTANCE_UNITS
|
|
699
696
|
getMapUnit(): JMAP_DISTANCE_UNITS
|
|
700
|
-
getInitialRotation(): number
|
|
701
|
-
getSelectionColor(): string
|
|
702
|
-
getBackgroundColor(): string
|
|
697
|
+
getInitialRotation(): number | undefined
|
|
698
|
+
getSelectionColor(): string | undefined
|
|
699
|
+
getBackgroundColor(): string | undefined
|
|
703
700
|
getInitialExtent(): JBounds | null
|
|
704
701
|
getBase64ImageThumbnail(): string
|
|
705
702
|
loadAllProjectThumbnails(params?: JProjectLoadThumbnailsParams): Promise<void>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jmapcloud-ng-core-types",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.41",
|
|
4
4
|
"description": "JMap Cloud specific version of JMap Cloud NG Core types and interfaces",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "ambient.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@auth0/auth0-spa-js": "^2.1.3",
|
|
34
34
|
"@types/geojson": "^7946.0.14",
|
|
35
35
|
"geojson": "^0.5.0",
|
|
36
|
-
"jmapcloud-types": "
|
|
36
|
+
"jmapcloud-types": "../packages/jmapcloud-types",
|
|
37
37
|
"maplibre-gl": "^4.7.1",
|
|
38
38
|
"redux": "^5.0.1"
|
|
39
39
|
}
|
package/public/core.d.ts
CHANGED
|
@@ -5121,19 +5121,6 @@ export namespace JMap {
|
|
|
5121
5121
|
* ```
|
|
5122
5122
|
*/
|
|
5123
5123
|
function getAllIds(): string[]
|
|
5124
|
-
/**
|
|
5125
|
-
* ***JMap.Map.Basemap.isDisabled***
|
|
5126
|
-
*
|
|
5127
|
-
* Returns true if basemaps are disabled.
|
|
5128
|
-
*
|
|
5129
|
-
* Can be disabled with option disableBasemaps {@link JCoreOptions} in JS options, or with url param "ngDisableBasemaps=true".
|
|
5130
|
-
*
|
|
5131
|
-
* @example
|
|
5132
|
-
* ```ts
|
|
5133
|
-
* JMap.Map.Basemap.isDisabled()
|
|
5134
|
-
* ```
|
|
5135
|
-
*/
|
|
5136
|
-
function isDisabled(): boolean
|
|
5137
5124
|
/**
|
|
5138
5125
|
* ***JMap.Map.Basemap.isActive***
|
|
5139
5126
|
*
|
|
@@ -5153,36 +5140,6 @@ export namespace JMap {
|
|
|
5153
5140
|
* ```
|
|
5154
5141
|
*/
|
|
5155
5142
|
function isActive(): boolean
|
|
5156
|
-
/**
|
|
5157
|
-
* ***JMap.Map.Basemap.isMapboxId***
|
|
5158
|
-
*
|
|
5159
|
-
* Returns true if the basemap id is a mapbox basemap.
|
|
5160
|
-
*
|
|
5161
|
-
* @example
|
|
5162
|
-
* ```ts
|
|
5163
|
-
* // returns true
|
|
5164
|
-
* JMap.Map.Basemap.isMapboxId("mapbox-streets")
|
|
5165
|
-
*
|
|
5166
|
-
* // returns false
|
|
5167
|
-
* JMap.Map.Basemap.isMapboxId("my-custom-basemap")
|
|
5168
|
-
* ```
|
|
5169
|
-
*/
|
|
5170
|
-
function isMapboxId(basemapId: string): boolean
|
|
5171
|
-
/**
|
|
5172
|
-
* ***JMap.Map.Basemap.isOSMId***
|
|
5173
|
-
*
|
|
5174
|
-
* Returns true if the basemap id is an Open Street Map basemap.
|
|
5175
|
-
*
|
|
5176
|
-
* @example
|
|
5177
|
-
* ```ts
|
|
5178
|
-
* // returns true
|
|
5179
|
-
* JMap.Map.Basemap.isOSMId("osm-standard")
|
|
5180
|
-
*
|
|
5181
|
-
* // returns false
|
|
5182
|
-
* JMap.Map.Basemap.isOSMId("mapbox-streets")
|
|
5183
|
-
* ```
|
|
5184
|
-
*/
|
|
5185
|
-
function isOSMId(basemapId: string): boolean
|
|
5186
5143
|
/**
|
|
5187
5144
|
* ***JMap.Map.Basemap.getActiveId***
|
|
5188
5145
|
*
|
|
@@ -5269,24 +5226,24 @@ export namespace JMap {
|
|
|
5269
5226
|
* // add an osm basemap
|
|
5270
5227
|
* JMap.Map.Basemap.add({
|
|
5271
5228
|
* id: "osm",
|
|
5272
|
-
*
|
|
5229
|
+
* name: "Open Street Map",
|
|
5273
5230
|
* tileUrls: [
|
|
5274
5231
|
* "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
5275
5232
|
* "https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
5276
5233
|
* "https://c.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
5277
5234
|
* ],
|
|
5278
|
-
*
|
|
5235
|
+
* imageUrl: "https://searchengineland.com/figz/wp-content/seloads/2013/11/Screen-Shot-2013-11-22-at-3.41.27-PM.png"
|
|
5279
5236
|
* }, true) // true = activate the new basemap
|
|
5280
5237
|
*
|
|
5281
5238
|
* // Add a quadkey (not x/y/z) basemap
|
|
5282
5239
|
* JMap.Map.Basemap.add(
|
|
5283
5240
|
* {
|
|
5284
5241
|
* id: "My custom map",
|
|
5285
|
-
*
|
|
5242
|
+
* name: "My map",
|
|
5286
5243
|
* tileUrls: [
|
|
5287
5244
|
* "https://t.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/{quadkey}?mkt=fr-CA&it=G,LC,BX,RL&shading=hill&n=z&og=1226&cstl=vb&src=o"
|
|
5288
5245
|
* ],
|
|
5289
|
-
*
|
|
5246
|
+
* imageUrl: "http://www.toxel.com/wp-content/uploads/2008/08/creativelogos11.jpg"
|
|
5290
5247
|
* }, true) // true = activate the new basemap
|
|
5291
5248
|
* ```
|
|
5292
5249
|
*/
|
|
@@ -5739,7 +5696,7 @@ export namespace JMap {
|
|
|
5739
5696
|
* JMap.Project.getDescription()
|
|
5740
5697
|
* ```
|
|
5741
5698
|
*/
|
|
5742
|
-
function getDescription(): string
|
|
5699
|
+
function getDescription(): string | undefined
|
|
5743
5700
|
/**
|
|
5744
5701
|
* **JMap.Project.getProjection**
|
|
5745
5702
|
*
|
|
@@ -5769,7 +5726,7 @@ export namespace JMap {
|
|
|
5769
5726
|
* JMap.Project.getInitialRotation()
|
|
5770
5727
|
* ```
|
|
5771
5728
|
*/
|
|
5772
|
-
function getInitialRotation(): number
|
|
5729
|
+
function getInitialRotation(): number | undefined
|
|
5773
5730
|
/**
|
|
5774
5731
|
* **JMap.Project.getSelectionColor**
|
|
5775
5732
|
*
|
|
@@ -5785,7 +5742,7 @@ export namespace JMap {
|
|
|
5785
5742
|
* JMap.Project.getSelectionColor()
|
|
5786
5743
|
* ```
|
|
5787
5744
|
*/
|
|
5788
|
-
function getSelectionColor(): string
|
|
5745
|
+
function getSelectionColor(): string | undefined
|
|
5789
5746
|
/**
|
|
5790
5747
|
* **JMap.Project.getBackgroundColor**
|
|
5791
5748
|
*
|
|
@@ -5799,7 +5756,7 @@ export namespace JMap {
|
|
|
5799
5756
|
* JMap.Project.getBackgroundColor()
|
|
5800
5757
|
* ```
|
|
5801
5758
|
*/
|
|
5802
|
-
function getBackgroundColor(): string
|
|
5759
|
+
function getBackgroundColor(): string | undefined
|
|
5803
5760
|
/**
|
|
5804
5761
|
* **JMap.Project.getInitialExtent**
|
|
5805
5762
|
*
|
package/public/jmap/map.d.ts
CHANGED
|
@@ -128,10 +128,7 @@ export type JMapSelection = {
|
|
|
128
128
|
[key in JId]: GeoJSON.Feature[]
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
export
|
|
132
|
-
code: string
|
|
133
|
-
name: string
|
|
134
|
-
}
|
|
131
|
+
export type JProjection = string
|
|
135
132
|
|
|
136
133
|
export interface JMapFeatureAttributeValues {
|
|
137
134
|
featureId: JId
|
|
@@ -203,9 +200,9 @@ export interface JMapFlashLocationParams {
|
|
|
203
200
|
|
|
204
201
|
export interface JBasemap {
|
|
205
202
|
id: string
|
|
206
|
-
|
|
203
|
+
name: string
|
|
207
204
|
tileUrls: string[]
|
|
208
|
-
|
|
205
|
+
imageUrl?: string
|
|
209
206
|
scheme?: JMAP_RASTER_SCHEME_TYPES
|
|
210
207
|
minzoom?: number
|
|
211
208
|
maxzoom?: number
|
package/public/jmap/project.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LOCALES } from "jmapcloud-types"
|
|
2
|
+
import type { components as McsComponents } from "jmapcloud-types/generated/mcs-generated"
|
|
1
3
|
import type { JBounds } from "./geometry.d.ts"
|
|
2
|
-
import type {
|
|
3
|
-
import type { JMAP_DISTANCE_UNITS, JProjection } from "./map.d.ts"
|
|
4
|
+
import type { JMAP_DISTANCE_UNITS } from "./map.d.ts"
|
|
4
5
|
export {}
|
|
5
6
|
// ALL_TERRAIN_ILLUMINATION_ANCHOR_TYPES in all-enum.ts
|
|
6
7
|
export const enum JTERRAIN_ILLUMINATION_ANCHOR_TYPES {
|
|
@@ -30,26 +31,19 @@ export interface JProjectServerExtension {
|
|
|
30
31
|
version: string
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
export interface JProject
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
initialRotation: number
|
|
39
|
-
colorSelection: string
|
|
40
|
-
colorBackground: string
|
|
41
|
-
terrain?: JTerrainSpecification
|
|
42
|
-
initialExtent: JBounds | null
|
|
34
|
+
export interface JProject extends Omit<
|
|
35
|
+
McsComponents["schemas"]["LocalizedProjectDTO"],
|
|
36
|
+
"mapUnit" | "distanceUnit" | "displayUnit" | "initialExtent" | "maximumExtent" | "terrain"
|
|
37
|
+
> {
|
|
38
|
+
defaultLanguage: LOCALES
|
|
43
39
|
mapUnit: JMAP_DISTANCE_UNITS
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
defaultDistanceUnit: JMAP_DISTANCE_UNITS
|
|
40
|
+
distanceUnit: JMAP_DISTANCE_UNITS
|
|
41
|
+
displayUnit: JMAP_DISTANCE_UNITS
|
|
42
|
+
initialExtent: JBounds | null
|
|
43
|
+
maximumExtent: JBounds | null
|
|
44
|
+
terrain?: JTerrainSpecification
|
|
50
45
|
base64ImageThumbnail: string
|
|
51
46
|
extensions: JProjectServerExtension[]
|
|
52
|
-
usageStatisticsActive: boolean
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
export interface JTerrainSpecification {
|
|
@@ -506,35 +506,4 @@ export interface JCoreOptions {
|
|
|
506
506
|
* For example NG don't need NG Core minimal UI and use this option.
|
|
507
507
|
*/
|
|
508
508
|
hideMainLayout?: boolean
|
|
509
|
-
/**
|
|
510
|
-
* If true, no basemap will be available/displayed.
|
|
511
|
-
* In JMap Cloud NG, no basemap panel will be displayed in the left panel
|
|
512
|
-
*/
|
|
513
|
-
disableBasemaps?: boolean
|
|
514
|
-
/**
|
|
515
|
-
* A basemap id.
|
|
516
|
-
*
|
|
517
|
-
* If provided, will use the corresponding basemap as the default basemap.
|
|
518
|
-
*
|
|
519
|
-
* If the id is unknown, will do nothing. To get all basemaps ids in the project, use [JMap.Map.Basemap.getAllIds](../functions/JMap_Cloud_NG_Core___API.JMap.Map.Basemap.getAllIds.html)
|
|
520
|
-
*
|
|
521
|
-
* Using the id "none" will use no basemap at startup.
|
|
522
|
-
*
|
|
523
|
-
* ```html
|
|
524
|
-
* <html>
|
|
525
|
-
* ...
|
|
526
|
-
* <body>
|
|
527
|
-
* <script type="text/javascript">
|
|
528
|
-
* window.JMAP_OPTIONS = {
|
|
529
|
-
* ...
|
|
530
|
-
* // disable the default basemap
|
|
531
|
-
* defaultBasemapId: "none"
|
|
532
|
-
* }
|
|
533
|
-
* </script>
|
|
534
|
-
* ...
|
|
535
|
-
* </body>
|
|
536
|
-
* </html>
|
|
537
|
-
* ```
|
|
538
|
-
*/
|
|
539
|
-
defaultBasemapId?: string
|
|
540
509
|
}
|