Changeset 5177 in ntrip
- Timestamp:
- Jun 8, 2013, 1:24:02 PM (12 years ago)
- Location:
- trunk/BNC/src/map
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/map/bncmapwin.cpp
r5176 r5177 63 63 resize(60*ww, 60*ww); 64 64 show(); 65 66 _currLat = 50.090956; // BKG 67 _currLon = 8.663283; // BKG 68 //// beg test 69 slotGotoLocation(); 70 //// end test 65 71 } 66 72 … … 92 98 return; 93 99 } 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); 97 101 _webView->page()->mainFrame()->evaluateJavaScript(QString("initialize( %1 )").arg(location)); 102 } 98 103 104 // 105 //////////////////////////////////////////////////////////////////////////// 106 void 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)); 99 109 //// 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())); 105 113 //// end test 106 114 } -
trunk/BNC/src/map/bncmapwin.h
r5167 r5177 39 39 40 40 public slots: 41 void slotGotoLocation(); 41 42 42 43 private slots: … … 46 47 void loadHtmlPage(); 47 48 QWebView* _webView; 49 double _currLat; 50 double _currLon; 48 51 }; 49 52
Note:
See TracChangeset
for help on using the changeset viewer.