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
//! # Dioxus Leaflet
//!
//! A general-purpose Leaflet map component for Dioxus applications.
//!
//! ## Features
//!
//! - Easy-to-use map component with customizable markers
//! - Support for popups and custom styling
//! - Extensible marker system
//! - TypeScript-like props system
//! - Flexible Leaflet integration: CDN (with version selection) or local files
//! - Configurable Leaflet resources with integrity checking
//!
//! ## Basic Usage
//!
//! ```rust
//! use dioxus::prelude::*;
//! use dioxus_leaflet::{LatLng, Map, MapPosition, Marker, Popup};
//!
//! fn App() -> Element {
//! rsx! {
//! Map {
//! initial_position: MapPosition::new(51.505, -0.09, 13.0),
//! height: "400px",
//! width: "100%",
//! Marker {
//! coordinate: LatLng::new(51.505, -0.09),
//! Popup {
//! b { "London" }
//! br { }
//! "Capital of England"
//! }
//! }
//! }
//! }
//! }
//! ```
//!
//! ## Advanced Configuration
//!
//! ### Using a specific Leaflet version from CDN
//!
//! ```rust
//! use dioxus::prelude::*;
//! use dioxus_leaflet::{Map, MapPosition, MapOptions, LeafletResources};
//!
//! fn App() -> Element {
//! let options = MapOptions::default()
//! .with_leaflet_resources(LeafletResources::cdn("1.9.3"));
//!
//! rsx! {
//! Map {
//! initial_position: MapPosition::default(),
//! options: options,
//! height: "400px",
//! width: "100%"
//! }
//! }
//! }
//! ```
//!
//! ### Using local Leaflet files
//!
//! ```rust
//! use dioxus::prelude::*;
//! use dioxus_leaflet::{Map, MapPosition, MapOptions, LeafletResources};
//!
//! fn App() -> Element {
//! let options = MapOptions::default()
//! .with_leaflet_resources(LeafletResources::local(
//! "/static/css/leaflet.css",
//! "/static/js/leaflet.js"
//! ));
//!
//! rsx! {
//! Map {
//! initial_position: MapPosition::default(),
//! options: options,
//! height: "400px",
//! width: "100%"
//! }
//! }
//! }
//! ```
// Re-export main types and components
pub use ;
pub use ;