1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 06:04:39 -04:00

Map updates.

Add support for different map types (street/satellite) and different map
providers.
Support finding real world addresses on the map.
Add Maidenhead locator converter.
Add Beacons.
Allow data sources to be selected by a user.
Add context menu to allow setting an object as a target, setting center
frequency and adjusting display order.
This commit is contained in:
Jon Beniston
2021-01-22 14:54:22 +00:00
parent c8d07396d2
commit 446749cbbb
41 changed files with 2469 additions and 266 deletions
+20
View File
@@ -35,6 +35,14 @@ const QStringList MapSettings::m_pipeURIs = {
QStringLiteral("sdrangel.feature.startracker")
};
// GUI combo box should match ordering in this list
const QStringList MapSettings::m_mapProviders = {
QStringLiteral("osm"),
QStringLiteral("esri"),
QStringLiteral("mapbox"),
QStringLiteral("mapboxgl")
};
MapSettings::MapSettings()
{
resetToDefaults();
@@ -43,6 +51,10 @@ MapSettings::MapSettings()
void MapSettings::resetToDefaults()
{
m_displayNames = true;
m_mapProvider = "osm";
m_mapBoxApiKey = "";
m_mapBoxStyles = "";
m_sources = -1;
m_title = "Map";
m_rgbColor = QColor(225, 25, 99).rgb();
m_useReverseAPI = false;
@@ -57,6 +69,10 @@ QByteArray MapSettings::serialize() const
SimpleSerializer s(1);
s.writeBool(1, m_displayNames);
s.writeString(2, m_mapProvider);
s.writeString(3, m_mapBoxApiKey);
s.writeString(4, m_mapBoxStyles);
s.writeU32(5, m_sources);
s.writeString(8, m_title);
s.writeU32(9, m_rgbColor);
s.writeBool(10, m_useReverseAPI);
@@ -85,6 +101,10 @@ bool MapSettings::deserialize(const QByteArray& data)
QString strtmp;
d.readBool(1, &m_displayNames, true);
d.readString(2, &m_mapProvider, "osm");
d.readString(3, &m_mapBoxApiKey, "");
d.readString(4, &m_mapBoxStyles, "");
d.readU32(5, &m_sources, -1);
d.readString(8, &m_title, "Map");
d.readU32(9, &m_rgbColor, QColor(225, 25, 99).rgb());
d.readBool(10, &m_useReverseAPI, false);