This is a Phoenix liveview example application to demonstrate GEO encoding an address and to display the address using a map on a web page.
The GEO encoding is performed via the OpenStreetMap Nominatim service.
Maps are display using leaflet.js and OpenStreetMap.
The application supports displaying multiple maps on a single page.
The code has been extracted form another project as I think it may be useful for others to build upon.
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.setup
- Install Node.js dependencies with
npm install
inside theassets
directory - Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.