How to use the @here/harp-geoutils.mercatorTilingScheme.getTileKey function in @here/harp-geoutils

To help you get started, we’ve selected a few @here/harp-geoutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heremaps / harp-terrain-datasource / example / src / get-tile-material.js View on Github external
function getTileTextureUrl (tile) {
  const textureTileKey = mercatorTilingScheme.getTileKey(tile.geoBox.center, tile.tileKey.level)
  const shard = Math.round(Math.random() * 3) + 1

  return `https://${shard}.aerial.maps.api.here.com/maptile/2.1/basetile/newest/satellite.day/${textureTileKey.level}/${textureTileKey.column}/${textureTileKey.rowCount() - textureTileKey.row - 1}/512/png?app_id=${config.APP_ID}&app_code=${config.APP_CODE}`
}