An open API service indexing awesome lists of open source software.

https://github.com/woosmap/woosmap-autocomplete-searchbox

Woosmap Autocomplete SearchBox to search for Woosmap Localities and fallback on Google Places according to a partial string similarity ratio (fuzzy string matching) and other certain specific criteria.
https://github.com/woosmap/woosmap-autocomplete-searchbox

Last synced: about 1 month ago
JSON representation

Woosmap Autocomplete SearchBox to search for Woosmap Localities and fallback on Google Places according to a partial string similarity ratio (fuzzy string matching) and other certain specific criteria.

Awesome Lists containing this project

README

          

# Autocomplete Localities Fallback Google Places

Lightweight and customizable autocomplete widget to search for [Woosmap Localities](https://developers.woosmap.com/products/localities/search-city-postcode/) and fallback on **Google Places** according to a partial string similarity ratio and other certain specific criteria.

Official Documentation:

## Overview

When Searching for [Woosmap Localities](https://developers.woosmap.com/products/localities/search-city-postcode/) using this widget, a **matching ratio** is computed between the user input and for each returned items.
- If Woosmap Localities return no item with matching **Ratio = 100** (customizable using `breakpointRatio` parameter), the widget populate predictions response with Google Places.
- All returned Woosmap Localities items with **Ratio <= 75** (customizable using `minRatio` parameter) are removed from the predictions pick list.

Check how we [calculate ratio](#ratio--partial-string-similarity) or explore [source code on GitHub](https://github.com/woosmap/woosmap-autocomplete-searchbox).

## Installation

You can use the **jsDelivr** CDN for both JS and CSS.

```html

```

Otherwise, [fork or download the source code](https://github.com/woosmap/woosmap-autocomplete-searchbox) and run the following commands:

#### Install dependencies
```ShellSession
$ npm install
```
#### Run
```ShellSession
$ npm run start
```
#### build
```ShellSession
$ npm run build
```

## Basic Usage
Before you try anything, you need to add an *input* block element and include `autocompletewoosmap.css` and `autocompletewoosmap.js` in your page, via the usual tags:
```html