QtPositioning QML Type

QtPositioning 全局对象为在 QML 中处理基于位置的类型提供了有用的功能。更多

Import Statement: import QtPositioning

方法

详细说明

import QtPositioning

Item {
    property var coordinate: QtPositioning.coordinate(-27.5, 153.1)
}

方法文档

geocircle circle()

构建一个无效的地理圆。

另请参见 geocircle


geocircle circle(coordinate center, real radius)

构建一个以center 为中心、半径为radius 米的地理圆。


point coordToMercator(coordinate coord)

coord 坐标转换为 mercator 坐标并返回。

另请参阅 mercatorToCoord


coordinate coordinate()

构建无效坐标。


coordinate coordinate(real latitude, real longitude, real altitude)

用指定的latitude,longitude 和可选的altitude 构建坐标。latitudelongitude 必须有效,否则将返回无效坐标。

另请参阅 coordinate


coordinate mercatorToCoord(point mercator)

mercator 坐标转换为经纬度坐标。

另请参阅 coordToMercator


geopath path()

构造空地理路径。

另请参阅 geopath


geopath path(list<coordinate> coordinates, real width)

根据坐标和宽度构建地理路径。

另请参阅 geopath


geopolygon polygon()

构造空多边形。

另请参阅 geopolygon


geopolygon polygon(list<coordinate> coordinates)

根据坐标构造多边形。

另请参见 geopolygon


geopolygon polygon(list<coordinate> perimeter, list<list<coordinate>> holes)

根据周长和内孔坐标构造多边形。

另请参见 geopolygon


georectangle rectangle()

构造无效的多边形。

另请参阅 georectangle


georectangle rectangle(list<coordinate> coordinates)

根据坐标列表构造一个正多边形,返回的列表是包含所有坐标的最小列表。

另请参见 georectangle


georectangle rectangle(coordinate topLeft, coordinate bottomRight)

构建一个左上角位于topLeft 、右下角位于bottomRight 的几何矩形。

另请参见 georectangle


georectangle rectangle(coordinate center, real width, real height)

构建一个以center 为中心、宽为width 度、高为height 度的矩形。

另请参阅 georectangle


geoshape shape()

构建无效的地理形状。

另请参阅 geoshape


geocircle shapeToCircle(geoshape shape)

shape 转换为地理圆。

另请参阅 geocircle


geopath shapeToPath(geoshape shape)

shape 转换为 geopath。

另请参阅 geopath


geopolygon shapeToPolygon(geoshape shape)

shape 转换为多边形。

另请参阅 geopolygon


georectangle shapeToRectangle(geoshape shape)

shape 转换为地理矩形。

另请参阅 georectangle


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.