Listing 1. mashup.rhtml, the First (Simple) Version of Our Map

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <script
src="http://maps.google.com/maps?file=api&amp;v=1&amp;key=ABQIAAAAQQK9JhAXQ9eq-G55q\gu1ExTnGAXa-Bs2i826H4DeSQaC3Vqy-xSjDFaTYAO0N5YPQWIEeUbqJMhhbA"
    type="text/javascript"></script>
  </head>
  <body>
    <h2>Here is your map</h2>
    <div id="map" style="width: 400px; height: 400px"></div>
    <script type="text/javascript">

    var map = new GMap(document.getElementById("map"));
    map.centerAndZoom(new GPoint(-87.740070, 42.037030), 13);

    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());

<% array = [-87.740070, -87.730000] %>
<% array.each_with_index do |item, index| %>

    var myMarker<%= index %> = new GMarker(new GPoint(<%= item %>,
42.037030));
    map.addOverlay(myMarker<%= index %>);

<% end %>
    </script>
<h2>Here are the locations</h2>
<ul>
<% array.each do |item| %>
    <li><%= item %></li>
<% end %>
</ul>

  </body>
</html>

