diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py
index bcf1aac4..a10c5763 100644
--- a/rowers/interactiveplots.py
+++ b/rowers/interactiveplots.py
@@ -890,7 +890,7 @@ def leaflet_chart2(lat,lon,name=""):
)
div = """
-
+
"""
diff --git a/rowers/templates/map_view.html b/rowers/templates/map_view.html
index 1ac95005..08faca97 100644
--- a/rowers/templates/map_view.html
+++ b/rowers/templates/map_view.html
@@ -29,14 +29,13 @@
-
Map View
{% if user.is_authenticated and mayedit %}
@@ -52,7 +51,7 @@
{% endif %}
-
+
{{ mapdiv|safe }}
diff --git a/rowers/views.py b/rowers/views.py
index 3a659a1a..20d7b897 100644
--- a/rowers/views.py
+++ b/rowers/views.py
@@ -6439,6 +6439,10 @@ def workout_map_view(request,id=0):
mapscript,mapdiv = leaflet_chart2(rowdata.df[' latitude'],
rowdata.df[' longitude'],
row.name)
+ else:
+ mapscript = ""
+ mapdiv = ""
+
mayedit=0
if not request.user.is_anonymous():
r = getrower(request.user)