Hi All,
We are trying to get geo Position from browser using code snippet as given below.
navigator.geolocation.getCurrentPosition(function(position) {
mapCenterLon = position.coords.longitude;
mapCenterLat = position.coords.latitude;
mapZoom = 10;
// We are setting map properties in this API.
setCenterAndZoom(map, mapCenterLon, mapCenterLat, mapZoom);
But chrome gives a warning as given below and do not take to required location.
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS.
Any suggestions ?