Location and entry maps

used MapBox Api to generate map on location show page.  
--map displays marker for each entry near the map center.
--javascript is in the html file.  I was having trouble getting the ruby variables to work in a seperate js.erb file.  Help would be appreciated.
I don't think I understand.  I am using the default application layout.  So, it is rendering the layout head, then this additional head is rendered in (through?) the <%= yield %> in the application layout.