Skip to content

Commit a089dbe

Browse files
committed
Fix issue with the wrong quadkey in request.
GetPartitions by quadkey returns 500 Internal Server Error. Was using the wrong method in QueryClient after removed deprecated code. Resolves: OLPEDGE-2478 Relates-To: OLPEDGE-2466 Signed-off-by: Oleksii Zubko <ext-oleksii.zubko@here.com>
1 parent 97d4798 commit a089dbe

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

@here/olp-sdk-dataservice-read/lib/client/QueryClient.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ export class QueryClient {
134134
quadKey.row,
135135
quadKey.column,
136136
quadKey.level
137-
).toQuadKey(),
137+
)
138+
.mortonCode()
139+
.toString(),
138140
billingTag: request.getBillingTag(),
139141
additionalFields: request.getAdditionalFields()
140142
};

tests/integration/olp-sdk-dataservice-read/Handling-versions.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ describe("Handling versions in the requests classes and clients", function() {
177177
};
178178

179179
mockedResponses.set(
180-
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/122003013022/depths/0`,
180+
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0`,
181181
new Response(JSON.stringify(mockedPartitions), { headers })
182182
);
183183

@@ -202,7 +202,7 @@ describe("Handling versions in the requests classes and clients", function() {
202202

203203
expect(callsToApi.length).equals(2); // First to lookup api, second to the Query API.
204204
expect(callToQueryApi.args[0]).equals(
205-
"https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/122003013022/depths/0?" +
205+
"https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0?" +
206206
core.SENT_WITH_PARAM
207207
);
208208
});
@@ -265,7 +265,7 @@ describe("Handling versions in the requests classes and clients", function() {
265265
};
266266

267267
mockedResponses.set(
268-
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/122003013022/depths/0`,
268+
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/142/quadkeys/23605706/depths/0`,
269269
new Response(JSON.stringify(mockedPartitions), { headers })
270270
);
271271

@@ -509,7 +509,7 @@ describe("Handling versions in the requests classes and clients", function() {
509509
);
510510

511511
mockedResponses.set(
512-
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/122003013022/depths/0`,
512+
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0`,
513513
new Response(JSON.stringify(mockedPartitions), { headers })
514514
);
515515

@@ -535,7 +535,7 @@ describe("Handling versions in the requests classes and clients", function() {
535535

536536
expect(client["version"]).equals(0);
537537
expect(callToQueryApi.args[0]).equals(
538-
"https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/122003013022/depths/0?" +
538+
"https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0?" +
539539
core.SENT_WITH_PARAM
540540
);
541541
});
@@ -613,7 +613,7 @@ describe("Handling versions in the requests classes and clients", function() {
613613
);
614614

615615
mockedResponses.set(
616-
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/122003013022/depths/0`,
616+
`https://query.data.api.platform.here.com/query/v1/layers/topology-geometry/versions/0/quadkeys/23605706/depths/0`,
617617
new Response(JSON.stringify(mockedPartitions), { headers })
618618
);
619619

tests/integration/olp-sdk-dataservice-read/VersionedLayerClient.test.ts

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

tests/integration/olp-sdk-dataservice-read/VolatileLayerClient.test.ts

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

tests/integration/olp-sdk-dataservice-read/getTile.test.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)