@@ -23,6 +23,13 @@ TMainForm *MainForm;
23
23
24
24
static char buff[MAXSRCTBL]; // source table buffer
25
25
26
+ // ---------------------------------------------------------------------------
27
+ static double str2dbl (AnsiString str)
28
+ {
29
+ double val=0.0 ;
30
+ sscanf (str.c_str ()," %lf" ,&val);
31
+ return val;
32
+ }
26
33
/* get source table -------------------------------------------------------*/
27
34
static char *getsrctbl (const char *path)
28
35
{
@@ -493,7 +500,7 @@ void __fastcall TMainForm::ShowMsg(const char *msg)
493
500
// ---------------------------------------------------------------------------
494
501
void __fastcall TMainForm::UpdateMap (void )
495
502
{
496
- AnsiString title,msg;
503
+ AnsiString title,msg,LatText,LonText ;
497
504
double lat,lon;
498
505
499
506
if (Address->Text ==" " ) {
@@ -506,8 +513,10 @@ void __fastcall TMainForm::UpdateMap(void)
506
513
507
514
for (int i=1 ;i<Table0->RowCount ;i++) {
508
515
if (Table0->Cells [8 ][i]==" " ) continue ;
509
- lat=Table0->Cells [8 ][i].ToDouble ();
510
- lon=Table0->Cells [9 ][i].ToDouble ();
516
+ LatText=Table0->Cells [8 ][i];
517
+ LonText=Table0->Cells [9 ][i];
518
+ lat=str2dbl (LatText);
519
+ lon=str2dbl (LonText);
511
520
title=Table0->Cells [0 ][i];
512
521
msg=" <b>" +Table0->Cells [0 ][i]+" </b>: " +
513
522
Table0->Cells [1 ][i]+" (" +Table0->Cells [7 ][i]+" ), POS: " +
0 commit comments