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
//! The style spec's constants: the tile size and extent, the bounds of
//! longitude and latitude, and the defaults of sources, transitions and
//! fonts.
use Duration;
use crateUnitBezier;
pub const TILE_SIZE_D: f64 = 512.0;
pub const TILE_SIZE_I: u16 = 512;
/// The seed's name for `tileSize_D`.
pub const TILE_SIZE: f64 = TILE_SIZE_D;
/// The maximum extent of a feature that can be safely stored in the buffer.
/// In practice, all features are converted to this extent before being added.
///
/// Positions are stored as signed 16bit integers.
/// One bit is lost for signedness to support features extending past the left
/// edge of the tile. One bit is lost because the line vertex buffer used to pack
/// 1 bit of other data into the int. This is no longer the case but we're
/// reserving this bit anyway. One bit is lost to support features extending past
/// the extent on the right edge of the tile. This leaves us with 2^13 = 8192
pub const EXTENT: i32 = 8192;
pub const LATITUDE_MAX: f64 = 85.051_128_779_806_6;
pub const LONGITUDE_MAX: f64 = 180.0;
pub const DEGREES_MAX: f64 = 360.0;
/// The radius in meters of the sphere that Web Mercator projects, the
/// earth's equatorial radius.
pub const EARTH_RADIUS_M: f64 = 6_378_137.0;
/// The highest zoom level of a source's tiles, unless it says otherwise.
pub const DEFAULT_MAX_ZOOM: u8 = 22;
pub const DEFAULT_PREFETCH_ZOOM_DELTA: u8 = 4;
pub const DEFAULT_TRANSITION_DURATION: Duration = from_millis;
pub const DEFAULT_TRANSITION_EASE: UnitBezier = new;
/// The fonts of `text-font`'s default.
pub const LAST_RESORT_ALPHABETIC_FONT: &str = "Open Sans Regular";
pub const LAST_RESORT_PAN_UNICODE_FONT: &str = "Arial Unicode MS Regular";