Click on a Google Map API marker and open a page

Asked

Viewed 592 times

0

I’m making a website that will contain multiple bookmarks, but how to do so when clicking on the bookmark, rather than opening the default window with bookmark information, it directs to another page or opens a modal window?

  • Personal opinion: what seems too broad a question or cannot be reproduced apparently has an extremely specific answer. Luiz, if you have the opportunity, please add some of the code that gave rise to your question. It’s good for the site’s SEO and maybe it helps other people with the same problem. Thanks!

1 answer

1


What you need to do is listen to the event click of a Marker

marker.addListener('click', function() {
  // coloque aqui o que você quer fazer quando clicar no marker
})}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.