proj4wkt 0.1.1

Parse WKT to Proj strings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//!
//! Wasm bindgen entry point
//!
use wasm_bindgen::prelude::*;

use crate::wkt_to_projstring;

// Js entry point
#[wasm_bindgen(start)]
pub fn main() {
    #[cfg(feature = "logging")]
    console_log::init_with_level(log::Level::Trace).unwrap();
}

#[wasm_bindgen(js_name = toProjstring)]
pub fn to_projstring(src: &str) -> Result<String, JsError> {
    wkt_to_projstring(src).map_err(JsError::from)
}