Geography : geoclose : force to show one point in case of multiple events
at the same place. svn: r19213
This commit is contained in:
parent
2bca3eb56f
commit
9f28ab87eb
@ -122,6 +122,12 @@ class LifeWayLayer(gobject.GObject, osmgpsmap.GpsMapLayer):
|
||||
else:
|
||||
ctx.line_to(map_points[idx_pt][0], map_points[idx_pt][1])
|
||||
ctx.stroke()
|
||||
if len(map_points) == 1 : # We have only one point
|
||||
crdx = map_points[0][0]
|
||||
crdy = map_points[0][1]
|
||||
ctx.move_to(crdx, crdy)
|
||||
ctx.line_to(crdx + 1, crdy + 1)
|
||||
ctx.stroke()
|
||||
|
||||
for comment in self.lifeways_comment:
|
||||
ctx = drawable.cairo_create()
|
||||
|
@ -259,6 +259,11 @@ class GeoClose(GeoGraphyView):
|
||||
for mark in marks:
|
||||
startlat = float(mark[3])
|
||||
startlon = float(mark[4])
|
||||
not_stored = True
|
||||
for idx in range(0, len(points)):
|
||||
if points[idx][0] == startlat and points[idx][1] == startlon:
|
||||
not_stored = False
|
||||
if not_stored:
|
||||
points.append((startlat, startlon))
|
||||
self.lifeway_layer.add_way(points, color)
|
||||
if mark:
|
||||
|
Loading…
Reference in New Issue
Block a user