# #107 How to display locations on a map with Mapbox API and gem Mapkick like AirBnB

- URL: https://superails.com/posts/ruby-on-rails-107-how-to-display-locations-on-a-map-with-mapbox-api-and-gem-mapkick-like-airbnb
- Published: 2023-01-30
- Duration: 15:38
- Access: free
- Topics: mapkick api, gem mapkick, map markers
- Playlists: Maps & Geolocation

In the previous episode we learnt to use gem Geocoder to calculate COORDINATES (latitude, longitude) based on address.
In this episode, we will display multiple coordinates on a map. Together with Geocoder search, this will empower us to create interactive maps like AirBnB does!
We will also make the links to the locations CLICKABLE!

Text description: https://blog.corsego.com/gem-mapkick-rb
Episode source code: https://github.com/corsego/107-gem-mapkick/commit/58295c740ec2a0bb96717a31095d93463c15fe03
Gem mapkick: https://github.com/ankane/mapkick

0:00 Previous work with Geocoding
0:54 Airbnb example
1:46 Install Mapkick-RB
2:45 MAPBOX_ACCESS_TOKEN
3:45 display a map with different options
7:23 separate map for each location
8:27 clickable links to locations
10:55 display all locations on ONE map
11:45 customize JSON data
13:41 force JSON data to respond to search params

## Chapters

- 0:00 Previous work with Geocoding
- 0:54 Airbnb example
- 1:46 Install Mapkick-RB
- 2:45 MAPBOX_ACCESS_TOKEN
- 3:45 display a map with different options
- 7:23 separate map for each location
- 8:27 clickable links to locations
- 10:55 display all locations on ONE map
- 11:45 customize JSON data
- 13:41 force JSON data to respond to search params
