OpenLayers学习笔记(四)— QML显示html中openlayers地图的坐标
GitHub:八至
作者:狐狸家的鱼
本文链接:实现QML中显示html中地图的坐标
如何QML与HTML通信已经在这篇文章 QML与HTML通信之画图 详细讲述了
1.HTML
var coord;
map.on('singleclick',(evt)=>{
coord = ol.coordinate.toStringXY(ol.proj.transform(evt.coordinate,'EPSG:3857','EPSG:4326'),2);
content.changeText(coord);
});
2.QML
(1)WebChannel中
function changeText(n