mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Rename layer
This commit is contained in:
parent
716cafe8de
commit
1a7512aa2a
@ -37,7 +37,7 @@ pub enum LayerPaint {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Layer {
|
||||
pub struct StyleLayer {
|
||||
pub id: String,
|
||||
#[serde(rename = "type")]
|
||||
pub typ: String,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use crate::layer::Layer;
|
||||
use crate::layer::StyleLayer;
|
||||
use crate::source::Source;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
@ -9,7 +9,7 @@ pub struct Style {
|
||||
pub name: String,
|
||||
pub metadata: HashMap<String, String>,
|
||||
pub sources: HashMap<String, Source>,
|
||||
pub layers: Vec<Layer>,
|
||||
pub layers: Vec<StyleLayer>,
|
||||
}
|
||||
|
||||
impl Default for Style {
|
||||
@ -20,7 +20,7 @@ impl Default for Style {
|
||||
metadata: Default::default(),
|
||||
sources: Default::default(),
|
||||
layers: vec![
|
||||
Layer {
|
||||
StyleLayer {
|
||||
id: "transportation".to_string(),
|
||||
typ: "line".to_string(),
|
||||
maxzoom: None,
|
||||
@ -30,7 +30,7 @@ impl Default for Style {
|
||||
source: None,
|
||||
source_layer: Some("transportation".to_string()),
|
||||
},
|
||||
Layer {
|
||||
StyleLayer {
|
||||
id: "building".to_string(),
|
||||
typ: "fill".to_string(),
|
||||
maxzoom: None,
|
||||
@ -40,7 +40,7 @@ impl Default for Style {
|
||||
source: None,
|
||||
source_layer: Some("building".to_string()),
|
||||
},
|
||||
Layer {
|
||||
StyleLayer {
|
||||
id: "water".to_string(),
|
||||
typ: "fill".to_string(),
|
||||
maxzoom: None,
|
||||
@ -50,7 +50,7 @@ impl Default for Style {
|
||||
source: None,
|
||||
source_layer: Some("water".to_string()),
|
||||
},
|
||||
Layer {
|
||||
StyleLayer {
|
||||
id: "boundary".to_string(),
|
||||
typ: "line".to_string(),
|
||||
maxzoom: None,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user