
            Layer::geojson_layer_with_path(
                "/Users/tsuki/Downloads/new_zhejiang.json",
                true,
                |_self, c, render, _| {
                    if let Some(json_resources) = _self.get_resources() {
                        if let Resources::GeoJson(geojson) = json_resources.deref() {
                            MapRender::test(&geojson, c, render);
                        }
                    }
                },
            ),
            Layer::new(true, None, |s, c, render, _| {
                if let Some(target) = s.render_target() {
                    if let Ok(_) = c.image_size(target.target) {
                        let (x, y) = target.size(render);
                        let (ox, oy) = target.origin(render);
                        let painter = Paint::image(target.target, ox, oy, x, y, 0.0, 1.0);
                        let mut path = Path::new();
                        path.rect(ox, oy, x, y);
                        c.fill_path(&path, &painter);
                    }
                } else {
                    let renderer = RadarEchoRenderer::new(BoundaryNorm::new(
                        vec![0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65],
                        vec![
                            Color::rgb(0, 172, 164),
                            Color::rgb(192, 192, 254),
                            Color::rgb(122, 114, 238),
                            Color::rgb(30, 38, 208),
                            Color::rgb(166, 252, 168),
                            Color::rgb(0, 234, 0),
                            Color::rgb(16, 146, 26),
                            Color::rgb(252, 244, 100),
                            Color::rgb(200, 200, 2),
                            Color::rgb(140, 140, 0),
                            Color::rgb(254, 172, 172),
                            Color::rgb(254, 100, 92),
                            Color::rgb(238, 2, 48),
                            Color::rgb(212, 142, 254),
                            Color::rgb(170, 36, 250),
                        ],
                        true,
                    ));
                    let loader = Npz;
                    let data: RadarData2d<i8, OwnedRepr<i8>> = loader
                        .load("/Users/tsuki/projects/radar-g/test2.npz")
                        .unwrap();
                    let img = renderer.render(render, c, &data);
                    if let Ok(_) = c.image_size(img.target) {
                        let (x, y) = img.size(render);
                        let (ox, oy) = img.origin(render);
                        println!("{} {} {} {}", x, y, ox, oy);
                        let painter = Paint::image(img.target, ox, oy, x, y, 0.0, 1.0);
                        let mut path = Path::new();
                        path.rect(ox, oy, x, y);
                        s.set_render_target(img);
                        c.fill_path(&path, &painter);
                        c.flush();
                    }
                }
            }),






############# TEMPLATES ###################
// Monitor::new(
        //     Render::new(
        //         Some(Mapper::new(
        //             Proj::new(Mercator::default().build().as_str()).unwrap(),
        //             (119.539..121.135).into(),
        //             (29.13..30.164).into(),
        //         )),
        //         RenderConfig { padding: [50.0;4] }
        //     )
        // )



// Layer::grid_render_layer_with_path(
        //     "/users/tsuki/projects/radar-g/test2.npz",
        //     Npz,
        //     BoundaryNorm::default(),
        // )
