my-openlayer 0.1.14 → 0.1.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.
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import Map from "ol/Map";
5
5
  import { Tile as TileLayer } from "ol/layer";
6
+ import { TileWMS } from "ol/source";
6
7
  import WMTSTileGrid from "ol/tilegrid/WMTS";
7
8
  import XYZ from "ol/source/XYZ";
8
9
  import { MapLayersOptions, TiandituType, AnnotationLayerOptions } from "../types";
@@ -20,7 +21,7 @@ export default class MapBaseLayers {
20
21
  addGeoServerLayer(url: string, layer: string, options: {
21
22
  zIndex?: number;
22
23
  visible?: boolean;
23
- }): string;
24
+ }): TileLayer<TileWMS>;
24
25
  static getTiandiTuLayer(options: {
25
26
  type: TiandituType;
26
27
  token: string;
@@ -124,7 +124,7 @@ export default class MapBaseLayers {
124
124
  visible: options.visible ?? true,
125
125
  });
126
126
  this.map.addLayer(wmsLayer);
127
- return layer;
127
+ return wmsLayer;
128
128
  }
129
129
  //img_c 影像底图 ter_c 地形底图
130
130
  static getTiandiTuLayer(options) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "my-openlayer",
3
3
  "private": false,
4
- "version": "0.1.14",
4
+ "version": "0.1.15",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",