diff --git a/packages/plugins/AddressSearch/CHANGELOG.md b/packages/plugins/AddressSearch/CHANGELOG.md index bc2078618..68211ae27 100644 --- a/packages/plugins/AddressSearch/CHANGELOG.md +++ b/packages/plugins/AddressSearch/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## unpublished + +- Fix: Add necessary typecast in configuration examples for `bkg` and `mpapi` search methods. + ## 2.0.0 - Breaking: Upgrade `@masterportal/masterportalapi` from `2.8.0` to `2.40.0` and subsequently `ol` from `7.1.0` to `^9.2.4`. diff --git a/packages/plugins/AddressSearch/README.md b/packages/plugins/AddressSearch/README.md index 499c3f6f7..a00db0ba7 100644 --- a/packages/plugins/AddressSearch/README.md +++ b/packages/plugins/AddressSearch/README.md @@ -51,7 +51,7 @@ addressSearch: { searchAddress: true, searchStreets: true, searchHouseNumbers: true, - }, + } as MpApiParameters, type: 'mpapi', url: 'example-url.com', }, @@ -60,7 +60,7 @@ addressSearch: { filter: { bundesland: 'Schleswig-Holstein', }, - }, + } as BKGParameters, type: 'bkg', url: 'other-example-url.com', }, @@ -119,7 +119,7 @@ Example configuration: queryParameters: { filter: { bundesland: 'Schleswig-Holstein', - }, + } as BKGParameters, }, }, ], @@ -281,7 +281,7 @@ queryParameters: { | searchStreetKey | Boolean? | Defines whether streets should be searched for by key. | | searchStreets | Boolean? | Defines whether street search is active. Precondition to set `searchHouseNumbers` to `true`. | -While all fields are optional, configuring none of them will yield undefined behaviour. At least one search instruction should be set to `true`. +While all fields are optional, configuring none of them will yield undefined behaviour. At least one search instruction should be set to `true`. Since `queryParameters` is a general type it has to be specified that in this case it is of the type `MpApiParameters`. ```js type: 'mpapi' @@ -289,12 +289,12 @@ queryParameters: { searchAddress: true, searchStreets: true, searchHouseNumbers: true, -}, +} as MpApiParameters, ``` ##### addressSearch.searchMethodsObject.queryParameters (type:bkg) -In _BKG_ mode, queryParameter's key-value pairs are used in the service query. E.g. `{filter: { bundesland: 'Bremen' }}` results in the GET request URL having `&filter=bundesland:Bremen` as suffix. +In _BKG_ mode, queryParameter's key-value pairs are used in the service query. E.g. `{filter: { bundesland: 'Bremen' }}` results in the GET request URL having `&filter=bundesland:Bremen` as suffix. Since `queryParameters` is a general type it has to be specified that in this case it is of the type `BKGParameters`. For more options, please check the [official documentation](https://sg.geodatenzentrum.de/web_public/gdz/dokumentation/deu/geokodierungsdienst.pdf) regarding what query parameters are interpreted. @@ -306,7 +306,7 @@ type: 'bkg' queryParameters: { filter: { bundesland: 'Schleswig-Holstein', - }, + } as BKGParameters, }, ```