leaflet/
feature_group.rs

1use wasm_bindgen::prelude::*;
2
3use crate::{LatLngBounds, LayerGroup};
4
5#[wasm_bindgen]
6extern "C" {
7    /// [`FeatureGroup`](https://leafletjs.com/reference-1.7.1.html#featuregroup)
8    #[derive(Clone, Debug)]
9    #[wasm_bindgen(extends = LayerGroup)]
10    pub type FeatureGroup;
11
12    #[wasm_bindgen(constructor, js_namespace = L)]
13    pub fn new() -> FeatureGroup;
14
15    /// [`setStyle`](https://leafletjs.com/reference-1.7.1.html#featuregroup-setstyle)
16    #[wasm_bindgen(method, js_name = "setStyle")]
17    pub fn set_style(this: &FeatureGroup, style: &JsValue);
18
19    /// [`bringToFront`](https://leafletjs.com/reference-1.7.1.html#featuregroup-bringtofront)
20    #[wasm_bindgen(method, js_name = "bringToFront")]
21    pub fn bring_to_front(this: &FeatureGroup);
22
23    /// [`bringToBack`](https://leafletjs.com/reference-1.7.1.html#featuregroup-bringtoback)
24    #[wasm_bindgen(method, js_name = "bringToBack")]
25    pub fn bring_to_back(this: &FeatureGroup);
26
27    /// [`getBounds`](https://leafletjs.com/reference-1.7.1.html#featuregroup-getbounds)
28    #[wasm_bindgen(method, js_name = "getBounds")]
29    pub fn get_bounds(this: &FeatureGroup) -> LatLngBounds;
30
31}