单项选择题

微信小程序中要获得位置信息需要使用wx对象的哪个函数?()

A.wx.navigateTo()
B.wx.login()
C.wx.stopPullDownRefresh()
D.wx.getLocation()