From 9d2d5b30d0506aa0e2d3ed7cfa3dea1a538717fc Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 5 Apr 2024 13:35:46 +0200 Subject: [PATCH] fix --- rowers/interactiveplots.py | 158 ------------------------------------- 1 file changed, 158 deletions(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 804ebc52..cd4cab81 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -926,164 +926,6 @@ def interactive_histoall(theworkouts, histoparam, includereststrokes, def course_map(course): -<<<<<<< HEAD -======= - latmean, lonmean, coordinates = course_coord_center(course) - if course.with_cn_nav_waypoints: - latmean, lonmean, coordinates = course_coord_crewnerd_navigation(course) - lat_min, lat_max, long_min, long_max = course_coord_maxmin(course) - - coordinates = course_spline(coordinates) - - scoordinates = "[" - - for index, row in coordinates.iterrows(): - scoordinates += """[{x},{y}], - """.format( - x=row['latitude'], - y=row['longitude'] - ) - - scoordinates += "]" - - polygons = GeoPolygon.objects.filter( - course=course).order_by("order_in_course") - - plabels = '' - - for p in polygons: - coords = polygon_coord_center(p) - - plabels += """ - var marker = L.marker([{latbegin}, {longbegin}]).addTo(mymap); - marker.bindPopup("{name}"); - - """.format( - latbegin=coords[0], - longbegin=coords[1], - name=p.name - ) - - pcoordinates = """[ - """ - - for p in polygons: - pcoordinates += """[ - [""" - - points = GeoPoint.objects.filter(polygon=p).order_by("order_in_poly") - - for pt in points: - pcoordinates += "[{x},{y}],".format( - x=pt.latitude, - y=pt.longitude - ) - - # remove last comma - pcoordinates = pcoordinates[:-1] - pcoordinates += """] - ], - """ - - pcoordinates += """ - ]""" - - script = """ - - """.format( - id=course.id, - latmean=latmean, - lonmean=lonmean, - scoordinates=scoordinates, - pcoordinates=pcoordinates, - plabels=plabels - ) - - div = """ -
- """.format( - id=course.id, - ) ->>>>>>> develop course_dict = GeoCourseSerializer(course).data