0

I am getting my Localisation on Leaflet map using the extension. Leaflet.Locate

When I am on my local server it works fine like shown bellow: enter image description here

But when I am on a remote server I get this error. enter image description here How to solve this.

1 Answer 1

4

Most browsers now disable geolocation unless you are connected to a secure server ('https' vs 'http'). This is a sensible precaution for personal protection among other things.

To over come this you need to connect to a secure server or, if you are developing the server yourself, you need to implement https. To do that you will need to get signed certificates to authenticate your server. Have a look at LetsEncrypt. There are paid-for solutions available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.