从文件读取边界
This commit is contained in:
@@ -1790,6 +1790,19 @@ void OPMapWidget::WPLoad(QString path)//带文件目录参数
|
||||
QJsonObject json = doc.object();
|
||||
|
||||
//安全区解码
|
||||
QJsonArray circlesArray = json.value("geoFence").toObject().value("circles").toArray().at(0).toObject().value("circles").toArray();
|
||||
for(QJsonValue item: circlesArray) {
|
||||
|
||||
}
|
||||
|
||||
QJsonArray polygonsArray = json.value("geoFence").toObject().value("polygons").toArray().at(0).toObject().value("polygon").toArray();
|
||||
for(QJsonValue item: polygonsArray) {
|
||||
//获得边界
|
||||
|
||||
qDebug() << "polygons" << item.toArray().at(0).toDouble() << item.toArray().at(1).toDouble();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//任务解码
|
||||
|
||||
Reference in New Issue
Block a user