use super::mapping_app_error::MappingAppError;
use geo::LineString;
use routee_compass_core::model::{
map::MapModel,
network::{EdgeId, EdgeListId},
};
pub struct MappingApp {
pub map_model: MapModel,
}
impl MappingApp {
pub fn get_edge_linestring(
&self,
edge_list_id: EdgeListId,
edge_id: EdgeId,
) -> Result<&LineString<f32>, MappingAppError> {
self.map_model
.get_linestring(&edge_list_id, &edge_id)
.map_err(MappingAppError::MapError)
}
}