2

Let's say I embed a Google Map in a webpage. The map has markers highlighting a series of places in it, and the webpage has text listing those places. I want the user to be able to click on a link in the text, and have the map center automatically in the corresponding marker (which would also get highlighted).

How can I do this? From what I've read, you can certainly do it with Google Maps' Javascript API, but I was wondering if you could do it too by embedding a map created with Google My Maps. This would make things easier for me: both the process of creating the map, and also of embedding and interfacing it with the rest of the HTML code.

So, I guess that what I'm asking is: can I do what I've described without resorting to the Javascript API (and preferably using My Maps)?

(Crossposted from Stack Overflow, where I was downvoted and nobody answered; I later thought that perhaps I'd have a better chance here).

  • Are the markers ones you have created? Or are they ones that were already in Google Maps? – MaryC.fromNZ Jan 9 '17 at 12:58
  • They are going to be created by me. If I end up using My Maps, I'll create them in My Maps; if I have to use Javascript, I guess I'll have to create them first with code. – PaulJ Jan 9 '17 at 13:07
1

I've done something similar without any coding and just through My Maps by configuring some of the settings available with My Maps enter image description here

If you allow the Map to be publicly accessible through the Link Sharing settings, you can embed it on other web pages.

The location markers within your map can then be made to be clickable links within the embedded map interface though not as links in the host page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.