mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 07:20:04 +00:00 
			
		
		
		
	Provide initial map parameters to radar site list
This commit is contained in:
		
							parent
							
								
									9520d88eef
								
							
						
					
					
						commit
						6fc0bdbde9
					
				
					 1 changed files with 14 additions and 3 deletions
				
			
		|  | @ -409,11 +409,17 @@ void MapWidget::SetAutoRefresh(bool enabled) | |||
| 
 | ||||
| void MapWidget::SetMapParameters( | ||||
|    double latitude, double longitude, double zoom, double bearing, double pitch) | ||||
| { | ||||
|    if (p->map_ != nullptr && | ||||
|        (p->prevLatitude_ != latitude || p->prevLongitude_ != longitude || | ||||
|         p->prevZoom_ != zoom || p->prevBearing_ != bearing || | ||||
|         p->prevPitch_ != pitch)) | ||||
|    { | ||||
|       p->map_->setCoordinateZoom({latitude, longitude}, zoom); | ||||
|       p->map_->setBearing(bearing); | ||||
|       p->map_->setPitch(pitch); | ||||
|    } | ||||
| } | ||||
| 
 | ||||
| qreal MapWidget::pixelRatio() | ||||
| { | ||||
|  | @ -603,6 +609,11 @@ void MapWidget::initializeGL() | |||
|    p->map_->setCoordinateZoom({radarSite->latitude(), radarSite->longitude()}, | ||||
|                               7); | ||||
|    p->UpdateStoredMapParameters(); | ||||
|    emit MapParametersChanged(p->prevLatitude_, | ||||
|                              p->prevLongitude_, | ||||
|                              p->prevZoom_, | ||||
|                              p->prevBearing_, | ||||
|                              p->prevPitch_); | ||||
| 
 | ||||
|    QString styleUrl = qgetenv("MAPBOX_STYLE_URL"); | ||||
|    if (styleUrl.isEmpty()) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat