working with explanation
This commit is contained in:
@@ -2225,21 +2225,25 @@ def leaflet_chart_compare(course,workoutids,labeldict={},startenddict={}):
|
||||
script += """
|
||||
var latlongs = {scoordinates}
|
||||
var polyline = L.polyline(latlongs, {{color:'{color}'}}).addTo(mymap)
|
||||
polyline.bindPopup("<b>{label}</b>")
|
||||
polyline.bindPopup("<b>{label}</b>",{{ autoPan: false, autoClose: false }}).openPopup()
|
||||
polyline.on('mouseover',function(ev) {{
|
||||
ev.target.openPopup();
|
||||
}});
|
||||
polyline.on('dblclick', function (e) {{
|
||||
mymap.removeLayer(this);
|
||||
}});
|
||||
mymap.fitBounds(polyline.getBounds())
|
||||
""".format(
|
||||
scoordinates=scoordinates,
|
||||
color=color,
|
||||
label=label
|
||||
label=label,
|
||||
id=id,
|
||||
)
|
||||
|
||||
script += """
|
||||
|
||||
</script>
|
||||
"""
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user