Provide default Source::support_url_query

This commit is contained in:
Yuri Astrakhan 2023-10-21 18:54:09 -04:00
parent b88d714bf6
commit 2053f8067c
4 changed files with 3 additions and 13 deletions

View File

@ -81,10 +81,6 @@ impl Source for MbtSource {
Box::new(self.clone()) Box::new(self.clone())
} }
fn support_url_query(&self) -> bool {
false
}
async fn get_tile(&self, xyz: &Xyz, _url_query: &Option<UrlQuery>) -> Result<Tile, Error> { async fn get_tile(&self, xyz: &Xyz, _url_query: &Option<UrlQuery>) -> Result<Tile, Error> {
if let Some(tile) = self if let Some(tile) = self
.mbtiles .mbtiles

View File

@ -129,10 +129,6 @@ impl Source for PmtSource {
Box::new(self.clone()) Box::new(self.clone())
} }
fn support_url_query(&self) -> bool {
false
}
async fn get_tile(&self, xyz: &Xyz, _url_query: &Option<UrlQuery>) -> Result<Tile, Error> { async fn get_tile(&self, xyz: &Xyz, _url_query: &Option<UrlQuery>) -> Result<Tile, Error> {
// TODO: optimize to return Bytes // TODO: optimize to return Bytes
if let Some(t) = self if let Some(t) = self

View File

@ -105,7 +105,9 @@ pub trait Source: Send + Debug {
fn clone_source(&self) -> Box<dyn Source>; fn clone_source(&self) -> Box<dyn Source>;
fn support_url_query(&self) -> bool; fn support_url_query(&self) -> bool {
false
}
async fn get_tile(&self, xyz: &Xyz, query: &Option<UrlQuery>) -> Result<Tile>; async fn get_tile(&self, xyz: &Xyz, query: &Option<UrlQuery>) -> Result<Tile>;

View File

@ -505,10 +505,6 @@ mod tests {
unimplemented!() unimplemented!()
} }
fn support_url_query(&self) -> bool {
unimplemented!()
}
async fn get_tile( async fn get_tile(
&self, &self,
_xyz: &Xyz, _xyz: &Xyz,