Source

omw / omw / templates / trip.html

Full commit
{% extends "base.html" %}
{% block id %}trip{% endblock %}

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

    <script type="text/javascript">
        function initialize() {
            var latlng = new google.maps.LatLng({{ current[0] }}, {{ current[1] }});
            var myOptions = {
                zoom: 15,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };

            var map = new google.maps.Map(document.getElementById("map_canvas"),
                                          myOptions);

            var marker = new google.maps.Marker({
                position: latlng, 
                map: map,
                title: "Current position"
            });
            
      }

    </script>
{% endblock %}

{% block onload %}initialize(){% endblock %}

{% block content %}
    <p>{{ trip['description'] }}</p>
    <div id="map_canvas"></div>
{% endblock %}