Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const debugTextPathsFull = debugContext.getValue("DEBUG_TEXT_PATHS_FULL");
if (!(debugTextPaths || debugTextPathsFull) || this.decodedTile === undefined) {
return;
}
const tileGeometryCreator = TileGeometryCreator.instance;
const decodedTile = this.decodedTile!;
tileGeometryCreator.createTextElements(this, decodedTile);
const colorMap = new Map();
// allow limiting to specific names and/or index. There can be many paths with the same text
const textFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.TEXT");
const indexFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.INDEX");
const zoomLevel = this.mapView.zoomLevel;
if (decodedTile.textPathGeometries !== undefined) {
this.preparedTextPaths = tileGeometryCreator.prepareTextPaths(
decodedTile.textPathGeometries,
decodedTile
);
}
if (this.preparedTextPaths !== undefined) {
const lineGeometry = new THREE.BufferGeometry();
const lineIndices = new Array();
const linePositions = new Array();
const redPointGeometry = new THREE.BufferGeometry();
const redPointIndices = new Array();
const debugTextPaths = debugContext.getValue("DEBUG_TEXT_PATHS");
const debugTextPathsFull = debugContext.getValue("DEBUG_TEXT_PATHS_FULL");
if (!(debugTextPaths || debugTextPathsFull) || this.decodedTile === undefined) {
return;
}
const tileGeometryCreator = TileGeometryCreator.instance;
const decodedTile = this.decodedTile!;
tileGeometryCreator.createTextElements(this, decodedTile);
const colorMap = new Map();
// allow limiting to specific names and/or index. There can be many paths with the same text
const textFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.TEXT");
const indexFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.INDEX");
const zoomLevel = this.mapView.zoomLevel;
if (decodedTile.textPathGeometries !== undefined) {
this.preparedTextPaths = tileGeometryCreator.prepareTextPaths(
decodedTile.textPathGeometries,
decodedTile
);
}
if (this.preparedTextPaths !== undefined) {
const lineGeometry = new THREE.BufferGeometry();
const lineIndices = new Array();
const linePositions = new Array();
const redPointGeometry = new THREE.BufferGeometry();
private addLabelDebugInfo() {
// activate in the browser with:
// window.__debugContext.setValue("DEBUG_TEXT_PATHS", true)
const debugTextPaths = debugContext.getValue("DEBUG_TEXT_PATHS");
const debugTextPathsFull = debugContext.getValue("DEBUG_TEXT_PATHS_FULL");
if (!(debugTextPaths || debugTextPathsFull) || this.decodedTile === undefined) {
return;
}
const tileGeometryCreator = TileGeometryCreator.instance;
const decodedTile = this.decodedTile!;
tileGeometryCreator.createTextElements(this, decodedTile);
const colorMap = new Map();
// allow limiting to specific names and/or index. There can be many paths with the same text
const textFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.TEXT");
const indexFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.INDEX");
const zoomLevel = this.mapView.zoomLevel;
private addLabelDebugInfo() {
// activate in the browser with:
// window.__debugContext.setValue("DEBUG_TEXT_PATHS", true)
const debugTextPaths = debugContext.getValue("DEBUG_TEXT_PATHS");
const debugTextPathsFull = debugContext.getValue("DEBUG_TEXT_PATHS_FULL");
if (!(debugTextPaths || debugTextPathsFull) || this.decodedTile === undefined) {
return;
}
const tileGeometryCreator = TileGeometryCreator.instance;
const decodedTile = this.decodedTile!;
tileGeometryCreator.createTextElements(this, decodedTile);
const colorMap = new Map();
// allow limiting to specific names and/or index. There can be many paths with the same text
const textFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.TEXT");
const indexFilter = debugContext.getValue("DEBUG_TEXT_PATHS.FILTER.INDEX");