Changeset d33326a in OpenWorkouts-current for ow/templates


Ignore:
Timestamp:
Jan 19, 2019, 5:47:10 PM (5 years ago)
Author:
borja <borja@…>
Branches:
current, feature/docs, master
Children:
b22a9d2
Parents:
b030195
Message:

Accept two new parameters to the js leaflet map builder:

  • map_id: the id of the html element that is the container for the map
  • elevation: true if we want to show the Leaflet.Elevation chart, false otherwise.

Added a fit_bounds() call suggested in Leaflet.Elevation docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/templates/workout.pt

    rb030195 rd33326a  
    152152    <script type="text/javascript" tal:condition="context.has_gpx">
    153153     var workout_map = owjs.map({
     154         map_id: 'map',
    154155         latitude: ${start_point['latitude']},
    155156         longitude: ${start_point['longitude']},
     
    159160         end_icon: '${request.static_url('ow:static/components/leaflet-gpx/pin-icon-end.png')}',
    160161         shadow: '${request.static_url('ow:static/components/leaflet-gpx/pin-shadow.png')}',
     162         elevation: true
    161163     });
    162164     workout_map.render();
Note: See TracChangeset for help on using the changeset viewer.