mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 04:41:46 +03:00
use tileset id as name
This commit is contained in:
parent
c8d46d398a
commit
9059551a55
@ -55,7 +55,7 @@ pub fn tileset(req: &mut Request, caps: Captures) -> IronResult<Response> {
|
|||||||
|
|
||||||
let mut tilejson_builder = TileJSONBuilder::new();
|
let mut tilejson_builder = TileJSONBuilder::new();
|
||||||
tilejson_builder.scheme("tms");
|
tilejson_builder.scheme("tms");
|
||||||
tilejson_builder.name(&tileset.table);
|
tilejson_builder.name(&tileset.id);
|
||||||
tilejson_builder.tiles(vec![&tiles_url]);
|
tilejson_builder.tiles(vec![&tiles_url]);
|
||||||
|
|
||||||
let tilejson = tilejson_builder.finalize();
|
let tilejson = tilejson_builder.finalize();
|
||||||
|
@ -7,6 +7,7 @@ use super::db::PostgresConnection;
|
|||||||
|
|
||||||
#[derive(Serialize, Debug)]
|
#[derive(Serialize, Debug)]
|
||||||
pub struct Tileset {
|
pub struct Tileset {
|
||||||
|
pub id: String,
|
||||||
schema: String,
|
schema: String,
|
||||||
pub table: String,
|
pub table: String,
|
||||||
geometry_column: String,
|
geometry_column: String,
|
||||||
@ -92,6 +93,7 @@ pub fn get_tilesets(conn: PostgresConnection) -> Result<HashMap<String, Tileset>
|
|||||||
let srid: i32 = row.get("srid");
|
let srid: i32 = row.get("srid");
|
||||||
|
|
||||||
let tileset = Tileset {
|
let tileset = Tileset {
|
||||||
|
id: id.to_string(),
|
||||||
schema: schema,
|
schema: schema,
|
||||||
table: table,
|
table: table,
|
||||||
geometry_column: geometry_column,
|
geometry_column: geometry_column,
|
||||||
|
Loading…
Reference in New Issue
Block a user