jmapserver-ng-core-types 2.0.9 → 2.0.1000
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 +4 -4
- package/package.json +1 -1
- package/public/core.d.ts +8 -14
- package/public/jmap/layer.d.ts +1 -0
package/index.ts
CHANGED
|
@@ -710,7 +710,7 @@ export interface JMapService {
|
|
|
710
710
|
flashLocation(location: JLocation, options?: JMapFlashLocationParams): void
|
|
711
711
|
flashLocations(locations: JLocation[], options?: JMapFlashLocationParams): void
|
|
712
712
|
clearFlashingLocations(): void
|
|
713
|
-
displayLayerExtent(layerId: JId, params?: JDisplayExtentParams):
|
|
713
|
+
displayLayerExtent(layerId: JId, params?: JDisplayExtentParams): boolean
|
|
714
714
|
displayExtent(extent: JBoundaryBox, params?: JDisplayExtentParams): void
|
|
715
715
|
getResolution(params?: JLatitudeAndZoom): number
|
|
716
716
|
getScale(params?: JLatitudeAndZoom): string
|
|
@@ -796,8 +796,8 @@ export interface JMapFilterService {
|
|
|
796
796
|
}
|
|
797
797
|
|
|
798
798
|
export interface JProjectionService {
|
|
799
|
-
reprojectLocation(location: JLocation, toProjection: string, fromProjection?: string): JLocation
|
|
800
|
-
reprojectBoundaryBox(boundaryBox: JBoundaryBox, toProjection: string, fromProjection?: string): JBoundaryBox
|
|
799
|
+
reprojectLocation(location: JLocation, toProjection: string, fromProjection?: string): Promise<JLocation>
|
|
800
|
+
reprojectBoundaryBox(boundaryBox: JBoundaryBox, toProjection: string, fromProjection?: string): Promise<JBoundaryBox>
|
|
801
801
|
}
|
|
802
802
|
|
|
803
803
|
export interface JProjectService {
|
|
@@ -848,7 +848,7 @@ export interface JLayerService {
|
|
|
848
848
|
getSelfOrChildren(layerId: JId): JLayer[]
|
|
849
849
|
getName(layerId: JId): string
|
|
850
850
|
getDescription(layerId: JId): string
|
|
851
|
-
getEPSG4326Extent(layerId: JId):
|
|
851
|
+
getEPSG4326Extent(layerId: JId): JBoundaryBox | null
|
|
852
852
|
isVisible(layerId: JId, checkParentVisibility?: boolean): boolean
|
|
853
853
|
isVectorLayerById(layerId: JId): boolean
|
|
854
854
|
isSelectableById(layerId: JId): boolean
|
package/package.json
CHANGED
package/public/core.d.ts
CHANGED
|
@@ -1885,23 +1885,17 @@ declare namespace JMap {
|
|
|
1885
1885
|
*
|
|
1886
1886
|
* Returns the extent of the layer in ESPG:4326 coordinates
|
|
1887
1887
|
*
|
|
1888
|
-
* With a JMap Cloud server, a call is made to the server.
|
|
1889
|
-
*
|
|
1890
|
-
* With a JMap 7 server, no call to server is made, returns the cached extent.
|
|
1891
|
-
*
|
|
1892
1888
|
* @example ```ts
|
|
1893
1889
|
*
|
|
1894
1890
|
* // returns the bounding box (JBoundaryBox) of the layer ID 3 in decimal degrees
|
|
1895
|
-
*
|
|
1896
|
-
*
|
|
1897
|
-
* .then(extent => console.info("Extent of layer id=3", extent))
|
|
1898
|
-
* .catch(error => console.error(error))
|
|
1891
|
+
*
|
|
1892
|
+
* console.log("WGS84 extent of layer id="3" is: ", JMap.Layer.getEPSG4326Extent(3))
|
|
1899
1893
|
* ```
|
|
1900
1894
|
*
|
|
1901
|
-
* @throws Error if no layer found for the id
|
|
1895
|
+
* @throws Error if no layer found for the id or if layer is a group
|
|
1902
1896
|
* @param layerId The JMap layer id
|
|
1903
1897
|
*/
|
|
1904
|
-
function getEPSG4326Extent(layerId: JId):
|
|
1898
|
+
function getEPSG4326Extent(layerId: JId): JBoundaryBox | null
|
|
1905
1899
|
|
|
1906
1900
|
/**
|
|
1907
1901
|
* **JMap.Layer.isVisible**
|
|
@@ -3821,14 +3815,14 @@ declare namespace JMap {
|
|
|
3821
3815
|
*
|
|
3822
3816
|
* @param layerId a layer Id
|
|
3823
3817
|
* @param params (see example)
|
|
3824
|
-
* @returns
|
|
3818
|
+
* @returns true if the layer has an extent or false otherwise.
|
|
3825
3819
|
* @example ```ts
|
|
3826
3820
|
*
|
|
3827
3821
|
* // Move to layer 4 extent and display it for a few second
|
|
3828
3822
|
* JMap.Map.displayLayerExtent(4, {moveToExtent: true})
|
|
3829
3823
|
* ```
|
|
3830
3824
|
**/
|
|
3831
|
-
function displayLayerExtent(layerId: JId, params?: JDisplayExtentParams):
|
|
3825
|
+
function displayLayerExtent(layerId: JId, params?: JDisplayExtentParams): boolean
|
|
3832
3826
|
|
|
3833
3827
|
/**
|
|
3834
3828
|
* **JMap.Map.displayExtent**
|
|
@@ -5970,7 +5964,7 @@ declare namespace JMap {
|
|
|
5970
5964
|
* console.log("Long/lat location", longLatLocation)
|
|
5971
5965
|
* ```
|
|
5972
5966
|
*/
|
|
5973
|
-
function reprojectLocation(location: JLocation, toProjection: string, fromProjection?: string): JLocation
|
|
5967
|
+
function reprojectLocation(location: JLocation, toProjection: string, fromProjection?: string): Promise<JLocation>
|
|
5974
5968
|
|
|
5975
5969
|
/**
|
|
5976
5970
|
* ***JMap.Projection.reprojectBoundaryBox***
|
|
@@ -5998,7 +5992,7 @@ declare namespace JMap {
|
|
|
5998
5992
|
boundaryBox: JBoundaryBox,
|
|
5999
5993
|
toProjection: string,
|
|
6000
5994
|
fromProjection?: string
|
|
6001
|
-
): JBoundaryBox
|
|
5995
|
+
): Promise<JBoundaryBox>
|
|
6002
5996
|
}
|
|
6003
5997
|
|
|
6004
5998
|
/**
|
package/public/jmap/layer.d.ts
CHANGED
|
@@ -290,6 +290,7 @@ declare interface JLayer extends JLayerTreeElement {
|
|
|
290
290
|
thematics: JLayerThematic[]
|
|
291
291
|
queries: JQuery[]
|
|
292
292
|
extent: JBoundaryBox | null
|
|
293
|
+
wgs84Extent: JBoundaryBox | null
|
|
293
294
|
permissions: JLayerPermissions
|
|
294
295
|
canEditGeometry: boolean
|
|
295
296
|
hasAttributeForm: boolean
|