Geocode an address with Algolia

This example shows you how to use an autocomplete address smart field to update a PostreSQL geography point (lat, long).

Requirements

  • An admin backend running on forest-express-sequelize

  • An algolia account

  • algoliasearch npm package

How it works

Directory: /models

This directory contains the events.js file where the model is declared.

Directory: /forest

This directory contains the events.js file where the Smart Field Location setteris declared. This smart field will be used to update the value of the addressand locationGeo fields.

The field Location setter should use the address edit widget to enable address autocomplete.

Last updated

Was this helpful?