From a9c4291631186147df6c46253e0cd25edc6ef8f5 Mon Sep 17 00:00:00 2001 From: Benjamin Clark Date: Fri, 26 Jan 2024 11:37:59 -0500 Subject: [PATCH] Fix #1128 by reinstating the fb_ml_road_url param - purely for debug purposes. --- modules/services/MapWithAIService.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/services/MapWithAIService.js b/modules/services/MapWithAIService.js index 53607976e1..8d0af155a9 100644 --- a/modules/services/MapWithAIService.js +++ b/modules/services/MapWithAIService.js @@ -2,6 +2,8 @@ import { Tiler } from '@rapid-sdk/math'; import { AbstractSystem } from '../core/AbstractSystem'; import { Graph, Tree } from '../core/lib'; +import { utilStringQs } from '@rapid-sdk/util'; + import { osmEntity, osmNode, osmWay } from '../osm'; import { utilFetchResponse } from '../util'; @@ -260,7 +262,10 @@ export class MapWithAIService extends AbstractSystem { qs.crop_bbox = taskExtent.toParam(); } - const url = APIROOT + '?' + mapwithaiQsString(qs, true); // true = noencode + const customUrlRoot = utilStringQs(window.location.hash).fb_ml_road_url; + + const urlRoot = customUrlRoot || APIROOT; + const url = urlRoot + '?' + mapwithaiQsString(qs, true); // true = noencode return url;