在桌面平台上定位API支持 [英] Positioning API support on desktop platforms

查看:124
本文介绍了在桌面平台上定位API支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用HTML5 geoposition API来构建一个webkit应用程序来获取当前坐标。我也开启了地理位置功能,但未能以错误开始


启动Geolocation服务失败


然后我尝试使用 QGetPositionInfoSource ,但找不到任何可用的源。我想知道,桌面应用程序支持定位API吗? 这是一个很大的 no-no



直接从文档中获取:


Qt Positioning API提供定位信息QML和C ++接口。目前,在 Android BlackBerry 10 iOS Linux (使用 GeoClue <


这同样适用于Qt 5.4,可以在相应的快照文档页面中看到。


$ b

UPDATE



支持整个 BlackBerry 平台已经被删除。另一方面,桌面平台上对定位API的支持将在下一个Qt 5.6发布版本中提供。目前的文档快照很清楚:


Qt定位API通过QML和C ++接口提供定位信息。



目前API在 Android iOS OS X Linux (使用 GeoClue 版本0.12.99), Windows (将 GPS接收器暴露为提供NMEA句子的串行端口)和 WinRT (使用 Windows。 Devices.Geolocation )。


因此,请下载开发快照并尝试使用这个新的桌面功能。


I've tried to build a webkit app using HTML5 geoposition APIs to get the current coordinates. I've also turned on the geolocation feature but it fails to start with error

Failed to start Geolocation service

Then I've tried to use QGetPositionInfoSource, but it can't find any available source to use. I wonder, is Positioning API supported on desktop applications?

解决方案

That's a big no-no.

Directly from the documentation:

The Qt Positioning API provides positioning information via QML and C++ interfaces. Currently the API is supported on Android, BlackBerry 10, iOS and Linux (using GeoClue).

The same applies for Qt 5.4 as can be seen in the corresponding snapshot documentation page here.


UPDATE

Support for the whole BlackBerry platform has been dropped. On the other hand, support for Positioning API on desktop platforms will be available with the next release of the framework, Qt 5.6. The current documentation snapshot is pretty clear about that:

The Qt Positioning API provides positioning information via QML and C++ interfaces.

Currently the API is supported on Android, iOS, OS X, Linux (using GeoClue version 0.12.99), Windows (with GPS receivers exposed as a serial port providing NMEA sentences), and WinRT (using Windows.Devices.Geolocation).

Thus, download a development snapshot and try out this new desktop feature.

这篇关于在桌面平台上定位API支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆