@uxf/smart-address
v11.46.0
Published
```bash yarn add @uxf/smart-address ``` ### Loading search options from the smart address #### Params ``` type Params = { term: string; level: number; limit?: number; zip?: number; getLabel?: (address: Location) => string }; ``` #### level: number * 1 = Č
Downloads
204
Readme
@uxf/smart-address
How to install
yarn add @uxf/smart-address
Loading search options from the smart address
Params
type Params = { term: string; level: number; limit?: number; zip?: number; getLabel?: (address: Location) => string };
level: number
- 1 = Číslo domovní (Číslo orientační, Znak čísla orientačního)
- 2 = Ulice
- 3 = Název části obce
- 4 = Název MOP (městský obvod Praha)
- 5 = Název MOMC (městský obvod/městská část)
- 6 = Název obce
- 7 = okres (future)
- 8 = kraj (future)
const options = await SmartAddress.loadAddressOptions({ term: "Sovova", level: 1 });
Options with zip code.
const zipOptions = await SmartAddress.loadZipOptions({ term: "46001" });
Get a specific address by id.
const address = await SmartAddress.getAddress(123456);
Option of location with added extension of electricity distributor, building type etc. by id.
const address = await SmartAddress.getAddressExtended(123456);
Get a specific part of the city by id.
const cityPart = await SmartAddress.getCityPart(123456);
Get a city district by id.
const momc = await SmartAddress.getMomc(123456);
Get city district of Prague by id.
const mop = await SmartAddress.getmop(123456);
Get city street by id.
const street = await SmartAddress.getStreet(123456);