utiles 0.8.0

Web map tile utils (aka utiles)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use axum::http::{HeaderMap, HeaderValue, StatusCode, header};
use axum::response::IntoResponse;

// const WORLD_AMERICAS_EMOJI: &str = "🌎";
// const WORLD_EUROPE_AFRICA_EMOJI: &str = "🌎";
// const WORLD_ASIA_AUSTRALIA_EMOJI: &str = "🌎";
// const MAP_EMOJI: &str = "πŸ—ΊοΈ";
// const DINO_EMOJI: &str = "πŸ¦•";
const FAVICON_SVG: &str = r#"<svg xmlns="http://www.w3.org/2000/svg"><text y="24" font-size="24">πŸ’―</text></svg>"#;
pub(super) async fn favicon() -> impl IntoResponse {
    let mut headers = HeaderMap::new();
    headers.insert(
        header::CONTENT_TYPE,
        HeaderValue::from_static("image/svg+xml"),
    );
    (StatusCode::OK, headers, FAVICON_SVG)
}