Amap failed to locate in 4G mode IOS, Android succeeded.

call Amap javascriptAPI failed to locate in 4G mode on iPhone, unable to obtain location information (the website has been upgraded to https,wifi mode, but the location is normal!) Android is normal to solve

// 
$(".bottom-btn").on("click",".img",function(){
  console.log("")
  map.plugin("AMap.Geolocation", function () {
  // geolocation 
  const geolocation = new AMap.Geolocation({
    enableHighAccuracy: true, //:true
    timeout: 10000, //10:
    buttonOffset: new AMap.Pixel(10, 20), //:Pixel(10, 20)
    zoomToAccuracy: false, //:false
    buttonPosition: "LB",
    useNative: true,
    convert:true,
    showMarker: true, //:true
    showCircle: true, //:true
    panToLocation: true, //:true
  });
  map.addControl(geolocation);
  geolocation.getCurrentPosition();
  AMap.event.addListener(geolocation, "complete", onComplete); //
  AMap.event.addListener(geolocation, "error", onError); //
});

Mar.11,2022

Hello, have you solved this problem on my side now? this problem was originally http when IOS was not available for OK Android. After upgrading https, Android can go down and ios can't do it.

Menu