Wechat web page development, how to solve the positioning problem

problem description

recently opened Wechat web page, the project needs to use location function. So Amap jsApi was used. My phone is ios, the location is very normal, but when I switch to some Android phones, I can"t locate it, which directly indicates what geographic location permission is not available. But the mobile phone sets gps, ah, permissions, ah, these are all turned on. I would like to ask you how to solve the problem of Wechat web page development and positioning. Do you have to use Wechat sdk?


aren't you asking for trouble if you want to display a web page in Wechat but don't want to use sdk?


generic api . navigator.geolocation another restriction point is that the website domain name must start with https, otherwise ios cannot use

.
var getCurrentLocation = () => {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition, showError)
  } else {
    console.log('')
  }
}

var showPosition = (position) => {
  store.state.latitude = position.coords.latitude
  store.state.longitude = position.coords.longitude
  // Vue.prototype.$notify({
  //   mes: ':' + position.coords.latitude + ',' + position.coords.longitude
  // })
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9a1ca-47586.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9a1ca-47586.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?