@ohuoy/easymap 1.1.7 → 1.1.9

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.js CHANGED
@@ -31,7 +31,9 @@ export class EasyMap {
31
31
  zoom:13,
32
32
  rotation:0,
33
33
  bearing:0,
34
- projection:'mercator'
34
+ projection:'mercator',
35
+ themeEvent:(e)=>{
36
+ }
35
37
  };
36
38
  //control
37
39
  ScaleControl = null;
@@ -43,9 +45,7 @@ export class EasyMap {
43
45
  'features':[]
44
46
  }
45
47
  labelLayer = null;
46
- themeEvent = ()=>{
47
-
48
- }
48
+
49
49
 
50
50
 
51
51
  constructor(target,styleUrl,config) {
@@ -96,7 +96,7 @@ export class EasyMap {
96
96
  // this.map.currentTheme = new Proxy(_currentTheme,)
97
97
  this.target = map.target;
98
98
  let that = this;
99
- this.map.theme = observe({value:""},this.themeEvent)
99
+ this.map.theme = observe({value:""},this.config.themeEvent)
100
100
  this.map.on('load',()=>{
101
101
  this.map.theme.value = this.map.style.stylesheet.theme
102
102
  // console.log(this.map)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohuoy/easymap",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "self map easy use",
5
5
  "main": "main.js",
6
6
  "scripts": {
@@ -146,7 +146,7 @@ export default class TilesBar {
146
146
  // },beforeId)
147
147
  // this._map.theme.value = "dark"
148
148
  // };
149
- this._map.theme.value = "dark"
149
+ this._map.theme.value = this._map.style.stylesheet.theme
150
150
  }
151
151
  if(key == 'satellite'){
152
152
  //移除基本图层