diff --git a/src/RTZassistPanelMain.cpp b/src/RTZassistPanelMain.cpp index 6eb6565..17915d8 100644 --- a/src/RTZassistPanelMain.cpp +++ b/src/RTZassistPanelMain.cpp @@ -467,7 +467,7 @@ int RTZassistPanelMain::ExportGPX() { vector myVectorWaypoints; // end of placeholders - wxString isRefpoint; + wxString isExtension = ""; string readFile = "dom_out.txt"; // intermediate file - make temporary? vector myVector; @@ -486,6 +486,10 @@ int RTZassistPanelMain::ExportGPX() { int c = myVector.size(); for (int z = 0; z < c; z++) { + + if (myVector[z] == "tag:extensions") { + break; + } wxStringTokenizer tokenizer(myVector[z], ":"); while (tokenizer.HasMoreTokens()) @@ -497,12 +501,10 @@ int RTZassistPanelMain::ExportGPX() { myRoute.routeName = tokenizer.GetNextToken(); } - myWaypoint.b_isRefpoint = false; - if (token == "tag") { - isRefpoint = tokenizer.GetNextToken(); - if (isRefpoint == "refpoint") { - myWaypoint.b_isRefpoint = true; + isExtension = tokenizer.GetNextToken(); + if (isExtension == "extension") { + break; // this eliminates RTZ refpoints, which have lat/lon and could be misinterpreted as waypoints. } } @@ -516,13 +518,13 @@ int RTZassistPanelMain::ExportGPX() { if (token == "lat") { myWaypoint.lat = tokenizer.GetNextToken(); - } + } if (token == "lon") { myWaypoint.lon = tokenizer.GetNextToken(); // - if(!myWaypoint.b_isRefpoint) myRoute.waypoints.push_back(myWaypoint); // this eliminates RTZ refpoints, which have lat/lon and could be misinterpreted as waypoints. + myRoute.waypoints.push_back(myWaypoint); // } } diff --git a/src/RTZassistPanelMain.h b/src/RTZassistPanelMain.h index 241f5d3..b49e540 100644 --- a/src/RTZassistPanelMain.h +++ b/src/RTZassistPanelMain.h @@ -40,7 +40,7 @@ class waypoint wxString id; wxString name; wxString lat, lon; - bool b_isRefpoint; + }; class route