Skip to content

Commit d46ad38

Browse files
authored
Improve Interactive Map Layers API. (#497)
- Add sorting support to the `iterateFeatures` function. - Extended search parameters to support operators. - Deprecate signatures with supported only one operator "=" for search query parameter. Resolves: OLPEDGE-2716, OLPSUP-17110 Signed-off-by: Oleksii Zubko <ext-oleksii.zubko@here.com>
1 parent 3b185fa commit d46ad38

File tree

4 files changed

+465
-11
lines changed

4 files changed

+465
-11
lines changed

@here/olp-sdk-dataservice-api/lib/RequestBuilder.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ export class UrlBuilder {
5858
url: string,
5959
separator: string,
6060
key: string,
61-
value: string | number | boolean | string[] | number[]
61+
value: string | number | boolean | string[] | number[],
62+
operator = "="
6263
): string {
6364
url += separator;
64-
url += encodeURIComponent(key) + "=";
65+
url += encodeURIComponent(key) + operator;
6566
if (typeof value === "number") {
6667
url += value.toString();
6768
} else if (typeof value === "boolean") {
@@ -106,7 +107,8 @@ export class UrlBuilder {
106107
| boolean
107108
| string[]
108109
| number[]
109-
| { [key: string]: string | number }
110+
| { [key: string]: string | number },
111+
operator = "="
110112
) {
111113
if (value === undefined) {
112114
return;
@@ -129,7 +131,8 @@ export class UrlBuilder {
129131
this.url,
130132
this.hasQuery ? "&" : "?",
131133
key,
132-
value
134+
value,
135+
operator
133136
);
134137
}
135138

0 commit comments

Comments
 (0)