src/application.js
/**
 * Gets the current location and checks whether it is
 * within the limits
 */
Gets the current location and checks whether it is
within the limits
Gets the current location and checks whether it is within the limits
function geocodeByCurrentLocation () {
  var onSuccess = function (position) {
    latitude = position.coords.latitude
    longitude = position.coords.longitude
    loadLatLng(latitude, longitude)
  }
  var onError = function (err) {
    console.log(err)
    alert('Unable to retrieve current position. Geolocation may be disabled on this browser or unavailable on this system.')
    resetCurrentLocationButton()
  }
  getCurrentLocation(onSuccess, onError)
}
function geocodeByCurrentLocation ( ) { var onSuccess = function ( position ) { latitude = position . coords . latitude longitude = position . coords . longitude loadLatLng ( latitude , longitude ) } var onError = function ( err ) { console . log ( err ) alert ( 'Unable to retrieve current position. Geolocation may be disabled on this browser or unavailable on this system.' ) resetCurrentLocationButton ( ) } getCurrentLocation ( onSuccess , onError ) }
Gets the current location and checks whether it is
 within the limits
Gets the current location and checks whether it is within the limits
/* eslint-disable no-alert */