Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tile_map::TileSource Class Referenceabstract

#include <tile_source.h>

Inheritance diagram for tile_map::TileSource:
Inheritance graph
[legend]

Signals

void ErrorMessage (const std::string &error_msg) const
 
void InfoMessage (const std::string &info_msg) const
 

Public Member Functions

virtual size_t GenerateTileHash (int32_t level, int64_t x, int64_t y)=0
 
virtual QString GenerateTileUrl (int32_t level, int64_t x, int64_t y)=0
 
virtual const QString & GetBaseUrl () const
 
virtual int32_t GetMaxZoom () const
 
virtual int32_t GetMinZoom () const
 
virtual const QString & GetName () const
 
virtual QString GetType () const =0
 
virtual bool IsCustom () const
 
virtual bool IsReady () const
 
virtual void SetBaseUrl (const QString &base_url)
 
virtual void SetCustom (bool is_custom)
 
virtual void SetMaxZoom (int32_t max_zoom)
 
virtual void SetMinZoom (int32_t min_zoom)
 
virtual void SetName (const QString &name)
 
virtual ~TileSource ()
 

Protected Member Functions

 TileSource ()
 

Protected Attributes

QString base_url_
 
bool is_custom_
 
bool is_ready_
 
int32_t max_zoom_
 
int32_t min_zoom_
 
QString name_
 

Detailed Description

Represents a network source for map tiles; contains information about how to connect to the source and how to retrieve tiles from it.

Implementations of this should be specific to a type of map server such as WMS, WMTS, or TMS, and implement the appropriate methods for retrieiving tiles from those servers.

Definition at line 47 of file tile_source.h.

Constructor & Destructor Documentation

◆ ~TileSource()

virtual tile_map::TileSource::~TileSource ( )
inlinevirtual

Definition at line 51 of file tile_source.h.

◆ TileSource()

tile_map::TileSource::TileSource ( )
inlineprotected

Definition at line 106 of file tile_source.h.

Member Function Documentation

◆ ErrorMessage

void tile_map::TileSource::ErrorMessage ( const std::string &  error_msg) const
signal

◆ GenerateTileHash()

virtual size_t tile_map::TileSource::GenerateTileHash ( int32_t  level,
int64_t  x,
int64_t  y 
)
pure virtual

Generates a hash that uniquely identifies the tile from this source at the specified level and coordinates.

Parameters
levelThe zoom level
xThe X coordinate
yThe Y coordinate
Returns
A hash identifying the tile

Implemented in tile_map::BingSource, and tile_map::WmtsSource.

◆ GenerateTileUrl()

virtual QString tile_map::TileSource::GenerateTileUrl ( int32_t  level,
int64_t  x,
int64_t  y 
)
pure virtual

Generates an HTTP or HTTPS URL that refers to a map tile from this source at the given level and x and y coordinates.

Parameters
levelThe zoom level
xThe x coordinate
yThe y coordinate
Returns
A URL referring to the map tile

Implemented in tile_map::BingSource, and tile_map::WmtsSource.

◆ GetBaseUrl()

const QString & tile_map::TileSource::GetBaseUrl ( ) const
virtual

Definition at line 35 of file tile_source.cpp.

◆ GetMaxZoom()

int32_t tile_map::TileSource::GetMaxZoom ( ) const
virtual

Definition at line 55 of file tile_source.cpp.

◆ GetMinZoom()

int32_t tile_map::TileSource::GetMinZoom ( ) const
virtual

Definition at line 65 of file tile_source.cpp.

◆ GetName()

const QString & tile_map::TileSource::GetName ( ) const
virtual

Definition at line 75 of file tile_source.cpp.

◆ GetType()

virtual QString tile_map::TileSource::GetType ( ) const
pure virtual

Returns a string identifying the type of map source ("wmts", "bing", etc.)

Returns

Implemented in tile_map::BingSource, and tile_map::WmtsSource.

◆ InfoMessage

void tile_map::TileSource::InfoMessage ( const std::string &  info_msg) const
signal

◆ IsCustom()

bool tile_map::TileSource::IsCustom ( ) const
virtual

Definition at line 45 of file tile_source.cpp.

◆ IsReady()

virtual bool tile_map::TileSource::IsReady ( ) const
inlinevirtual

Definition at line 59 of file tile_source.h.

◆ SetBaseUrl()

void tile_map::TileSource::SetBaseUrl ( const QString &  base_url)
virtual

Definition at line 40 of file tile_source.cpp.

◆ SetCustom()

void tile_map::TileSource::SetCustom ( bool  is_custom)
virtual

Definition at line 50 of file tile_source.cpp.

◆ SetMaxZoom()

void tile_map::TileSource::SetMaxZoom ( int32_t  max_zoom)
virtual

Definition at line 60 of file tile_source.cpp.

◆ SetMinZoom()

void tile_map::TileSource::SetMinZoom ( int32_t  min_zoom)
virtual

Definition at line 70 of file tile_source.cpp.

◆ SetName()

void tile_map::TileSource::SetName ( const QString &  name)
virtual

Definition at line 80 of file tile_source.cpp.

Member Data Documentation

◆ base_url_

QString tile_map::TileSource::base_url_
protected

Definition at line 111 of file tile_source.h.

◆ is_custom_

bool tile_map::TileSource::is_custom_
protected

Definition at line 114 of file tile_source.h.

◆ is_ready_

bool tile_map::TileSource::is_ready_
protected

Definition at line 115 of file tile_source.h.

◆ max_zoom_

int32_t tile_map::TileSource::max_zoom_
protected

Definition at line 116 of file tile_source.h.

◆ min_zoom_

int32_t tile_map::TileSource::min_zoom_
protected

Definition at line 117 of file tile_source.h.

◆ name_

QString tile_map::TileSource::name_
protected

Definition at line 118 of file tile_source.h.


The documentation for this class was generated from the following files:


tile_map
Author(s): Marc Alban
autogenerated on Sun Sep 8 2024 02:27:24