1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! Galileo is a cross-platform map rendering engine. It supports raster and vector layers, custom and flexible styling,
//! working with different coordinate systems and projects.
//!
//! # Quick start
//!
//! **Cargo.toml:**
//! ```toml
//! [package]
//! name = "map-view"
//! version = "0.1.0"
//! edition = "2024"
//!
//! [dependencies]
//! galileo = {git = "https://github.com/maximkaaa/galileo"}
//! galileo-types = {git = "https://github.com/maximkaaa/galileo"}
//! galileo-egui = {git = "https://github.com/maximkaaa/galileo"}
//! ```
//!
//! **src/main.rs:**
//! ```no_run
//! use galileo::layer::raster_tile_layer::RasterTileLayerBuilder;
//! use galileo::{Map, MapBuilder};
//! use galileo::layer::FeatureLayer;
//! use galileo::symbol::CirclePointSymbol;
//! use galileo::galileo_types::latlon;
//! use galileo_types::geo::Crs;
//! use galileo::Color;
//!
//! fn main() {
//! run()
//! }
//!
//! // Creates the window and starts the egui event loop.
//! pub(crate) fn run() {
//! galileo_egui::InitBuilder::new(create_map())
//! .init()
//! .expect("Couldn't create window");
//! }
//!
//! // build a map showing the Open Street Map raster data for Seoul, South Korea
//! fn create_map()->Map {
//! MapBuilder::default()
//! // Set the position of the center of the map view
//! .with_latlon(37.566, 126.9784)
//! // Set the size of the smallest visible feature (zoom level) for the view to start with.
//! .with_z_level(8)
//! // Add the Open Street Maps raster tile server as a layer
//! .with_layer(RasterTileLayerBuilder::new_osm().build().unwrap())
//! // Add a blue dot at the coordinates specified
//! .with_layer(FeatureLayer::new(
//! // the position of the marker we're going to add, in the WGS84 CRS
//! vec![latlon!(37.566, 126.9784)],
//! // a blue circle with fixed size of 5.0 pixels
//! CirclePointSymbol::new(Color::BLUE, 5.0),
//! // WGS84 is the coordinate reference system that's based on latitude/longitude pairs.
//! Crs::WGS84,
//! ))
//! .build()
//! }
//! ```
//!
//! # Main components of Galileo
//!
//! As surprising as it is, everything in a mapping library revolves around
//!
//! * [`Map`] struct, which is quite simple by itself and contains only currently displayed
//! [`MapView`], inner state, such as animation parameters, and a set of
//! * [`layers`](layer) that actually contain data and know how it should be displayed. There are different
//! types of layers depending on what kind of data they use (images, vector tiles, geometric features etc) and on
//! their capabilities for transforming that data into what a user wants to see. To render the data layers use
//! * [`renderer`](render), which is responsible for converting primitives into the images the user sees.
//!
//! As you have probably noticed nothing of the above deals with user interactions or events. You can think of the map
//! (with its layers) as a map you hang on your wall. It just shows some geo-data and does nothing else. So if you
//! create a console utility, server or some kind of presentation application, these three would be all you need.
//!
//! In case a user is supposed to interact with the map in your application, you would also need
//!
//! * [`EventProcessor`](control::EventProcessor) to convert raw system event into
//! some intermediate representation, more convenient to deal with, and some
//! * [`controls`](control) that actually change state of the map or layers based on the user input.
pub
pub
pub use Color;
// Reexport galileo_types
pub use galileo_types;
pub use symbol;
pub use Lod;
pub use ;
pub use ;
pub use TileSchema;
pub use MapView;