new Utils(okdk)
- Source:
Initialize utility module.
Parameters:
Name | Type | Description |
---|---|---|
okdk |
Object | OkeyDokey module instance. |
Methods
getGridId(latitude, longitude) → {int}
- Source:
Calculate grid id from latitude and longitude.
Parameters:
Name | Type | Description |
---|---|---|
latitude |
int | Latitude of coordinate. |
longitude |
int | Longitude of coordinate. |
Returns:
gridId - Id within the Earth's grid.
- Type
- int
stringToByteArray(string) → {Array.<byte>}
- Source:
Create byte array from string.
Parameters:
Name | Type | Description |
---|---|---|
string |
string | String to convert to byte array. |
Returns:
bytes - Converted byte array.
- Type
- Array.<byte>