src/entity/Location.js
/**
 * Fill location coordinates from browser's Geolocation API.
 *
 * @param {Object} data - Location data
 * @param {Object} position - Geolocation API position coordinates
 * @return {Object} - New location data
 */
Fill location coordinates from browser's Geolocation API.
@param {Object} data - Location data
@param {Object} position - Geolocation API position coordinates
@return {Object} - New location data
Fill location coordinates from browser ' s Geolocation API . @param { Object } data - Location data @param { Object } position - Geolocation API position coordinates @return { Object } - New location data
function fillLocation (data, position) {
  const location = Object.assign({}, data)
  location.position = {
    type: 'Point',
    coordinates: [position.coords.longitude, position.coords.latitude]
  }
  return location
}
function fillLocation ( data , position ) { const location = Object . assign ( { } , data ) location . position = { type : 'Point' , coordinates : [ position . coords . longitude , position . coords . latitude ] } return location }
Fill location coordinates from browser's Geolocation API.
Fill location coordinates from browser ' s Geolocation API .