@aapicoits/powermap-web-sdk 1.2.3 → 1.2.4
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 +5 -4
- package/dist/index.d.ts +3 -3
- package/dist/powermap-web-sdk.cjs.cjs +14 -14
- package/dist/powermap-web-sdk.js +2367 -2273
- package/dist/powermap-web-sdk.umd.cjs +28 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -148,7 +148,8 @@ When creating a `new PowerMap(options)`, the following options are available:
|
|
|
148
148
|
| `center` | `[lng, lat]` | `[100, 13]` | No | The initial center point of the map. |
|
|
149
149
|
| `zoom` | `number` | `14` | No | Total zoom level (0-22). |
|
|
150
150
|
| `baseUrl` | `string` | - | No | Optional proxy URL (e.g., `/api/proxy`). If set, the SDK will route all API requests through this URL. |
|
|
151
|
-
| `
|
|
151
|
+
| `style` | `string` | `'th'` | No | Initial map style theme (`'th'`, `'en'`, `'dark'`, `'gray'`, `'satellite'`, or custom URL). |
|
|
152
|
+
| `maptilerKey` | `string` | - | No | Optional MapTiler API Key (legacy fallback). |
|
|
152
153
|
| `previewOnly` | `boolean` | `false` | No | If **true**, the map will be non-interactive (no zoom, pan, rotate, or pitch). Perfect for static map previews. |
|
|
153
154
|
|
|
154
155
|
### Core Instance Methods
|
|
@@ -160,7 +161,7 @@ These methods are available on the `PowerMap` instance to manage the map state a
|
|
|
160
161
|
| `on(event, cb)` | `string, function` | Subscribe to any map event (see Section 9). |
|
|
161
162
|
| `off(event, cb)` | `string, function` | Unsubscribe from a previously registered event. |
|
|
162
163
|
| `setMode(mode, opts)` | `string, Object` | Switch between `'standard'` and `'indoor'` modes. |
|
|
163
|
-
| `setStyle(name)` | `string` | Change the map style (e.g., `'th'`, `'dark'`). |
|
|
164
|
+
| `setStyle(name)` | `string` | Change the map style (e.g., `'th'`, `'en'`, `'dark'`, `'gray'`, `'satellite'`). |
|
|
164
165
|
| `setNavigationControl(opts)` | `boolean\|Object` | Enable/disable or customize zoom/compass controls. |
|
|
165
166
|
| `setFullscreenControl(opts)` | `boolean\|Object` | Enable/disable fullscreen control. |
|
|
166
167
|
| `debug()` | - | Access the Debug Manager for telemetry and performance tools. |
|
|
@@ -552,8 +553,8 @@ map.hideLayer('pm-road-vt');
|
|
|
552
553
|
await map.toggleLayer('pm-road-vt');
|
|
553
554
|
```
|
|
554
555
|
|
|
555
|
-
> [!
|
|
556
|
-
> **Satellite Layer**: High-resolution satellite imagery (`pm-
|
|
556
|
+
> [!TIP]
|
|
557
|
+
> **Satellite Layer**: High-resolution satellite imagery is natively supported by PowerMap (`pm-satellite-layer`). You can enable it as a basemap via `map.setStyle('satellite')` or as an overlay layer via `map.layers.show('pm-satellite-layer')` (or `map.showLayer('satellite')`). It uses your standard `mapApiKey`.
|
|
557
558
|
|
|
558
559
|
---
|
|
559
560
|
|
package/dist/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export interface PowerMapOptions {
|
|
|
19
19
|
minZoom?: number;
|
|
20
20
|
/** Maximum zoom level */
|
|
21
21
|
maxZoom?: number;
|
|
22
|
-
/** Map style name: 'th' | 'en' | 'dark' | 'gray' or a custom style URL */
|
|
23
|
-
style?: 'th' | 'en' | 'dark' | 'gray' | string;
|
|
22
|
+
/** Map style name: 'th' | 'en' | 'dark' | 'gray' | 'satellite' or a custom style URL */
|
|
23
|
+
style?: 'th' | 'en' | 'dark' | 'gray' | 'satellite' | string;
|
|
24
24
|
/** API Key for map tiles */
|
|
25
25
|
mapApiKey: string;
|
|
26
26
|
/** Authentication credentials for services */
|
|
@@ -337,7 +337,7 @@ export declare class PowerMap {
|
|
|
337
337
|
onError(callback: (error: Error) => void): this;
|
|
338
338
|
|
|
339
339
|
// --- Map Style & Mode ---
|
|
340
|
-
setStyle(name: 'th' | 'en' | 'dark' | 'gray' | string): this;
|
|
340
|
+
setStyle(name: 'th' | 'en' | 'dark' | 'gray' | 'satellite' | string): this;
|
|
341
341
|
setMode(mode: PowerMapMode, options?: SetModeOptions): this;
|
|
342
342
|
|
|
343
343
|
// --- Controls ---
|