jmapcloud-ng-core-types 1.0.15 → 1.0.17
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 +45 -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
|
@@ -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
|
/**
|
|
@@ -8887,7 +8931,7 @@ declare namespace JMap {
|
|
|
8887
8931
|
/**
|
|
8888
8932
|
* ***JMap.Event.Map.on.mapLoad***
|
|
8889
8933
|
*
|
|
8890
|
-
* This event is triggered when
|
|
8934
|
+
* This event is triggered when the map is created and ready.
|
|
8891
8935
|
*
|
|
8892
8936
|
* @param listenerId Your listener id (must be unique for all map events)
|
|
8893
8937
|
* @param fn Your listener function
|
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
|