-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace geocoder address search with servicemap (#508)
* Replace geocoder address search with servicemap * Remove extra & from url * bring typing similar to public-ui Can't yet upgrade dependencies, therefore copied over types * utilize SERVICE_MAP_URL and move that to utils/constants
- Loading branch information
1 parent
b2f1d49
commit 40ebb30
Showing
7 changed files
with
117 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,63 @@ | ||
export type ControlPosition = "topleft" | "topright" | "bottomleft" | "bottomright"; | ||
export type ControlPosition = "topleft" | "topright" | "bottomleft" | "bottomright"; | ||
|
||
interface ServiceMapAddress { | ||
object_type: "address"; | ||
name: { | ||
fi: string; | ||
sv: string; | ||
en: string; | ||
}; | ||
number: string; | ||
number_end: string; | ||
letter: string; | ||
modified_at: string; | ||
municipality: { | ||
id: string; | ||
name: { | ||
fi: string; | ||
sv: string; | ||
}; | ||
}; | ||
street: { | ||
name: { | ||
fi: string; | ||
sv?: string; | ||
en?: string; | ||
}; | ||
}; | ||
location: { | ||
type: "Point"; | ||
coordinates: [number, number]; | ||
}; | ||
}; | ||
|
||
export interface ServiceMapResponse { | ||
count: number; | ||
next: string | null; | ||
previous: string | null; | ||
results: Array<ServiceMapAddress>; | ||
}; | ||
|
||
export interface AddressResult { | ||
x: number; | ||
y: number; | ||
label: string; | ||
}; | ||
|
||
export interface ParseArgument<TData> { | ||
data: TData; | ||
}; | ||
|
||
export interface SearchArgument { | ||
query: string; | ||
}; | ||
|
||
export declare type PointTuple = [number, number]; | ||
export declare type BoundsTuple = [PointTuple, PointTuple]; | ||
export interface SearchResult<TRawResult = any> { | ||
x: number; | ||
y: number; | ||
label: string; | ||
bounds: BoundsTuple | null; | ||
raw: TRawResult; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1699,6 +1699,13 @@ | |
dependencies: | ||
regenerator-runtime "^0.14.0" | ||
|
||
"@babel/runtime@^7.12.1": | ||
version "7.25.0" | ||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb" | ||
integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw== | ||
dependencies: | ||
regenerator-runtime "^0.14.0" | ||
|
||
"@babel/runtime@^7.7.6": | ||
version "7.24.5" | ||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.5.tgz#230946857c053a36ccc66e1dd03b17dd0c4ed02c" | ||
|
@@ -6808,15 +6815,20 @@ locate-path@^7.1.0: | |
dependencies: | ||
p-locate "^6.0.0" | ||
|
||
lodash-es@^4.17.10, lodash-es@^4.17.15: | ||
lodash-es@^4.17.10: | ||
version "4.17.21" | ||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" | ||
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== | ||
|
||
lodash-es@^4.17.15: | ||
version "4.17.15" | ||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" | ||
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== | ||
|
||
lodash.debounce@^4.0.8: | ||
version "4.0.8" | ||
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" | ||
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= | ||
integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== | ||
|
||
lodash.escape@^4.0.1: | ||
version "4.0.1" | ||
|
@@ -8517,13 +8529,13 @@ [email protected]: | |
leaflet.fullscreen "1.4.5" | ||
prop-types "^15.6.x" | ||
|
||
react-leaflet@^2.4.0: | ||
version "2.7.0" | ||
resolved "https://registry.yarnpkg.com/react-leaflet/-/react-leaflet-2.7.0.tgz#0e0e452a4903029f0bb564771eab8cf9db8e4517" | ||
integrity sha512-pMf5eRyWU8RH9HohM2i0NZymcWHraJA1m6iMFYu94/01PAaBJpOyxORZJmN6cV9dBzkVWaLjAAHTNmxbwIpcfw== | ||
react-leaflet@^2.8.0: | ||
version "2.8.0" | ||
resolved "https://registry.yarnpkg.com/react-leaflet/-/react-leaflet-2.8.0.tgz#14bfc77b6ae8263d3a62e0ba7a39539c05973c6f" | ||
integrity sha512-Y7oHtNrrlRH8muDttXf+jZ2Ga/X7jneSGi1GN8uEdeCfLProTqgG2Zoa5TfloS3ZnY20v7w+DIenMG59beFsQw== | ||
dependencies: | ||
"@babel/runtime" "^7.9.2" | ||
fast-deep-equal "^3.1.1" | ||
"@babel/runtime" "^7.12.1" | ||
fast-deep-equal "^3.1.3" | ||
hoist-non-react-statics "^3.3.2" | ||
warning "^4.0.3" | ||
|
||
|