问题
I search for this error but there isn't any solution to solve it. some similar questions and solutions are available but in case of 400,404 and other responses. but I've no response!!
I'm using mac and my location accessing and other permissions are guaranteed browsers for using location services. So I can use my chrome or safari location services in other pages.
window.navigator.geolocation.getCurrentPosition(console.log, console.log, {timeout:5000})
an easy way to access user location but the response was: "Network location provider at 'https://www.googleapis.com/': No response received."
Is there any way to use another location services instead of googleapis in browser?
回答1:
works fine for me. Could it be you are just not looking at the returned promise?
window.navigator.geolocation.getCurrentPosition((res)=>{console.log(res)}, (err)=>{}, {timeout:5000})
also: This feature only works over HTTPS. Local development enviornment? https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API
回答2:
I think there is another problem with this action.
Unfortunately, Google closed the developer's access API from some country like Iran.
So, I must find another way to get the user location.
来源:https://stackoverflow.com/questions/62670186/geolocation-network-location-provider-at-https-www-googleapis-com-no-re