message: removed hardcoded zoom level offset for webtile datasource/added additional request parameters
diff: @@ -76,6 +76,20 @@ export interface WebTileDataSourceParameters {
  */
  resolution?: number;
  + /**
  + * String which is appended to the tile request url, e.g. to add additional parameters
  + * to the tile requests as described in
  + * @see https://developer.here.com/documentation/map-tile/topics/resource-base-basetile.html
  + */
  + additionalRequestParameters?: string;
  +
  + /**
  + * ppi parameter which impacts font/icon sizes, road width and other content
  + * of the map tiles. For valid values and restrictions
  + * @see https://developer.here.com/documentation/map-tile/topics/resource-base-basetile.html#ppi
  + */
  + ppi?: number;
  +
  /**
  * Whether to provide copyright info.
  *
  @@ -253,6 +267,7 @@ export class WebTileDataSource extends DataSource {
  "traffic.maps.api.here.com/maptile/2.1/traffictile/newest/normal.day";
  private m_resolution: number;
  + private m_ppi: number;
  private m_tileBaseAddress: string;
  private m_languages?: string[];
  private m_cachedCopyrightResponse?: Promise<AreaCopyrightInfo[]>;
  @@ -265,7 +280,8 @@ export class WebTileDataSource extends DataSource {
  constructor(private readonly m_options: WebTileDataSourceParameters) {
  super("webtile");
  this.cacheable = true;
  - this.m_resolution = m_options.resolution || 512;
  + this.m_resolution = getOptionValue(m_options.resolution, 512);
  + this.m_ppi = getOptionValue(m_options.ppi, 320);
  this.m_tileBaseAddress = m_options.tileBaseAddress || WebTileDataSource.TILE_BASE_NORMAL;
  }
  @@ -292,10 +308,6 @@ export class WebTileDataSource extends DataSource {
  }
  }
  - getDisplayZoomLevel(zoomLevel: number): number {
  - return THREE.Math.clamp(zoomLevel + 1, this.minZoomLevel, this.maxZoomLevel);
  - }
  -
  getTile(tileKey: TileKey): Tile {
  const tile = new Tile(this, tileKey);
  @@ -308,7 +320,9 @@ export class WebTileDataSource extends DataSource {
  let url =
  `https://${server}.${this.m_tileBaseAddress}/` +
  `${level}/${column}/${row}/${this.m_resolution}/png8` +
  - `?app_id=${appId}&app_code=${appCode}`;
  + `?app_id=${appId}&app_code=${appCode}` +
  + `&ppi=${this.m_ppi}` +
  + getOptionValue(this.m_options.additionalRequestParameters, "");
  if (this.m_languages !== undefined && this.m_languages[0] !== undefined) {
  url += `&lg=${this.m_languages[0]}`;
  