---
title: "Discussion on \"Tutorial: Geocoding with Rails 7 + Leaflet.js + Stimulus.js\" | Hashnode"
description: "Discussion on \"Tutorial: Geocoding with Rails 7 + Leaflet.js + Stimulus.js\". Geocoding with Rails demo with Leaflet"
url: "https://hashnode.com/posts/tutorial-geocoding-with-rails-7-leafletjs-stimulusjs/62fd02b30cfd6de8c7d78508"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Tutorial: Geocoding with Rails 7 + Leaflet.js + Stimulus.js](https://lporras.hashnode.dev/tutorial-geocoding-with-rails-7-leafletjs-stimulusjs?utm_source=hashnode&utm_medium=feed)

Geocoding with Rails demo with Leaflet

Aug 17, 2022 · 5 min read · lporras.hashnode.dev  
Updated Aug 31, 2022  
Read the article

-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#leaflet](https://hashnode.com/tag/leaflet)
-   [#geocoding](https://hashnode.com/tag/geocoding)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#english](https://hashnode.com/tag/english)

## Written by

[Luis Porras](https://hashnode.com/@lporras16)

@lporras16 · Barranquilla, Colombia

  
[View profile](https://hashnode.com/@lporras16)

Software Developer @Bairesdev

I'm a Barranquillero Developer. Expert in Ruby, Node.js, Rails React.js working currently in BairesDev

## Responses 1

Markdown supported · ⌘↵ to post

[Ems](https://hashnode.com/@emsems)

[May 12, 2023](https://hashnode.com/posts/tutorial-geocoding-with-rails-7-leafletjs-stimulusjs/62fd02b30cfd6de8c7d78508/comment/645db209b518077697da98c2)

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.
