// Map crate for Nigig // Uses makepad_widgets for rendering pub(crate) mod geometry; pub(crate) mod label; pub mod style; pub(crate) mod tile; pub(crate) mod mvt_parser; pub(crate) mod overpass_parser; pub(crate) mod tessellation; pub(crate) mod tile_decode; pub(crate) mod tile_disk; pub mod view; pub(crate) mod sprite; pub(crate) mod icons; // Latest makepad map implementation (to be integrated) pub mod makepad_map; #[cfg(feature = "map_style")] pub(crate) mod style_json; #[cfg(feature = "map_style")] pub(crate) mod asset_loader; pub(crate) mod viewport; pub(crate) mod cache; pub(crate) mod renderer; pub mod render_graph; pub(crate) mod scheduler; pub(crate) mod label_state; pub(crate) mod thread_pool; use makepad_widgets::ScriptVm; pub fn script_mod(vm: &mut ScriptVm) { style::script_mod(vm); // Register MapThemeStyle and related types first view::script_mod(vm); // Then use them in NigigMapView } pub use view::*; // Phase 2: Overlay system (routes, markers, position puck) pub mod overlay; #[cfg(test)] mod tests { use super::*; #[test] fn test_script_mod_does_not_panic() { // This test ensures script_mod can be called without panicking // We can't test the actual functionality without a full ScriptVm runtime // but we can at least verify the function exists and is callable use makepad_widgets::ScriptVm; // Create a minimal ScriptVm (this may fail, which is okay for this test) // The important thing is that script_mod is properly defined let _ = std::panic::catch_unwind(|| { // We can't actually create a ScriptVm without a full runtime, // but we can verify the function signature is correct let _fn_ptr: fn(&mut ScriptVm) = script_mod; }); } #[test] fn test_module_structure() { // Verify that all expected modules are accessible // This is a compile-time check more than a runtime check use crate::geometry; use crate::label; use crate::style; use crate::tile; use crate::mvt_parser; use crate::overpass_parser; use crate::tessellation; use crate::tile_decode; use crate::tile_disk; use crate::view; use crate::sprite; use crate::icons; use crate::viewport; use crate::cache; use crate::renderer; use crate::render_graph; use crate::scheduler; use crate::label_state; use crate::overlay; // If we get here, all modules are accessible assert!(true); } }