places

:globe_with_meridians: Turn any into an address autocomplete

Github星跟蹤圖

header

Version Build Status License Downloads jsDelivr Hits

Algolia Places provides a fast, distributed and easy way to use an address search autocomplete JavaScript library on your website.

See the website for more information.

Read the blog post introducing Algolia Places.

Fill the Google form to report any irrelevant results.

Demo

Watch more examples on the website.

demo

Getting started

To use Algolia Places, all you need is an <input> and some JavaScript code that will load
and use the places.js library.

CDN <script>

Our JavaScript library is available on the jsDelivr CDN and also on cdnjs.

<script src="https://cdn.jsdelivr.net/npm/places.js@1.18.1"></script>

Version is the latest version.

Here's a small example using it:

<input type="search" id="address-input" placeholder="Where are we going?" />

<script>
  var placesAutocomplete = places({
    appId: <YOUR_PLACES_APP_ID>,
    apiKey: <YOUR_PLACES_API_KEY>,
    container: document.querySelector('#address-input')
  });
</script>

Using npm

Algolia Places is also available on npm.

Install the module:

npm install places.js --save

Put an <input> in your html page:

<input type="search" id="address-input" placeholder="Where are we going?" />

Initialize the places.js library:

var places = require('places.js');
var placesAutocomplete = places({
  appId: <YOUR_PLACES_APP_ID>,
  apiKey: <YOUR_PLACES_API_KEY>,
  container: document.querySelector('#address-input')
});

Full documentation is available on the Algolia Places website.

Contributing

Wanna contribute? Awesome, please read the contributing guide.

主要指標

概覽
名稱與所有者algolia/places
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台
許可證MIT License
所有者活动
創建於2016-03-22 09:01:46
推送於2023-02-02 08:40:26
最后一次提交2022-07-19 09:30:59
發布數103
最新版本名稱v1.19.0 (發布於 )
第一版名稱v0.0.2 (發布於 )
用户参与
星數5.3k
關注者數133
派生數231
提交數1.3k
已啟用問題?
問題數352
打開的問題數2
拉請求數727
打開的拉請求數0
關閉的拉請求數109
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?