Skip to content

Commit

Permalink
Add conflation debug url param.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Clark committed Nov 12, 2024
1 parent e35443d commit b27359b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/pixi/PixiLayerRapid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as PIXI from 'pixi.js';
import geojsonRewind from '@mapbox/geojson-rewind';
import { utilStringQs } from '@rapid-sdk/util';

import { AbstractLayer } from './AbstractLayer.js';
import { PixiFeatureLine } from './PixiFeatureLine.js';
Expand Down Expand Up @@ -193,8 +194,16 @@ export class PixiLayerRapid extends AbstractLayer {
const service = context.services[dataset.service]; // 'mapwithai' or 'esri'
if (!service?.started) return;

const useConflationStr = utilStringQs(window.location.hash).conflation;

let useConflation = dataset.conflated;

if (useConflationStr === 'false' || useConflationStr === 'no') {
useConflation = false;
}

// Adjust the dataset id for whether we want the data conflated or not.
const datasetID = dataset.id + (dataset.conflated ? '-conflated' : '');
const datasetID = dataset.id + (useConflation ? '-conflated' : '');
const dsGraph = service.graph(datasetID);

// Filter out features that have already been accepted or ignored by the user.
Expand Down

0 comments on commit b27359b

Please sign in to comment.