mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-09-25 17:07:37 +00:00
parsing continued
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
use crate::gpx::{Link, LngLat};
|
||||
|
||||
pub type WaypointChunk = Vec<Waypoint>;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Waypoint {
|
||||
pub coordinates: LngLat,
|
||||
@@ -14,3 +12,16 @@ pub struct Waypoint {
|
||||
pub sym: Option<String>,
|
||||
pub type_: Option<String>,
|
||||
}
|
||||
|
||||
static MAX_CHUNK_SIZE: usize = 128;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct WaypointChunk {
|
||||
pub wpt: Vec<Waypoint>,
|
||||
}
|
||||
|
||||
impl WaypointChunk {
|
||||
pub fn is_full(&self) -> bool {
|
||||
self.wpt.len() == MAX_CHUNK_SIZE
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user