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 26, 2024
1 parent 9484e8e commit 07376b2
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 @@ -192,8 +193,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 07376b2

Please sign in to comment.