File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed
core/core-frontend/src/views/chart/components/js/panel/charts/map Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -139,30 +139,8 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
139
139
}
140
140
} )
141
141
} )
142
- scene . once ( 'loaded' , ( ) => {
143
- this . autoZoom ( symbolicLayer , scene )
144
- } )
145
- return new L7Wrapper ( scene , configList )
146
- }
147
142
148
- /**
149
- * 根据数据自动缩放大小及位置
150
- * @param symbolicLayer
151
- * @param scene
152
- */
153
- autoZoom = ( symbolicLayer , scene ) => {
154
- const roamMap = flag => {
155
- return flag ? scene . zoomIn ( ) : scene . zoomOut ( )
156
- }
157
- const resetZoom = ( ) => {
158
- symbolicLayer . fitBounds ( )
159
- }
160
- symbolicLayer && resetZoom ( )
161
- // 自动放大两级
162
- let index = 2
163
- while ( index -- ) {
164
- roamMap ( true )
165
- }
143
+ return new L7Wrapper ( scene , configList )
166
144
}
167
145
168
146
/**
@@ -199,7 +177,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
199
177
}
200
178
} )
201
179
: [ ]
202
- const pointLayer = new PointLayer ( )
180
+ const pointLayer = new PointLayer ( { autoFit : true } )
203
181
. source ( data , {
204
182
parser : {
205
183
type : 'json' ,
You can’t perform that action at this time.
0 commit comments