mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:10:04 +00:00
Add radar range circle. Web mercator projection meters are inaccurate. (~350km instead of 460km).
This commit is contained in:
parent
c1233cd984
commit
9b6582cd95
4 changed files with 83 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "map_widget.hpp"
|
||||
|
||||
#include <scwx/qt/map/radar_layer.hpp>
|
||||
#include <scwx/qt/map/radar_range_layer.hpp>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QColor>
|
||||
|
|
@ -66,7 +67,8 @@ void MapWidget::changeStyle()
|
|||
void MapWidget::AddLayers()
|
||||
{
|
||||
// QMapboxGL::addCustomLayer will take ownership of the QScopedPointer
|
||||
QScopedPointer<QMapbox::CustomLayerHostInterface> pHost(new RadarLayer(map_));
|
||||
QScopedPointer<QMapbox::CustomLayerHostInterface> pHost(
|
||||
new RadarLayer(map_));
|
||||
|
||||
QString before = "ferry";
|
||||
|
||||
|
|
@ -82,6 +84,7 @@ void MapWidget::AddLayers()
|
|||
}
|
||||
|
||||
map_->addCustomLayer("radar", pHost, before);
|
||||
RadarRangeLayer::Add(map_, before);
|
||||
}
|
||||
|
||||
void MapWidget::keyPressEvent(QKeyEvent* ev)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue