mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:00:06 +00:00 
			
		
		
		
	Refactor QMapLibreGL to QMapLibre
This commit is contained in:
		
							parent
							
								
									db0d26a4ad
								
							
						
					
					
						commit
						1fd52f771c
					
				
					 55 changed files with 305 additions and 313 deletions
				
			
		|  | @ -15,13 +15,13 @@ namespace map | |||
| static const std::string logPrefix_ = "scwx::qt::map::radar_range_layer"; | ||||
| static const auto        logger_    = scwx::util::Logger::Create(logPrefix_); | ||||
| 
 | ||||
| static std::shared_ptr<QMapLibreGL::Feature> | ||||
| GetRangeCircle(float range, QMapLibreGL::Coordinate center); | ||||
| static std::shared_ptr<QMapLibre::Feature> | ||||
| GetRangeCircle(float range, QMapLibre::Coordinate center); | ||||
| 
 | ||||
| void RadarRangeLayer::Add(std::shared_ptr<QMapLibreGL::Map> map, | ||||
|                           float                             range, | ||||
|                           QMapLibreGL::Coordinate           center, | ||||
|                           const QString&                    before) | ||||
| void RadarRangeLayer::Add(std::shared_ptr<QMapLibre::Map> map, | ||||
|                           float                           range, | ||||
|                           QMapLibre::Coordinate           center, | ||||
|                           const QString&                  before) | ||||
| { | ||||
|    static const QString layerId = QString::fromStdString(types::GetLayerName( | ||||
|       types::LayerType::Data, types::DataLayer::RadarRange)); | ||||
|  | @ -37,7 +37,7 @@ void RadarRangeLayer::Add(std::shared_ptr<QMapLibreGL::Map> map, | |||
|       map->removeSource("rangeCircleSource"); | ||||
|    } | ||||
| 
 | ||||
|    std::shared_ptr<QMapLibreGL::Feature> rangeCircle = | ||||
|    std::shared_ptr<QMapLibre::Feature> rangeCircle = | ||||
|       GetRangeCircle(range, center); | ||||
| 
 | ||||
|    map->addSource( | ||||
|  | @ -49,19 +49,19 @@ void RadarRangeLayer::Add(std::shared_ptr<QMapLibreGL::Map> map, | |||
|    map->setPaintProperty(layerId, "line-color", "rgba(128, 128, 128, 128)"); | ||||
| } | ||||
| 
 | ||||
| void RadarRangeLayer::Update(std::shared_ptr<QMapLibreGL::Map> map, | ||||
|                              float                             range, | ||||
|                              QMapLibreGL::Coordinate           center) | ||||
| void RadarRangeLayer::Update(std::shared_ptr<QMapLibre::Map> map, | ||||
|                              float                           range, | ||||
|                              QMapLibre::Coordinate           center) | ||||
| { | ||||
|    std::shared_ptr<QMapLibreGL::Feature> rangeCircle = | ||||
|    std::shared_ptr<QMapLibre::Feature> rangeCircle = | ||||
|       GetRangeCircle(range, center); | ||||
| 
 | ||||
|    map->updateSource("rangeCircleSource", | ||||
|                      {{"data", QVariant::fromValue(*rangeCircle)}}); | ||||
| } | ||||
| 
 | ||||
| static std::shared_ptr<QMapLibreGL::Feature> | ||||
| GetRangeCircle(float range, QMapLibreGL::Coordinate center) | ||||
| static std::shared_ptr<QMapLibre::Feature> | ||||
| GetRangeCircle(float range, QMapLibre::Coordinate center) | ||||
| { | ||||
|    const GeographicLib::Geodesic& geodesic( | ||||
|       util::GeographicLib::DefaultGeodesic()); | ||||
|  | @ -71,7 +71,7 @@ GetRangeCircle(float range, QMapLibreGL::Coordinate center) | |||
| 
 | ||||
|    float angle = -angleDeltaH; | ||||
| 
 | ||||
|    QMapLibreGL::Coordinates geometry; | ||||
|    QMapLibre::Coordinates geometry; | ||||
| 
 | ||||
|    for (uint16_t azimuth = 0; azimuth <= 720; ++azimuth) | ||||
|    { | ||||
|  | @ -90,11 +90,11 @@ GetRangeCircle(float range, QMapLibreGL::Coordinate center) | |||
|       angle += angleDelta; | ||||
|    } | ||||
| 
 | ||||
|    std::shared_ptr<QMapLibreGL::Feature> rangeCircle = | ||||
|       std::make_shared<QMapLibreGL::Feature>( | ||||
|          QMapLibreGL::Feature::LineStringType, | ||||
|          std::initializer_list<QMapLibreGL::CoordinatesCollection> { | ||||
|             std::initializer_list<QMapLibreGL::Coordinates> {geometry}}); | ||||
|    std::shared_ptr<QMapLibre::Feature> rangeCircle = | ||||
|       std::make_shared<QMapLibre::Feature>( | ||||
|          QMapLibre::Feature::LineStringType, | ||||
|          std::initializer_list<QMapLibre::CoordinatesCollection> { | ||||
|             std::initializer_list<QMapLibre::Coordinates> {geometry}}); | ||||
| 
 | ||||
|    return rangeCircle; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat