@mint-ui/map 0.3.1-beta → 0.3.3-beta

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.
@@ -15,4 +15,4 @@ export interface ClusterStatus {
15
15
  max: number;
16
16
  }
17
17
  export declare type ClusterSizeCalculator = (info: ClusterInfo, status: ClusterStatus) => number;
18
- export declare const getClusterInfo: (basePixelSize: number, mapBounds: Bounds, mapWidth: number, mapHeight: number, itemList: Position[], sizeFunction?: ClusterSizeCalculator) => (ClusterInfo[] | Bounds[])[];
18
+ export declare const getClusterInfo: (basePixelSize: number, mapBounds: Bounds, mapWidth: number, mapHeight: number, itemList: Position[], sizeFunction?: ClusterSizeCalculator) => ClusterInfo[];
@@ -11,7 +11,6 @@ var getClusterInfo = function (basePixelSize, mapBounds, mapWidth, mapHeight, it
11
11
  var colCount = Number((mapHeight / basePixelSize).toFixed(0)) || 1;
12
12
  var boundsLineSizeX = Number(((mapBounds.ne.lng - mapBounds.nw.lng) / rowCount).toFixed(7));
13
13
  var boundsLineSizeY = Number(((mapBounds.nw.lat - mapBounds.se.lat) / colCount).toFixed(7));
14
- var boundsList = [];
15
14
  var boundsPos = [];
16
15
  var tempX1, tempY1, tempX2, tempY2;
17
16
 
@@ -35,7 +34,6 @@ var getClusterInfo = function (basePixelSize, mapBounds, mapWidth, mapHeight, it
35
34
  itemList: includedList,
36
35
  size: basePixelSize
37
36
  });
38
- boundsList.push(thisBounds);
39
37
  }
40
38
  }
41
39
 
@@ -122,7 +120,7 @@ var getClusterInfo = function (basePixelSize, mapBounds, mapWidth, mapHeight, it
122
120
  center.size = sizeFunction(center, status);
123
121
  }
124
122
 
125
- return [centerList, boundsList];
123
+ return centerList;
126
124
  };
127
125
 
128
126
  var calculateAverage = function (nums) {
@@ -387,6 +387,7 @@ var GoogleMintMapController = function (_super) {
387
387
  gestureHandling: 'greedy',
388
388
  clickableIcons: false
389
389
  });
390
+ this.map = map;
390
391
  map.addListener('idle', function () {
391
392
  _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
392
393
  });
@@ -407,7 +408,6 @@ var GoogleMintMapController = function (_super) {
407
408
 
408
409
  _this.mapProps.onMouseMove(pos);
409
410
  });
410
- this.map = map;
411
411
  this.mapInitialized = true;
412
412
  console.log("".concat(this.type, " map script initialized"), divElement);
413
413
  resolve(map);
@@ -415,6 +415,7 @@ var NaverMintMapController = function (_super) {
415
415
  options.minZoom = minZoom;
416
416
  options.maxZoom = maxZoom;
417
417
  map = new naver.maps.Map(divElement, options);
418
+ this.map = map;
418
419
  map.addListener('dragstart', function (e) {
419
420
  _this.dragStartPoint[0] = e.domEvent.clientX;
420
421
  _this.dragStartPoint[1] = e.domEvent.clientY;
@@ -446,11 +447,11 @@ var NaverMintMapController = function (_super) {
446
447
 
447
448
  _this.mapProps.onMouseMove(pos);
448
449
  });
449
- this.map = map;
450
450
  this.mapInitialized = true;
451
451
  this.initMarkerPool();
452
452
  console.log("".concat(this.type, " map script initialized"), divElement);
453
453
  resolve(map);
454
+ map.trigger('idle');
454
455
  return [2];
455
456
  }
456
457
  });
package/dist/index.es.js CHANGED
@@ -812,6 +812,7 @@ var NaverMintMapController = function (_super) {
812
812
  options.minZoom = minZoom;
813
813
  options.maxZoom = maxZoom;
814
814
  map = new naver.maps.Map(divElement, options);
815
+ this.map = map;
815
816
  map.addListener('dragstart', function (e) {
816
817
  _this.dragStartPoint[0] = e.domEvent.clientX;
817
818
  _this.dragStartPoint[1] = e.domEvent.clientY;
@@ -843,11 +844,11 @@ var NaverMintMapController = function (_super) {
843
844
 
844
845
  _this.mapProps.onMouseMove(pos);
845
846
  });
846
- this.map = map;
847
847
  this.mapInitialized = true;
848
848
  this.initMarkerPool();
849
849
  console.log("".concat(this.type, " map script initialized"), divElement);
850
850
  resolve(map);
851
+ map.trigger('idle');
851
852
  return [2];
852
853
  }
853
854
  });
@@ -1292,6 +1293,7 @@ var GoogleMintMapController = function (_super) {
1292
1293
  gestureHandling: 'greedy',
1293
1294
  clickableIcons: false
1294
1295
  });
1296
+ this.map = map;
1295
1297
  map.addListener('idle', function () {
1296
1298
  _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
1297
1299
  });
@@ -1312,7 +1314,6 @@ var GoogleMintMapController = function (_super) {
1312
1314
 
1313
1315
  _this.mapProps.onMouseMove(pos);
1314
1316
  });
1315
- this.map = map;
1316
1317
  this.mapInitialized = true;
1317
1318
  console.log("".concat(this.type, " map script initialized"), divElement);
1318
1319
  resolve(map);
@@ -2174,7 +2175,6 @@ var getClusterInfo = function (basePixelSize, mapBounds, mapWidth, mapHeight, it
2174
2175
  var colCount = Number((mapHeight / basePixelSize).toFixed(0)) || 1;
2175
2176
  var boundsLineSizeX = Number(((mapBounds.ne.lng - mapBounds.nw.lng) / rowCount).toFixed(7));
2176
2177
  var boundsLineSizeY = Number(((mapBounds.nw.lat - mapBounds.se.lat) / colCount).toFixed(7));
2177
- var boundsList = [];
2178
2178
  var boundsPos = [];
2179
2179
  var tempX1, tempY1, tempX2, tempY2;
2180
2180
 
@@ -2198,7 +2198,6 @@ var getClusterInfo = function (basePixelSize, mapBounds, mapWidth, mapHeight, it
2198
2198
  itemList: includedList,
2199
2199
  size: basePixelSize
2200
2200
  });
2201
- boundsList.push(thisBounds);
2202
2201
  }
2203
2202
  }
2204
2203
 
@@ -2285,7 +2284,7 @@ var getClusterInfo = function (basePixelSize, mapBounds, mapWidth, mapHeight, it
2285
2284
  center.size = sizeFunction(center, status);
2286
2285
  }
2287
2286
 
2288
- return [centerList, boundsList];
2287
+ return centerList;
2289
2288
  };
2290
2289
 
2291
2290
  var calculateAverage = function (nums) {
package/dist/index.umd.js CHANGED
@@ -817,6 +817,7 @@
817
817
  options.minZoom = minZoom;
818
818
  options.maxZoom = maxZoom;
819
819
  map = new naver.maps.Map(divElement, options);
820
+ this.map = map;
820
821
  map.addListener('dragstart', function (e) {
821
822
  _this.dragStartPoint[0] = e.domEvent.clientX;
822
823
  _this.dragStartPoint[1] = e.domEvent.clientY;
@@ -848,11 +849,11 @@
848
849
 
849
850
  _this.mapProps.onMouseMove(pos);
850
851
  });
851
- this.map = map;
852
852
  this.mapInitialized = true;
853
853
  this.initMarkerPool();
854
854
  console.log("".concat(this.type, " map script initialized"), divElement);
855
855
  resolve(map);
856
+ map.trigger('idle');
856
857
  return [2];
857
858
  }
858
859
  });
@@ -1297,6 +1298,7 @@
1297
1298
  gestureHandling: 'greedy',
1298
1299
  clickableIcons: false
1299
1300
  });
1301
+ this.map = map;
1300
1302
  map.addListener('idle', function () {
1301
1303
  _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
1302
1304
  });
@@ -1317,7 +1319,6 @@
1317
1319
 
1318
1320
  _this.mapProps.onMouseMove(pos);
1319
1321
  });
1320
- this.map = map;
1321
1322
  this.mapInitialized = true;
1322
1323
  console.log("".concat(this.type, " map script initialized"), divElement);
1323
1324
  resolve(map);
@@ -2179,7 +2180,6 @@
2179
2180
  var colCount = Number((mapHeight / basePixelSize).toFixed(0)) || 1;
2180
2181
  var boundsLineSizeX = Number(((mapBounds.ne.lng - mapBounds.nw.lng) / rowCount).toFixed(7));
2181
2182
  var boundsLineSizeY = Number(((mapBounds.nw.lat - mapBounds.se.lat) / colCount).toFixed(7));
2182
- var boundsList = [];
2183
2183
  var boundsPos = [];
2184
2184
  var tempX1, tempY1, tempX2, tempY2;
2185
2185
 
@@ -2203,7 +2203,6 @@
2203
2203
  itemList: includedList,
2204
2204
  size: basePixelSize
2205
2205
  });
2206
- boundsList.push(thisBounds);
2207
2206
  }
2208
2207
  }
2209
2208
 
@@ -2290,7 +2289,7 @@
2290
2289
  center.size = sizeFunction(center, status);
2291
2290
  }
2292
2291
 
2293
- return [centerList, boundsList];
2292
+ return centerList;
2294
2293
  };
2295
2294
 
2296
2295
  var calculateAverage = function (nums) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mint-ui/map",
3
- "version": "0.3.1-beta",
3
+ "version": "0.3.3-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "browser": "./dist/index.umd.js",