Include some static tiles

This commit is contained in:
Maximilian Ammann 2022-03-27 15:05:49 +02:00
parent 7db277faef
commit 1cb211534d
2 changed files with 7 additions and 5 deletions

View File

@ -4,9 +4,9 @@ use std::{env, fs};
use mbtiles::extract;
use wgsl_validate::validate_project_wgsl;
pub const MUNICH_X: u32 = 17421;
pub const MUNICH_Y: u32 = 11360;
pub const MUNICH_Z: u8 = 15;
const MUNICH_X: u32 = 17425;
const MUNICH_Y: u32 = 11365;
const MUNICH_Z: u8 = 15;
/// Tiles which can be used by StaticTileFetcher
fn clean_static_tiles() -> PathBuf {
@ -35,8 +35,8 @@ fn embed_tiles_statically() {
source,
out,
MUNICH_Z,
(MUNICH_X - 100)..(MUNICH_X + 100),
(MUNICH_Y - 100)..(MUNICH_Y + 100),
(MUNICH_X - 2)..(MUNICH_X + 2),
(MUNICH_Y - 2)..(MUNICH_Y + 2),
)
.unwrap();
} else {

View File

@ -7,6 +7,8 @@ use log::error;
use crate::coords::TileCoords;
use crate::error::Error;
#[cfg(static_tiles)]
use include_dir::include_dir;
#[cfg(static_tiles)]
static TILES: Dir = include_dir!("$OUT_DIR/extracted-tiles");
#[cfg(not(static_tiles))]