資源簡介
qt調用百度地圖與js通信源碼,在html中,通過javascript調用百度地圖API(這里需要申請成為百度地圖開放API開發者,很好申請的),來顯示地圖;
qt調用javascript方法,來傳遞GPS坐標信息,通過javascript的方法,
把經緯度坐標傳遞給百度地圖,顯示出位置

代碼片段和文件信息
#include?“testwebmap.h“
#include?
#include?
int?main(int?argc?char?*argv[])
{
????QApplication?a(argc?argv);
????testWebMap?w;
????QTextCodec?*codec?=?QTextCodec::codecForName(“System“);
????QTextCodec::setCodecForLocale(codec);
????w.setWindowtitle(Qobject::tr(“GPS定位“));
????w.show();
????return?a.exec();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-03-19?18:11??testweb\
?????目錄???????????0??2018-03-19?17:54??testweb\img\
?????文件???????21662??2016-12-27?15:18??testweb\img\gps.ico
?????文件??????????50??2018-01-29?15:58??testweb\img\myapp.rc
?????文件?????????359??2018-01-26?11:09??testweb\main.cpp
?????文件??????????49??2018-03-19?17:55??testweb\myqrc.qrc
?????文件????????2726??2018-03-19?18:11??testweb\test.html
?????文件?????????460??2018-01-29?16:03??testweb\testweb.pro
?????文件????????4844??2018-03-19?17:56??testweb\testwebmap.cpp
?????文件?????????977??2018-01-29?17:25??testweb\testwebmap.h
?????文件????????5352??2018-02-06?09:09??testweb\testwebmap.ui
評論
共有 條評論