I want to get accuracy value from inside the function and create if else statement with the accuracy. I don't understand how to get the accuracy value inside the function and pass it to outside of the function. This is my code:
function initMap(position) {
var latitude = position.coords.latitude,
longitude = position.coords.longitude,
accuracy = position.coords.accuracy;
var mapOptions = {
zoom: 18,
center: {
lat: latitude,
lng: longitude,
mapTypeId: google.maps.MapTypeId.ROADMAP
},
}
}