OpenLocationCode.encode

Creates Open Location Code.

  1. OpenLocationCode encode(double latitude, double longitude, int codeLength = codePrecisionNormal)
    struct OpenLocationCode
    pure static
    encode
    nothrow
  2. ubyte[] encode(scope return ubyte[] buffer, double latitude, double longitude, int codeLength = codePrecisionNormal)

Parameters

latitude
Type: double

The latitude in decimal degrees.

longitude
Type: double

The longitude in decimal degrees.

codeLength
Type: int

The desired number of digits in the code. Defaults to the default precision. Must be a valid code length, otherwise contract violation = assertion error.

Meta