avo-hq / avo

Build Ruby on Rails apps 10x faster
https://avohq.io
Other
1.5k stars 237 forks source link

Maplibre support #2666

Open sedubois opened 5 months ago

sedubois commented 5 months ago

Feature

Add Maplibre support to Avo to have out of the box map support without requiring a dependency on an external commercial service.

Current workarounds

Sign up to Mapbox (free for 50k map loads/month).

Screenshots or screen recordings

Screenshot 2024-04-07 at 13 08 23

Additional context

Maplibre "originated as an open-source fork of mapbox-gl-js, before their switch to a non-OSS license in December 2020." (ref)

Avo makes use of Mapkick to display a map; Mapkick JS supports Maplibre but Avo depends on the Ruby gem, which makes no reference to Maplibre. Because of this, a Mapbox API token is required to just test out Avo's map feature. By contrast, Maplibre does not require an API token for its demo map/style (it can also be downloaded). Avo could switch to Mapkick JS or add a direct dependency on Maplibre.

On a related note, it would be nice for the map feature to be included in the Avo demo.

adrianthedev commented 5 months ago

We'd love to support that! We haven't received too many requests for this, so we can't prioritize it. Would you be able to send in a contribution?

It seems to me that maybe a patch to the gem upstream is in order so it will support maplibre?

adrianthedev commented 5 months ago

@gabrielgiroe1 can you please add the map view and other map-related things (from the dummy City resource) to the demo?

gabrielgiroe1 commented 5 months ago

@gabrielgiroe1 can you please add the map view and other map-related things (from the dummy City resource) to the demo?

Yes, sure!