Skip to content

Instantly share code, notes, and snippets.

@mathildathompson
Created May 3, 2013 19:32
Show Gist options
  • Save mathildathompson/5513201 to your computer and use it in GitHub Desktop.
Save mathildathompson/5513201 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Bucketlist</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
<div class="googlemaps">
<script type = "text/javascript" src= "https://maps.googleapis.com/maps/api/js?key=AIzaSyC74gnSe7p17ulcZUzgPJHxYurGg2bjRYg&sensor=false">
</script>
<script type="text/javascript">
$(function() {
initMap();
//add here var items that converts ToDoItems to JSON, take out the var to make to global
items = <%=raw(ToDoItem.all.to_json) %>
<% ToDoItem.all.each do |item| %>
addMarker(<%=item.latitude%>, <%=item.longitude%>, '<%=item.name%>');
<%end%>
});
</script>
</div>
</head>
<body>
<%= yield %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment