Permalink
Browse files

added setting to disable age display

  • Loading branch information...
1 parent f54c56b commit 645d0beec05c8571b9f12975b4bc1735a1c2e95c @trey0 trey0 committed with Intelligent Robotics Group Sep 2, 2011
Showing with 8 additions and 3 deletions.
  1. +1 −0 geocamTrack/defaultSettings.py
  2. +7 −3 geocamTrack/models.py
@@ -15,3 +15,4 @@
GEOCAM_TRACK_START_NEW_LINE_DISTANCE_METERS = None
GEOCAM_TRACK_KML_REFRESH_TIME_SECONDS = 5
+GEOCAM_TRACK_SHOW_CURRENT_POSITION_AGE = False
View
@@ -143,12 +143,16 @@ def writeCurrentKml(self, out, positions=None, iconStyle=None):
return
if iconStyle == None:
iconStyle = self.iconStyle
- age = TimeUtil.getTimeShort(pos.timestamp)
+ if settings.GEOCAM_TRACK_SHOW_CURRENT_POSITION_AGE:
+ age = TimeUtil.getTimeShort(pos.timestamp)
+ ageStr = ' (%s)' % age
+ else:
+ ageStr = ''
out.write("""
<Placemark>
- <name>%(name)s (%(age)s)</name>
-""" % dict(name=self.name, age=age))
+ <name>%(name)s%(ageStr)s</name>
+""" % dict(name=self.name, ageStr=ageStr))
if iconStyle:
out.write("<Style>\n")
iconStyle.writeKml(out, pos.getHeading())

0 comments on commit 645d0be

Please sign in to comment.