cesium-mars-op-cog 0.1.0

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 ADDED
@@ -0,0 +1,42 @@
1
+ # .
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Recommended Browser Setup
10
+
11
+ - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
+ - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
+ - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
+ - Firefox:
15
+ - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
+ - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
17
+
18
+ ## Type Support for `.vue` Imports in TS
19
+
20
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
21
+
22
+ ## Customize configuration
23
+
24
+ See [Vite Configuration Reference](https://vite.dev/config/).
25
+
26
+ ## Project Setup
27
+
28
+ ```sh
29
+ npm install
30
+ ```
31
+
32
+ ### Compile and Hot-Reload for Development
33
+
34
+ ```sh
35
+ npm run dev
36
+ ```
37
+
38
+ ### Type-Check, Compile and Minify for Production
39
+
40
+ ```sh
41
+ npm run build
42
+ ```
@@ -0,0 +1,31 @@
1
+ /**
2
+ * OpenLayers 适配器 — 将 COG 影像加载为 OpenLayers TileLayer
3
+ *
4
+ * 用法:
5
+ * import { addCogLayerToOpenLayers } from '@cog/cesium'
6
+ * const layer = await addCogLayerToOpenLayers(olMap, 'http://.../image.tif')
7
+ * layer.setOpacity(0.5) // 原生 API
8
+ * olMap.removeLayer(layer)
9
+ */
10
+ import type { CogProviderOptions } from '../core/provider';
11
+ /** OpenLayers 地图最小接口 */
12
+ interface OpenLayersMap {
13
+ addLayer(layer: any): void;
14
+ removeLayer(layer: any): void;
15
+ getView(): any;
16
+ }
17
+ /** addCogLayerToOpenLayers 选项 */
18
+ export interface OpenLayersLayerOptions extends CogProviderOptions {
19
+ /** 图层透明度 0-1(默认 1.0) */
20
+ opacity?: number;
21
+ }
22
+ /**
23
+ * 将 COG 影像添加到 OpenLayers 地图
24
+ *
25
+ * @param map OpenLayers 地图实例
26
+ * @param url COG 文件地址
27
+ * @param options 配置选项
28
+ * @returns OpenLayers TileLayer,可通过原生 API 操控
29
+ */
30
+ export declare function addCogLayerToOpenLayers(map: OpenLayersMap, url: string, options?: OpenLayersLayerOptions): Promise<any>;
31
+ export {};