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