Skip to content

Commit

Permalink
Add administrative and county types (#46)
Browse files Browse the repository at this point in the history
* chore: upgrade deps

* docs: update README

* fix: add icons for county and administrative types

* fix: format sub display for administrative and county types

* fix: refactor sub format

* chore: bump version
  • Loading branch information
raphi authored Feb 23, 2024
1 parent 1f3a453 commit 97245eb
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 328 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ console.log(pka.options); // { "target": <input ... />, "language": "en", "maxRe
| `countrySelect` | AutoComplete | `boolean?` | `true` | Show/hide country selector<sup>[(1)](#ft1)[(2)](#ft2)</sup>. |
| `maxResults` | JS client | `integer` | `5` | Number of results per page. |
| `language` | JS client | `string?` | `undefined` | Preferred language for the results<sup>[(3)](#ft3)</sup>, [two-letter ISO](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Supported languages are `en` and `fr`. By default the results are displayed in their country's language. |
| `types` | JS client | `string[]?` | `undefined` | Type of results to show. Array of accepted values: `street`, `city`, `country`, `airport`, `bus`, `train`, `townhall`, `tourism`. Prepend `-` to omit a type like `['-bus']`. Unset to return all. |
| `types` | JS client | `string[]?` | `undefined` | Type of results to show. Array of accepted values: `street`, `city`, `country`, `administrative`, `county`, `airport`, `bus`, `train`, `townhall`, `tourism`. Prepend `-` to omit a type like `['-bus']`. Unset to return all. |
| `countries` | JS client | `string[]?` | `undefined` | Restrict search in specific countries. Array of [two-letter ISO](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes<sup>[(3)](#ft3)</sup>. |
| `coordinates` | JS client | `string?` | `undefined` | Coordinates to search around. Automatically set when calling [`pka.requestGeolocation()`](#pkarequestgeolocation). |

Expand Down Expand Up @@ -493,6 +493,8 @@ Colors, border-radius, font and overall scale (in `rem`) and even icons are acce

--pka-icon-pin: url('...');
--pka-icon-street: var(--pka-icon-pin);
--pka-icon-administrative: var(--pka-icon-pin);
--pka-icon-county: var(--pka-icon-pin);
--pka-icon-city: url('...');
--pka-icon-airport: url('...');
--pka-icon-bus: url('...');
Expand Down
Loading

0 comments on commit 97245eb

Please sign in to comment.