Function open_location_code::encode[][src]

pub fn encode(pt: Point<f64>, code_length: usize) -> String

Encode a location into an Open Location Code.

Produces a code of the specified length, or the default length if no length is provided. The length determines the accuracy of the code. The default length is 10 characters, returning a code of approximately 13.5x13.5 meters. Longer codes represent smaller areas, but lengths > 14 are sub-centimetre and so 11 or 12 are probably the limit of useful codes.