Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/clients/afm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## unpublished

- Feature: Add `@polar/plugin-reverse-geocoder` to the client. For details about this plugin, see [the plugin's documentation](https://dataport.github.io/polar/docs/afm/plugin-reverse-geocoder.html).
- Chore: `AddressSearch` is now visible by default in the example configuration to illustrate a working default scenario for the added `ReverseGeocoder`. This did not result in a change to the software's defaults, but merely to the example.

## 2.0.3

- Fix: Use v3.2.2 of `@polar/core` and v3.1.1 of `@polar/plugin-address-search` to resolve issues when using `+` and `-` characters in the search window or using the arrow keys to navigate the entered input.
Expand Down
22 changes: 21 additions & 1 deletion packages/clients/afm/example/polar-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,19 @@ const mapConfiguration = {
],
},
addressSearch: {
displayComponent: false,
searchMethods: [
{
queryParameters: {
searchAddress: true,
searchStreets: true,
searchHouseNumbers: true,
},
type: 'mpapi',
url: 'https://geodienste.hamburg.de/HH_WFS_GAGES?service=WFS&request=GetFeature&version=2.0.0',
},
],
minLength: 3,
waitMs: 300,
},
export: {
showPdf: false,
Expand Down Expand Up @@ -73,6 +85,14 @@ const mapConfiguration = {
atZoomLevel: 3,
},
},
reverseGeocoder: {
url: 'https://geodienste.hamburg.de/HH_WPS',
addLoading: 'plugin/loadingIndicator/addLoadingKey',
removeLoading: 'plugin/loadingIndicator/removeLoadingKey',
zoomTo: 7,
coordinateSource: 'plugin/pins/transformedCoordinate',
addressTarget: 'plugin/addressSearch/selectResult',
},
}

// you may as well use a local array
Expand Down
1 change: 1 addition & 0 deletions packages/clients/afm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@polar/plugin-legend": "^1.1.2",
"@polar/plugin-loading-indicator": "^1.2.1",
"@polar/plugin-pins": "^3.0.0",
"@polar/plugin-reverse-geocoder": "^3.0.1",
"@polar/plugin-scale": "^3.0.0",
"@polar/plugin-toast": "^1.1.2",
"@polar/plugin-zoom": "^1.4.0"
Expand Down
3 changes: 3 additions & 0 deletions packages/clients/afm/src/polar-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import PolarPluginLayerChooser from '@polar/plugin-layer-chooser'
import PolarPluginLegend from '@polar/plugin-legend'
import PolarPluginLoadingIndicator from '@polar/plugin-loading-indicator'
import PolarPluginPins from '@polar/plugin-pins'
import PolarPluginReverseGeocoder from '@polar/plugin-reverse-geocoder'
import PolarPluginScale from '@polar/plugin-scale'
import PolarPluginToast from '@polar/plugin-toast'
import PolarPluginZoom from '@polar/plugin-zoom'
Expand Down Expand Up @@ -105,6 +106,8 @@ polarCore.addPlugins([
layoutTag: NineLayoutTag.MIDDLE_RIGHT,
})
),
// @ts-expect-error | url has to be added with instantiation configuration
PolarPluginReverseGeocoder({}),
])

export default polarCore