Skip to content

Commit

Permalink
refactor(map): h5 高德地图 内置浏览器调试容错 (question/156303)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyuWang committed Feb 1, 2023
1 parent cc79947 commit 5e8a033
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/platforms/h5/view/components/map/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,9 @@ export default {
this._location = location
refreshLocation()
this.__onCompassChange = function (res) {
location.setRotation(res.direction)
if ('setRotation' in location) {
location.setRotation(res.direction)
}
}
uni.onCompassChange(this.__onCompassChange)
},
Expand Down

0 comments on commit 5e8a033

Please sign in to comment.