Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Fix ebene 2
Browse files Browse the repository at this point in the history
  • Loading branch information
fschutt committed Jul 29, 2024
1 parent 8938c0f commit 06fc464
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
7 changes: 1 addition & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78166,7 +78166,7 @@
if (geojson == null) {
continue;
}
var layer_style = window.configuration.style.ebenen[layer_name];
var layer_style = JSON.parse(get_layer_style(JSON.stringify(window.configuration), ln));
var myLayer = null;
if (L.geoJson) {
myLayer = L.geoJson(geojson, {
Expand Down Expand Up @@ -78211,11 +78211,6 @@
permanent: true,
interactive: true,
});
t.on({
click: function() {

}
});
t.addTo(myLayer);
}
}
Expand Down
7 changes: 1 addition & 6 deletions skeleton.html
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@
if (geojson == null) {
continue;
}
var layer_style = window.configuration.style.ebenen[layer_name];
var layer_style = JSON.parse(get_layer_style(JSON.stringify(window.configuration), ln));
var myLayer = null;
if (L.geoJson) {
myLayer = L.geoJson(geojson, {
Expand Down Expand Up @@ -846,11 +846,6 @@
permanent: true,
interactive: true,
});
t.on({
click: function() {

}
});
t.addTo(myLayer);
}
}
Expand Down
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,14 @@ pub fn get_geojson_fuer_ebene(json: String, layer: String) -> String {
xml.get_geojson_ebene(&layer)
}

pub fn get_layer_style(konfiguration: String, layer_name: String) -> String {
let konfiguration = serde_json::from_str::<Konfiguration>(&konfiguration).unwrap_or_default();
let ls = konfiguration.style.ebenen.iter()
.find(|(_, s)| s.name == layer_name).map(|(k, v)| v.clone())
.unwrap_or(EbenenStyle::default());
serde_json::to_string(&ls).unwrap_or_default()
}

#[wasm_bindgen]
pub fn get_gebaeude_geojson_fuer_aktive_flst(json: String, csv: String, aenderungen: String) -> String {
let xml = match serde_json::from_str::<NasXMLFile>(&json) {
Expand Down

0 comments on commit 06fc464

Please sign in to comment.