mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 08:40:06 +00:00 
			
		
		
		
	QMapLibre feature and layer interface updates
This commit is contained in:
		
							parent
							
								
									ef83c41c0f
								
							
						
					
					
						commit
						21088a5ace
					
				
					 2 changed files with 6 additions and 7 deletions
				
			
		|  | @ -401,16 +401,16 @@ AddAlertLayer(std::shared_ptr<QMapLibre::Map> map, | |||
| 
 | ||||
|    const float opacity = outlineColor[3] / 255.0f; | ||||
| 
 | ||||
|    map->addLayer({{"id", bgLayerId}, {"type", "line"}, {"source", sourceId}}, | ||||
|                  beforeLayer); | ||||
|    map->addLayer( | ||||
|       bgLayerId, {{"type", "line"}, {"source", sourceId}}, beforeLayer); | ||||
|    map->setLayoutProperty(bgLayerId, "line-join", "round"); | ||||
|    map->setLayoutProperty(bgLayerId, "line-cap", "round"); | ||||
|    map->setPaintProperty(bgLayerId, "line-color", "rgba(0, 0, 0, 255)"); | ||||
|    map->setPaintProperty(bgLayerId, "line-opacity", QString("%1").arg(opacity)); | ||||
|    map->setPaintProperty(bgLayerId, "line-width", "5"); | ||||
| 
 | ||||
|    map->addLayer({{"id", fgLayerId}, {"type", "line"}, {"source", sourceId}}, | ||||
|                  beforeLayer); | ||||
|    map->addLayer( | ||||
|       fgLayerId, {{"type", "line"}, {"source", sourceId}}, beforeLayer); | ||||
|    map->setLayoutProperty(fgLayerId, "line-join", "round"); | ||||
|    map->setLayoutProperty(fgLayerId, "line-cap", "round"); | ||||
|    map->setPaintProperty(fgLayerId, | ||||
|  | @ -431,7 +431,7 @@ CreateFeature(const awips::CodedLocation& codedLocation) | |||
| { | ||||
|    auto mapboxCoordinates = GetMapboxCoordinates(codedLocation); | ||||
| 
 | ||||
|    return { | ||||
|    return QMapLibre::Feature { | ||||
|       QMapLibre::Feature::PolygonType, | ||||
|       std::initializer_list<QMapLibre::CoordinatesCollection> { | ||||
|          std::initializer_list<QMapLibre::Coordinates> {{mapboxCoordinates}}}}; | ||||
|  |  | |||
|  | @ -44,8 +44,7 @@ void RadarRangeLayer::Add(std::shared_ptr<QMapLibre::Map> map, | |||
|       "rangeCircleSource", | ||||
|       {{"type", "geojson"}, {"data", QVariant::fromValue(*rangeCircle)}}); | ||||
|    map->addLayer( | ||||
|       {{"id", layerId}, {"type", "line"}, {"source", "rangeCircleSource"}}, | ||||
|       before); | ||||
|       layerId, {{"type", "line"}, {"source", "rangeCircleSource"}}, before); | ||||
|    map->setPaintProperty(layerId, "line-color", "rgba(128, 128, 128, 128)"); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat