Narweb: code simplification
This commit is contained in:
parent
c2dd597a7f
commit
2cd14580ab
@ -523,11 +523,10 @@ class PlacePages(BasePage):
|
||||
if photo_hdle in self.report.obj_dict[Media]:
|
||||
tracelife += str(imglnk)
|
||||
break # We show only the first image
|
||||
scripts = Html()
|
||||
if self.mapservice == "Google":
|
||||
with Html("script", type="text/javascript",
|
||||
indent=False) as jsc:
|
||||
scripts += jsc
|
||||
if self.mapservice == "Google":
|
||||
# scripts += jsc
|
||||
# Google adds Latitude/ Longitude to its maps...
|
||||
plce = placetitle.replace("'", "\\'")
|
||||
jsc += MARKER_PATH % marker_path
|
||||
@ -538,8 +537,6 @@ class PlacePages(BasePage):
|
||||
latitude, longitude,
|
||||
10)
|
||||
elif self.mapservice == "OpenStreetMap":
|
||||
with Html("script", type="text/javascript") as jsc:
|
||||
scripts += jsc
|
||||
jsc += MARKER_PATH % marker_path
|
||||
jsc += OSM_MARKERS % ([[float(longitude),
|
||||
float(latitude),
|
||||
@ -547,8 +544,6 @@ class PlacePages(BasePage):
|
||||
longitude, latitude, 10)
|
||||
jsc += OPENLAYER
|
||||
else: # STAMEN
|
||||
with Html("script", type="text/javascript") as jsc:
|
||||
scripts += jsc
|
||||
jsc += MARKER_PATH % marker_path
|
||||
jsc += STAMEN_MARKERS % ([[float(longitude),
|
||||
float(latitude),
|
||||
@ -556,7 +551,7 @@ class PlacePages(BasePage):
|
||||
self.stamenopts,
|
||||
longitude, latitude, 10)
|
||||
jsc += OPENLAYER
|
||||
placedetail += scripts
|
||||
placedetail += jsc
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
|
Loading…
Reference in New Issue
Block a user