Tutorial: Geocoding with Rails 7 + Leaflet.js + Stimulus.js
In this tutorial we are going to add geocoding (address lookup, a.k.a. geoseaching) to a Rails application. The idea is to be able to write an address and get its geo coordinates, latitude and longitude, display that address in a map and save that i...
lporras.hashnode.dev5 min read
Ems
Hello Luis ! Many thanks for this tutorial which helps me a lot with my project ! Really clear and well explained. 👍
I am wondering if I could get your insight on a problem which driving me crazy right now...
I am trying to add custom Icon to my leaflet map. But my problem is : I don't know how to access image assets from my stimulus controller... I always get a 404 and I cannot use the image_tag rails helper within a stimulus controller.
I also tried with the L.divIcon option (html icon) with hardcoded SVG from a constant files. That "works" but I am struggling because the SVG do not display as I would like to. Also i'm not sure if it is a really good practice...
I would really appreciate your help if you have time ! Many thanks.