1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-25 19:44:12 -04:00

Map: Add DSC and VLF transmitters. Fix removal of polylines from 3D map. Add find support for polylines and polygoins

This commit is contained in:
Jon Beniston
2023-05-15 16:47:29 +01:00
parent 7fe09b9a20
commit a111c1f1a0
8 changed files with 161 additions and 61 deletions
+20
View File
@@ -77,6 +77,7 @@ QJsonObject CZML::update(PolygonMapItem *mapItem)
if ( !mapItem->m_itemSettings->m_enabled
|| !mapItem->m_itemSettings->m_display3DTrack
|| filter(mapItem)
|| mapItem->m_deleted
)
{
// Delete obj completely (including any history)
@@ -147,6 +148,15 @@ QJsonObject CZML::update(PolygonMapItem *mapItem)
polygon.insert("extrudedHeight", mapItem->m_extrudedHeight);
}
// We need to have a position, otherwise viewer entity tracking doesn't seem to work
QJsonArray coords {
mapItem->m_longitude, mapItem->m_latitude, mapItem->m_altitude
};
QJsonObject position {
{"cartographicDegrees", coords},
};
obj.insert("position", position);
obj.insert("polygon", polygon);
obj.insert("description", mapItem->m_label);
@@ -165,6 +175,7 @@ QJsonObject CZML::update(PolylineMapItem *mapItem)
if ( !mapItem->m_itemSettings->m_enabled
|| !mapItem->m_itemSettings->m_display3DTrack
|| filter(mapItem)
|| mapItem->m_deleted
)
{
// Delete obj completely (including any history)
@@ -214,6 +225,15 @@ QJsonObject CZML::update(PolylineMapItem *mapItem)
polyline.insert("altitudeReference", m_heightReferences[mapItem->m_altitudeReference]); // Custom code in map3d.html
}
// We need to have a position, otherwise viewer entity tracking doesn't seem to work
QJsonArray coords {
mapItem->m_longitude, mapItem->m_latitude, mapItem->m_altitude
};
QJsonObject position {
{"cartographicDegrees", coords},
};
obj.insert("position", position);
obj.insert("polyline", polyline);
obj.insert("description", mapItem->m_label);