Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getTile(tileKey: TileKey): Tile | undefined {
// Create a new tile.
const tile = new Tile(this, tileKey);
// add a red circle
tile.objects.push(new THREE.Mesh(this.geometry, this.material));
// and finally return it
return tile;
}
// end:vislib_datasource_hello_5.ts
getTile(tileKey: TileKey): Tile {
const tile = new Tile(this, tileKey);
const column = tileKey.column;
const row = tileKey.row;
const level = tileKey.level;
const { appId, appCode } = this.m_options;
const quadKey = tileKey.toQuadKey();
const server = parseInt(quadKey[quadKey.length - 1], 10) + 1;
let url =
`https://${server}.${this.m_tileBaseAddress}/` +
`${level}/${column}/${row}/${this.m_resolution}/png8` +
`?app_id=${appId}&app_code=${appCode}` +
getOptionValue(this.m_options.additionalRequestParameters, "");
if (this.m_ppi !== WebTileDataSource.ppiValue.ppi72) {
// because ppi=72 is default, we do not include it in the request
url += `&ppi=${this.m_ppi}`;
getTile(tileKey: TileKey): Tile | undefined {
// Create a new tile.
const tile = new Tile(this, tileKey);
// Add a THREE.Mesh created from the geometry and material factories
tile.objects.push(
new THREE.Mesh(
this.createGeometry(tile.boundingBox.clone(), tile.center),
this.createMaterial(tile.tileKey)
)
);
return tile;
}
// end:vislib_datasource_simple_5.ts
getTile(tileKey: TileKey): Tile | undefined {
return new Tile(this, tileKey);
}
}