My current site is fully depends on the current location. Right now i am using geolocation for getting current location. But in current situation user is confused about the share location. So i want to created one custom pop-up (bootstrap) for get current location of the clients PC.
My current code is as below:
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition, error, {enableHighAccuracy:true,timeout:60000,maximumAge:0});
}
else {
console.log("Geolocation is not supported by this browser.");
}
}
function error(error) {
console.log(error);
}
function showPosition(position) {
var latitude = position.coords.latitude,
longitude = position.coords.longitude;
console.log(latitude);
console.log(longitude);
}
Please help me on this concern.