1.4 KiB
1.4 KiB
title | description | menu | weight | flux/v0/tags | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
geo.getLevel() function | `geo.getLevel()` returns the S2 cell level of specified cell ID token. |
|
201 |
|
geo.getLevel()
returns the S2 cell level of specified cell ID token.
Function type signature
(token: string) => int
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
Parameters
token
({{< req >}}) S2 cell ID token.
Examples
Return the S2 cell level of an S2 cell ID token
import "experimental/geo"
geo.getLevel(token: "166b59")// Returns 10