I am using Google Maps for my website and I wander how can I use the Markers as links? I mean when I click a marker to open a particular link.
Thank you
That's actually very easy to do. Simply attach an event handler to your marker, and then launch the link by setting window.location.href
to your URL. Check out the following examples, which I think should be self explanatory:
Using the v3 API:
Google Maps Marker as a Link
Using the V2 API:
Google Maps Marker as a Link
The above examples will add a marker somewhere in the atlantic ocean. When you click on it, you'll be forwarded to a popular search engine.