src/geo/geocoder/mapbox-geocoder.js
function _formatResponse (rawMapboxResponse) {
  if (!rawMapboxResponse.features.length) {
    return [];
  }
  return [{
    boundingbox: _getBoundingBox(rawMapboxResponse.features[0]),
    center: _getCenter(rawMapboxResponse.features[0]),
    type: _getType(rawMapboxResponse.features[0])
  }];
}
function _formatResponse (rawMapboxResponse) {
  if (!rawMapboxResponse.features.length) {
    return [];
  }
  return [{
    boundingbox: _getBoundingBox(rawMapboxResponse.features[0]),
    center: _getCenter(rawMapboxResponse.features[0]),
    type: _getType(rawMapboxResponse.features[0])
  }];
}
function _formatResponse ( rawMapboxResponse ) { if ( ! rawMapboxResponse . features . length ) { return [ ] ; } return [ { boundingbox : _getBoundingBox ( rawMapboxResponse . features [ 0 ] ) , center : _getCenter ( rawMapboxResponse . features [ 0 ] ) , type : _getType ( rawMapboxResponse . features [ 0 ] ) } ] ; }
Transform a mapbox geocoder response on a object friendly with our search widget.
@param {object} rawMapboxResponse - The raw mapbox geocoding response, {@see https://www.mapbox.com/api-documentation/?language=JavaScript#response-object}
Transform a mapbox geocoder response on a object friendly with our search widget .