From a5341c314815ed4df97e2b0f94d05322660052cf Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 13 Feb 2010 00:41:01 -0500 Subject: [PATCH] Added a Coordinates class, and updated the LineString class to refer to Coordinates.OPEN_TAG and CLOSE_TAG. --- src/KML.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/KML.py b/src/KML.py index 26e8e71..9b589ad 100644 --- a/src/KML.py +++ b/src/KML.py @@ -110,6 +110,12 @@ class Description(KmlObject): +class Coordinates(KmlObject): + + OPEN_TAG = '' + CLOSE_TAG = '' + + class LineString(KmlObject): OPEN_TAG = '' @@ -140,9 +146,9 @@ class LineString(KmlObject): coords = [] for ls in linestrings: - c_tag_start = ls.find('') - c_start = c_tag_start + len('') - c_end = ls.find('') + c_tag_start = ls.find(Coordinates.OPEN_TAG) + c_start = c_tag_start + len(Coordinates.OPEN_TAG) + c_end = ls.find(Coordinates.CLOSE_TAG) c = ls[ c_start : c_end ] coords.append(c) -- 2.43.2