Skip to content

Commit 2ffeee4

Browse files
authoredOct 25, 2024
feat: 定位改为使用maps默认定位 (#34)
1 parent 0316566 commit 2ffeee4

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed
 

‎harmony/maps/src/main/ets/AIRMaps/AIRMap.ets

-23
Original file line numberDiff line numberDiff line change
@@ -162,29 +162,6 @@ export struct AIRMap {
162162

163163
// 我的位置按钮
164164
this.mapController?.setMyLocationControlsEnabled(this.descriptor.rawProps.showsMyLocationButton);
165-
166-
// 首次设置我的位置
167-
geoLocationManager.getCurrentLocation().then((result) => {
168-
// 设置用户的位置
169-
let position: geoLocationManager.Location = {
170-
"latitude": result.latitude,
171-
"longitude": result.longitude,
172-
"altitude": 0,
173-
"accuracy": 0,
174-
"speed": 0,
175-
"timeStamp": 0,
176-
"direction": 0,
177-
"timeSinceBoot": 0,
178-
//fixme 6.14 liwang新增
179-
"altitudeAccuracy": 0,
180-
"speedAccuracy": 0,
181-
"directionAccuracy": 0,
182-
"uncertaintyOfTimeSinceBoot": 0,
183-
"sourceType": geoLocationManager.LocationSourceType.GNSS
184-
};
185-
this.mapController?.setMyLocation(position);
186-
this.animateToRegion({latitude: result.latitude, longitude: result.longitude}, 500);
187-
});
188165
}
189166
}
190167
MapsManager.getInstance().initMapComponentController(this.mapController)

0 commit comments

Comments
 (0)