I'm trying to create a map with lots of markers and info windows using the Google Maps API. I can get a map to display lots of markers and info windows either with the locations in the script or loading them from a file.
What i want to do is put this code:
<script type="text/javascript" src="http://www.tidetimes.org.uk/aberdaron-tide-times.js"></script>
into the info window so the marker will be at the location and when clicked the info window shows the tide time.
I can't find any way of getting this to work within the info window. Can anyone help? Thanks
I'm sorry, I don't fully understand what you are saying. What do you mean exactly by this "What i want to do is put this code into the info window so the marker will be at the location and when clicked the info window shows the tide time."?
First of all, you do not need code inside an info window to give the marker a location. That is one of the markers standard attributes.
Second, I am almost certain you cannot have an event(code) inside your info window. What you can do is when a user clicks the marker, the map will zoom in or out. And you can have another event on that marker later.
Maybe this will help your answer (taken from Google Maps API documentation)
"The InfoWindow's content may contain either a string of text, a snippet of HTML, or a DOM element itself. "