Changeset 5177 in ntrip


Ignore:
Timestamp:
Jun 8, 2013, 1:24:02 PM (9 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/map
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/map/bncmapwin.cpp

    r5176 r5177  
    6363  resize(60*ww, 60*ww);
    6464  show();
     65
     66  _currLat = 50.090956; // BKG
     67  _currLon =  8.663283; // BKG
     68  //// beg test
     69  slotGotoLocation();
     70  //// end test
    6571}
    6672
     
    9298    return;
    9399  }
    94   double lat = 50.090956; // BKG
    95   double lon =  8.663283; // BKG
    96   QString location = QString("%1, %2").arg(lat,0,'f',8).arg(lon,0,'f',8);
     100  QString location = QString("%1, %2").arg(_currLat,0,'f',8).arg(_currLon,0,'f',8);
    97101  _webView->page()->mainFrame()->evaluateJavaScript(QString("initialize( %1 )").arg(location));
     102}
    98103
     104//
     105////////////////////////////////////////////////////////////////////////////
     106void bncMapWin::slotGotoLocation() {
     107  QString location = QString("%1, %2").arg(_currLat,0,'f',8).arg(_currLon,0,'f',8);
     108  _webView->page()->mainFrame()->evaluateJavaScript(QString("gotoLocation( %1 )").arg(location));
    99109  //// beg test
    100   for (unsigned ii = 1; ii < 100; ii++) {
    101     double latHlp = lat + ii / 10000.0;
    102     double lonHlp = lon + ii / 10000.0;
    103     QString locationHlp = QString("%1, %2").arg(latHlp,0,'f',8).arg(lonHlp,0,'f',8);
    104   }
     110  _currLat += 0.0001;
     111  _currLon += 0.0001;
     112  QTimer::singleShot(1000, this, SLOT(slotGotoLocation()));
    105113  //// end test
    106114}
  • trunk/BNC/src/map/bncmapwin.h

    r5167 r5177  
    3939
    4040 public slots:
     41  void slotGotoLocation();
    4142
    4243 private slots:
     
    4647  void loadHtmlPage();
    4748  QWebView* _webView;
     49  double    _currLat;
     50  double    _currLon;
    4851};
    4952
Note: See TracChangeset for help on using the changeset viewer.