Skip to content

Commit

Permalink
added project location map
Browse files Browse the repository at this point in the history
  • Loading branch information
jseppi committed Feb 8, 2012
1 parent a8b2ea0 commit 3739303
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions BridgingWaters/bwapp/templates/project_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
Project #{{p.id}} - {{p.title}}
{% endblock %}

{% block more_scripts %}
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
{% endblock %}

{% block content %}
{% with loc=p.location_set.all|first comm_info=p.communityinfo_set.all|first geo_conds=p.geoconditions_set.all|first%}
<h2>
Expand Down Expand Up @@ -72,6 +76,23 @@ <h3>Location Information</h3>
<strong>Geographic Location:</strong> {{loc.latitude}}, {{loc.longitude}}<br/>

TODO: Map showing location of project
<div id="map" style="width: 340px; height: 200px"></div>

<script type="text/javascript">
var myLatLng = new google.maps.LatLng({{loc.latitude}},{{loc.longitude}});
var myOptions = {
zoom: 8,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map"), myOptions);

var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: "{{loc.name}}"
});
</script>
</div>
<div class="span-9 last">
<h3>Community Information</h3>
Expand Down

0 comments on commit 3739303

Please sign in to comment.