Class TileKey

java.lang.Object
com.here.sdk.mapview.datasource.TileKey

public final class TileKey extends Object

Key of a data source tile.

Note: This is a beta release of this feature and may contain bugs or exhibit unexpected behaviour. Related APIs are subject to change without a deprecation process.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Level of the tile.
    int
    X coordinate of the tile.
    int
    Y coordinate of the tile.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TileKey(int x, int y, int level)
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    static TileKey
    fromGeoCoordinates(GeoCoordinates coordinates, int storageLevel, TilingScheme tilingScheme)
    Creates a tile key containing specified coordinates at specified storage level and tiling scheme.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • x

      public int x

      X coordinate of the tile. This ranges from 0 to 2^level − 1.

    • y

      public int y

      Y coordinate of the tile. This ranges from 0 to 2^level − 1.

    • level

      public int level

      Level of the tile. Supported range [0, 31].

  • Constructor Details

    • TileKey

      public TileKey(int x, int y, int level)

      Creates a new instance.

      Parameters:
      x -

      X coordinate of the tile. This ranges from 0 to 2^level − 1.

      y -

      Y coordinate of the tile. This ranges from 0 to 2^level − 1.

      level -

      Level of the tile. Supported range [0, 31].

  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • fromGeoCoordinates

      @NonNull public static TileKey fromGeoCoordinates(@NonNull GeoCoordinates coordinates, int storageLevel, @NonNull TilingScheme tilingScheme)

      Creates a tile key containing specified coordinates at specified storage level and tiling scheme.

      For tiling schemes using Web Mercator projection, the latitude of input coordinates is clamped to [-85.05113, 85.05113] range.

      Parameters:
      coordinates -

      The coordinates for which to create the tile key.

      storageLevel -

      The storage level of the tile key, clamped to [0, 31].

      tilingScheme -

      The tiling scheme to use for the tile key.

      Returns:

      Tile key containing specified coordinates.