11//! [`TileSchema`] is used by tile layers to calculate [tile indices](TileIndex) needed for a given ['MapView'].
22
33use galileo_types:: cartesian:: { CartesianPoint2d , Point2 , Rect } ;
4- use galileo_types:: geo:: Crs ;
5- #[ cfg( target_arch = "wasm32" ) ]
6- use js_sys:: wasm_bindgen:: prelude:: wasm_bindgen;
74use serde:: { Deserialize , Serialize } ;
85
96use crate :: lod:: Lod ;
@@ -23,7 +20,6 @@ pub enum VerticalDirection {
2320/// Tile index with additional virtual `display_x` index that can be used to wrap tiles
2421/// over 180 longitude line.
2522#[ derive( Debug , PartialEq , Eq , Copy , Clone , Hash , Serialize , Deserialize ) ]
26- #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen) ]
2723pub struct WrappingTileIndex {
2824 /// Z index.
2925 pub z : u32 ,
@@ -100,8 +96,6 @@ pub struct TileSchema {
10096 pub tile_height : u32 ,
10197 /// Direction of the Y-axis.
10298 pub y_direction : VerticalDirection ,
103- /// Crs of the scheme.
104- pub crs : Crs ,
10599}
106100
107101impl TileSchema {
@@ -151,10 +145,6 @@ impl TileSchema {
151145
152146 /// Iterate over tile indices that should be displayed for the given map view.
153147 pub fn iter_tiles ( & self , view : & MapView ) -> Option < impl Iterator < Item = WrappingTileIndex > > {
154- if * view. crs ( ) != self . crs {
155- return None ;
156- }
157-
158148 let resolution = view. resolution ( ) ;
159149 let bounding_box = view. get_bbox ( ) ?;
160150 self . iter_tiles_over_bbox ( resolution, bounding_box)
@@ -244,7 +234,6 @@ impl TileSchema {
244234 tile_width : 256 ,
245235 tile_height : 256 ,
246236 y_direction : VerticalDirection :: TopToBottom ,
247- crs : Crs :: EPSG3857 ,
248237 }
249238 }
250239
@@ -349,7 +338,6 @@ mod tests {
349338 tile_width : 256 ,
350339 tile_height : 256 ,
351340 y_direction : VerticalDirection :: BottomToTop ,
352- crs : Crs :: EPSG3857 ,
353341 }
354342 }
355343
0 commit comments