Exemplo n.º 1
0
        /// <summary>
        /// given an input gpx file, process the file and conver the
        /// gps locations to locations using the google and geonames
        /// reverse geocoding services, then generate a set of directions
        /// </summary>
        public void processInput(string fileName)
        {
            _inputFileName = fileName;
            _currentTurn   = 0;
            _turns.Clear();
            _path.resetPath();
            //parse the gpx file for locations
            TrackFileParser parser = null;

            if (fileName.EndsWith(".gpx"))
            {
                parser  = new GpxParser(fileName, _path);
                _status = parser.Status;
            }
            else if (fileName.EndsWith(".kml"))
            {
                parser  = new KmlParser(fileName, _path);
                _status = parser.Status;
            }
            processLocations();
        }
 /// <summary>
 /// given an input gpx file, process the file and conver the 
 /// gps locations to locations using the google and geonames
 /// reverse geocoding services, then generate a set of directions
 /// </summary>
 public void processInput(string fileName)
 {
     _inputFileName = fileName;
     _currentTurn = 0;
     _turns.Clear();
     _path.resetPath();
     //parse the gpx file for locations
     TrackFileParser parser = null;
     if (fileName.EndsWith(".gpx")) {
         parser = new GpxParser(fileName, _path);
         _status = parser.Status;
     } else if (fileName.EndsWith(".kml")) {
         parser = new KmlParser(fileName, _path);
         _status = parser.Status;
     }
     processLocations();
 }