mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:40:05 +00:00 
			
		
		
		
	Add map provider helper functions
This commit is contained in:
		
							parent
							
								
									6c5ec2d996
								
							
						
					
					
						commit
						ee99b51003
					
				
					 3 changed files with 178 additions and 0 deletions
				
			
		
							
								
								
									
										47
									
								
								scwx-qt/source/scwx/qt/map/map_provider.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								scwx-qt/source/scwx/qt/map/map_provider.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,47 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <scwx/util/iterator.hpp> | ||||
| 
 | ||||
| #include <string> | ||||
| 
 | ||||
| #include <QMapLibreGL/settings.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace map | ||||
| { | ||||
| 
 | ||||
| enum class MapProvider | ||||
| { | ||||
|    Mapbox, | ||||
|    MapTiler, | ||||
|    Unknown | ||||
| }; | ||||
| typedef util::Iterator<MapProvider, MapProvider::Mapbox, MapProvider::MapTiler> | ||||
|    MapProviderIterator; | ||||
| 
 | ||||
| struct MapStyle | ||||
| { | ||||
|    std::string              name_; | ||||
|    std::string              url_; | ||||
|    std::vector<std::string> drawBelow_; | ||||
| }; | ||||
| 
 | ||||
| struct MapProviderInfo | ||||
| { | ||||
|    MapProvider                             mapProvider_ {MapProvider::Unknown}; | ||||
|    std::string                             cacheDbName_ {}; | ||||
|    QMapLibreGL::Settings::SettingsTemplate settingsTemplate_ {}; | ||||
|    std::vector<MapStyle>                   mapStyles_ {}; | ||||
| }; | ||||
| 
 | ||||
| MapProvider            GetMapProvider(const std::string& name); | ||||
| std::string            GetMapProviderName(MapProvider mapProvider); | ||||
| std::string            GetMapProviderApiKey(MapProvider mapProvider); | ||||
| const MapProviderInfo& GetMapProviderInfo(MapProvider mapProvider); | ||||
| 
 | ||||
| } // namespace map
 | ||||
| } // namespace qt
 | ||||
| } // namespace scwx
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat