How to call javascript function from js.erb

I am new to ruby this might be something which is obvious.
I am trying to call my addmarker() function which can add a marker to my
Google map.
In my js.erb i tried to include the function call within the
but the function addmarker() is not being called.

Has anyone faced a similar problem ?

I am trying to avoid using a gem for my case.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs