jmapcloud-ng-types 1.0.13 → 1.0.15

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 CHANGED
@@ -357,7 +357,11 @@ export interface JAppPrintService {
357
357
  getFileType(): JAPP_PRINT_FILE_TYPES
358
358
  setHiResolution(isHiResolution: boolean): void
359
359
  getHiResolution(): boolean
360
- takeCapture(returnAsScreenCaptureResult?: boolean): Promise<void | JAppPrintCaptureResult>
360
+ takeCapture(
361
+ returnAsScreenCaptureResult?: boolean,
362
+ customRatioWidth?: number,
363
+ customRatioHeight?: number
364
+ ): Promise<void | JAppPrintCaptureResult>
361
365
  }
362
366
 
363
367
  export interface JAppLayerService {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapcloud-ng-types",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "JMap Cloud specific version of JMap Cloud NG types and interfaces",
5
5
  "main": "src/app.ts",
6
6
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  "homepage": "https://github.com/k2geospatial/jmapcloud-ng-types#readme",
24
24
  "devDependencies": {
25
25
  "@types/react": "^18.3.2",
26
- "jmapcloud-ng-core-types": "1.0.11",
26
+ "jmapcloud-ng-core-types": "1.0.12",
27
27
  "maplibre-gl": "^4.3.1",
28
28
  "react": "^18.3.1",
29
29
  "typedoc": "^0.25.13"
package/public/app.d.ts CHANGED
@@ -2406,8 +2406,10 @@ declare namespace JMap {
2406
2406
  *
2407
2407
  * Builds a screen capture of the map and launches the download of the file, or returns the screen capture as a data url embeded in a {@link JAppPrintCaptureResult}
2408
2408
  * @param returnAsScreenCaptureResult if true, the method will resolve with a {@link JAppPrintCaptureResult} that you can use to embed the image in an HTML page, otherwise the method will resolve with no result
2409
+ * @param customRatioWidth The custom ratio width. When both customRatioWidth and customRatioHeight are specified, the captured image will be using a custom paper format having the aspect ratio defined by the specified width/height. returnAsScreenCaptureResult must be set to "true" for this parameter to be taken into account
2410
+ * @param customRatioHeight The custom ratio height. returnAsScreenCaptureResult must be set to "true" for this parameters to be taken into account
2409
2411
  *
2410
- * When passing `returnAsScreenCaptureResult = true`, The screen capture process will take into account all Print parameters defined in the Print panel, including page format, scale, North arrow, title, sub-title, etc, but with the following limitations:
2412
+ * When passing `returnAsScreenCaptureResult = true`, the screen capture process will take into account all Print parameters defined in the Print panel, including page format, scale, North arrow, title, sub-title, etc, but with the following limitations:
2411
2413
  *
2412
2414
  * * the image format returned will always be PNG
2413
2415
  * * If you want the Print panel overlays be present in the screen capture, you must programaticaly switch to the Print panel before calling JMap.Application.Print.takeCapture(true), otherwise only the map will be captured
@@ -2419,7 +2421,7 @@ declare namespace JMap {
2419
2421
  * JMap.Application.Print.takeCapture()
2420
2422
  *
2421
2423
  * // add an image to a document with the print result
2422
- * JMap.Application.Print.takeCapture(true).then(
2424
+ * JMap.Application.Print.takeCapture(true, 400, 200).then(
2423
2425
  * printCaptureResult => {
2424
2426
  * const img = document.createElement("img")
2425
2427
  * img.src = printCaptureResult.dataUrl
@@ -2434,7 +2436,11 @@ declare namespace JMap {
2434
2436
  * )
2435
2437
  * ```
2436
2438
  */
2437
- function takeCapture(returnAsScreenCaptureResult?: boolean): Promise<void | JAppPrintCaptureResult>
2439
+ function takeCapture(
2440
+ returnAsScreenCaptureResult?: boolean,
2441
+ customRatioWidth?: number,
2442
+ customRatioHeight?: number
2443
+ ): Promise<void | JAppPrintCaptureResult>
2438
2444
  }
2439
2445
 
2440
2446
  /**
package/public/print.d.ts CHANGED
@@ -10,7 +10,8 @@ declare const enum JAPP_PRINT_PAPER_SIZES {
10
10
  LETTER = "letter",
11
11
  LEGAL = "legal",
12
12
  A3 = "a3",
13
- A4 = "a4"
13
+ A4 = "a4",
14
+ CUSTOM = "custom"
14
15
  }
15
16
 
16
17
  // ALL_APP_PRINT_LEGEND_POSITION in all-enum.ts