Esempio n. 1
0
        public MapUploader(string connectionString, string columnName, string fileLocation, string tableName, int srid,
                           bool geographyMode, StringBuilder log, string logFile)
        {
            _connectionString    = connectionString;
            _placemarkColumnName = columnName;
            _tableName           = tableName;
            _geographyMode       = geographyMode;
            _srid       = srid;
            _log        = log;
            _logFile    = logFile;
            _sqlGeoType = geographyMode == true ? "geography" : "geometry";
            Kml kml = KMLParser.Parse(fileLocation);

            InitializeMapFeatures(kml);
            InitializeBackgroundWorker();
        }
Esempio n. 2
0
        public void Upload(string columnName, string fileLocation, string tableName, int srid, bool geographyMode)
        {
            _placemarkColumnName = columnName;
            _tableName           = tableName;
            _geographyMode       = geographyMode;
            _srid       = srid;
            _sqlGeoType = geographyMode ? "geography" : "geometry";
            Kml kml = KMLParser.Parse(fileLocation);

            InitializeMapFeatures(kml);
            InitializeBackgroundWorker();
#if !DEBUG
            _worker.RunWorkerAsync();
#else
            DoWork();
#endif
        }