本页内容

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 转换为墨卡托坐标,并返回该坐标。

另请参阅 mercatorToCoord 。

coordinate coordinate()

构建了一个无效的坐标。

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

根据指定的latitude 、longitude 和可选的altitude 构建一个坐标。latitude 和longitude 必须均为有效值,否则将返回一个无效坐标。

另请参阅 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.