jmapcloud-ng-core-types 1.0.14 → 1.0.16
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/index.ts +2 -0
- package/package.json +1 -1
- package/public/core.d.ts +46 -2
- package/public/jmap/layer.d.ts +4 -1
- package/public/jmap/project.d.ts +1 -1
package/index.ts
CHANGED
|
@@ -855,6 +855,8 @@ export interface JProjectService {
|
|
|
855
855
|
isChangeDisabled(): boolean
|
|
856
856
|
setChangeEnabled(): void
|
|
857
857
|
setChangeDisabled(): void
|
|
858
|
+
getElevationAtLocation(location: JLocation): Promise<number | null>
|
|
859
|
+
hasTerrain(): boolean
|
|
858
860
|
}
|
|
859
861
|
|
|
860
862
|
export interface JLayerService {
|
package/package.json
CHANGED
package/public/core.d.ts
CHANGED
|
@@ -806,10 +806,10 @@ declare namespace JMap {
|
|
|
806
806
|
*
|
|
807
807
|
* The {@link JLayerAddThematicParams} parameter that you must provide include those properties:
|
|
808
808
|
* * the JMap Cloud layer id
|
|
809
|
-
* * a {@link
|
|
809
|
+
* * a {@link JLayerUserStyleRule} specification
|
|
810
810
|
* * an array of {@link JLayerSetStyleParams}
|
|
811
811
|
*
|
|
812
|
-
* The id of the thematic that will be created will be the same id than the {@link
|
|
812
|
+
* The id of the thematic that will be created will be the same id than the {@link JLayerUserStyleRule} that you provided.
|
|
813
813
|
*
|
|
814
814
|
* All objects that you provide that require an id should have a unique uuid v4 id. Many programming languages let you generate such ids.
|
|
815
815
|
*
|
|
@@ -6055,6 +6055,50 @@ declare namespace JMap {
|
|
|
6055
6055
|
* ```
|
|
6056
6056
|
*/
|
|
6057
6057
|
function setChangeDisabled(): void
|
|
6058
|
+
|
|
6059
|
+
/**
|
|
6060
|
+
* **JMap.Project.getElevationAtLocation**
|
|
6061
|
+
*
|
|
6062
|
+
* Gets the elevation of the Terrain associated with the project for the given location.
|
|
6063
|
+
*
|
|
6064
|
+
* @throws if location is invalid or if there is no terrain associated with the project.
|
|
6065
|
+
* @param location
|
|
6066
|
+
* @return the elevation at the given location, or null if no elevation data is available at that location.
|
|
6067
|
+
* @example
|
|
6068
|
+
* ```ts
|
|
6069
|
+
* // get the elevation
|
|
6070
|
+
* if (JMap.Project.hasTerrain()) {
|
|
6071
|
+
* JMap.Project.getElevationAtLocation({x:-73.591205, y:45.505216})
|
|
6072
|
+
* .then(elevation => {
|
|
6073
|
+
* if(elevation !== null){
|
|
6074
|
+
* console.log(`Elevation at x:-73.591205, y:45.505216 is ${elevation}`)
|
|
6075
|
+
* }else{
|
|
6076
|
+
* console.log("No elevation data available for location x:-73.591205, y:45.505216")
|
|
6077
|
+
* }
|
|
6078
|
+
* })
|
|
6079
|
+
* }else{
|
|
6080
|
+
* console.log("there is no terrain associated with this project.")
|
|
6081
|
+
* }
|
|
6082
|
+
* ```
|
|
6083
|
+
*/
|
|
6084
|
+
function getElevationAtLocation(location: JLocation): Promise<number | null>
|
|
6085
|
+
|
|
6086
|
+
/**
|
|
6087
|
+
* **JMap.Project.hasTerrain**
|
|
6088
|
+
*
|
|
6089
|
+
* Returns true if a project is loaded and if a terrain is associated with the project, false otherwise
|
|
6090
|
+
*
|
|
6091
|
+
* @example
|
|
6092
|
+
* ```ts
|
|
6093
|
+
* // get the elevation
|
|
6094
|
+
* if (JMap.Project.hasTerrain()) {
|
|
6095
|
+
* console.log("A terrain is associated with this project.")
|
|
6096
|
+
* }else{
|
|
6097
|
+
* console.log("there is no project loaded, or no terrain associated with this project.")
|
|
6098
|
+
* }
|
|
6099
|
+
* ```
|
|
6100
|
+
*/
|
|
6101
|
+
function hasTerrain(): boolean
|
|
6058
6102
|
}
|
|
6059
6103
|
|
|
6060
6104
|
/**
|
package/public/jmap/layer.d.ts
CHANGED
|
@@ -444,6 +444,7 @@ declare interface JLayerStyleRule {
|
|
|
444
444
|
id: string
|
|
445
445
|
layerId: string
|
|
446
446
|
active: boolean
|
|
447
|
+
defaultRule: boolean
|
|
447
448
|
name: string
|
|
448
449
|
conditions: JLayerStyleRuleCondition[]
|
|
449
450
|
}
|
|
@@ -533,9 +534,11 @@ declare interface JLayerTextStyle extends JLayerBaseStyle {
|
|
|
533
534
|
italic: boolean
|
|
534
535
|
}
|
|
535
536
|
|
|
537
|
+
declare type JLayerUserStyleRule = Omit<JLayerStyleRule, "defaultRule">
|
|
538
|
+
|
|
536
539
|
declare type JLayerAddThematicParams = {
|
|
537
540
|
layerId: JId
|
|
538
|
-
styleRule:
|
|
541
|
+
styleRule: JLayerUserStyleRule
|
|
539
542
|
styles: JLayerSetStyleParams[]
|
|
540
543
|
}
|
|
541
544
|
|
package/public/jmap/project.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ declare interface JProject {
|
|
|
34
34
|
initialRotation: number
|
|
35
35
|
colorSelection: string
|
|
36
36
|
colorBackground: string
|
|
37
|
-
terrainRasterDataSourceId?: JId
|
|
38
37
|
terrain?: JTerrainSpecification
|
|
39
38
|
initialExtent: JBounds | null
|
|
40
39
|
minimumVisibleZoom: number
|
|
@@ -53,6 +52,7 @@ declare interface JProject {
|
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
declare interface JTerrainSpecification {
|
|
55
|
+
dataSourceId?: string
|
|
56
56
|
terrainExaggeration?: number
|
|
57
57
|
hillshadeExaggeration?: number
|
|
58
58
|
hillshadeIlluminationDirection?: number
|