src/entity/Action.js
/**
 * Fill action location with coordinates from browser's Geolocation API.
 *
 * @param {Object} data - Action data
 * @param {Object} position - Geolocation API position coordinates
 * @return {Object} - New action data
 */
Fill action location with coordinates from browser's Geolocation API.
@param {Object} data - Action data
@param {Object} position - Geolocation API position coordinates
@return {Object} - New action data
Fill action location with coordinates from browser ' s Geolocation API . @param { Object } data - Action data @param { Object } position - Geolocation API position coordinates @return { Object } - New action data
function fillActionLocation (data, position) {
  const action = Object.assign({}, data)
  action.location = {
    latitude: position.coords.latitude,
    longitude: position.coords.longitude
  }
  action.locationSource = 'sensor'
  return action
}
function fillActionLocation ( data , position ) { const action = Object . assign ( { } , data ) action . location = { latitude : position . coords . latitude , longitude : position . coords . longitude } action . locationSource = 'sensor' return action }
Fill action location with coordinates from browser's Geolocation API.
Fill action location with coordinates from browser ' s Geolocation API .