cd-mapgis 1.0.22 → 1.0.23

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/MapView.js +5 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cd-mapgis",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "main": "./src/index.js",
5
5
  "types": "./src/index.d.ts",
6
6
  "type": "module",
package/src/MapView.js CHANGED
@@ -139,16 +139,14 @@ export default class MapView {
139
139
  var newMaxY = centerY + newHeight / 2;
140
140
  return [newMinX, newMinY, newMaxX, newMaxY];
141
141
  }
142
- setCenter(center,useAnimation){
143
- if(useAnimation){
144
- this.map.getView().animate({
145
- center: fromLonLat(center)
146
- });
147
- }else{
142
+ setCenter(center, useAnimation) {
143
+ if (useAnimation) {
144
+ this.map.getView().animate({ center: center });
145
+ } else {
148
146
  this.map.getView().setCenter(center);
149
147
  }
150
148
  }
151
- setZoom(zoom){
149
+ setZoom(zoom) {
152
150
  this.map.getView().setZoom(zoom);
153
151
  }
154
152
  }