在本页

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

geoCircle circle(coordinate center, real radius)

构建一个以center 为中心、半径为radius 米的geoCircle

point coordToMercator(coordinate coord)

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

另请参见 mercatorToCoord

coordinate coordinate()

构造一个无效坐标。

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

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

另请参见 coordinate

coordinate mercatorToCoord(point mercator)

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

另请参阅 coordToMercator

geoPath path()

构造一个空geoPath

另请参阅 geoPath

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

根据坐标和宽度构建geoPath

另请参阅 geoPath

geoPolygon polygon()

构造一个空多边形。

另请参见 geoPolygon

geoPolygon polygon(list<coordinate> coordinates)

根据坐标构建多边形。

另请参见 geoPolygon

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

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

另请参见 geoPolygon

geoRectangle rectangle()

构造一个无效的geoRectangle

另请参阅 geoRectangle

geoRectangle rectangle(list<coordinate> coordinates)

从坐标列表中构建geoRectangle ,返回的列表是包含所有坐标的最小列表。

另请参见 geoRectangle

geoRectangle rectangle(coordinate topLeft, coordinate bottomRight)

构造一个geoRectangle ,其左上角位于topLeft ,右下角位于bottomRight

另请参见 geoRectangle

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

构建以center 为中心、宽width 度、高height 度的geoRectangle

另请参见 geoRectangle

geoShape shape()

构造一个无效的geoShape

另请参阅 geoShape

geoCircle shapeToCircle(geoShape shape)

shape 转换为geoCircle

另请参见 geoCircle

geoPath shapeToPath(geoShape shape)

shape 转换为geoPath

另请参见 geoPath

geoPolygon shapeToPolygon(geoShape shape)

shape 转换为多边形。

另请参阅 geoPolygon

geoRectangle shapeToRectangle(geoShape shape)

shape 转换为geoRectangle

另请参见 geoRectangle

© 2026 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.