Issue with the geolocation code

This is a simple code snippet that is supposed to display the current location of the user. It does work perfectly on most of the devices, but doesn’t do the job on a few others (including my own cell phone) even though location access is allowed in the browser settings. Can anybody say why is this happening?

Hi,

The geo request is blocked by your browser (some browsers do this) because you are not using a secure connection. Use the browser console, this is where your errors show up.

you will see it works through ssl (https)

2 Likes

Oh yeah! I finally got to know what was going wrong here. Thanks a ton Mark!

2 Likes