Ejemplo n.º 1
0
def embed_map(stops):
    """
    Embed a google map in the page, showing directions
    along the passed stops. The stop[0] is the origin,
    stop[-1] the destination. Intermediate stops are
    waypoints on the route.
    """
    orig, waypoints, dest = _split_stops(stops)

    return loader.get_template("transport/maps/embed.html").render(
        Context({"orig": orig, "waypoints": waypoints, "dest": dest, "key": settings.GOOGLE_MAPS_BROWSER_KEY})
    )
Ejemplo n.º 2
0
def embed_map(stops):
    """
    Embed a google map in the page, showing directions
    along the passed stops. The stop[0] is the origin,
    stop[-1] the destination. Intermediate stops are
    waypoints on the route.
    """
    orig, waypoints, dest = _split_stops(stops)

    return loader.get_template('transport/maps/embed.html').render(
        {
            'orig': orig,
            'waypoints': waypoints,
            'dest': dest,
            'key': settings.GOOGLE_MAPS_BROWSER_KEY,
        }
    )