# Handle a coordinate
if is_coord(line):
lon, lat, symbol, title = parse_coord(line)
- coords.append((lon, lat, symbol, title))
while i < len(lines):
line = lines[i].strip()
i += 1
if is_path(line) or is_coord(line):
i -= 1
break
+ if len(line) > 0 and title is None: title = line
+ coords.append((lon, lat, symbol, title))
continue
raise RuntimeError(u'Unknown line syntax: ' + line)
if not point_types.has_key(point_type): raise RuntimeError(u'Unknown point type {0}'.format(point_type))
point_type = point_types[point_type]
sql = u'insert into wrmappointcache (page_id, type, point, label) values (%s, %s, POINT(%s, %s), %s)'
- connection.execute(sql, (sledrun_page.page_id, point_type, lon, lat, None))
+ connection.execute(sql, (sledrun_page.page_id, point_type, lon, lat, label))
# Paths
for path_type, coords in paths:
path_type = path_type.lower()