onclick events to marker added

** need to add routing function to main.js that takes an index as a
parameter