Public Member Functions | Static Public Attributes | Private Attributes | List of all members
tile_map::WmtsSource Class Reference

#include <wmts_source.h>

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

Public Member Functions

virtual size_t GenerateTileHash (int32_t level, int64_t x, int64_t y)
 
virtual QString GenerateTileUrl (int32_t level, int64_t x, int64_t y)
 
virtual QString GetType () const
 
 WmtsSource (const QString &name, const QString &base_url, bool is_custom, int32_t max_zoom)
 
- Public Member Functions inherited from tile_map::TileSource
virtual const QString & GetBaseUrl () const
 
virtual int32_t GetMaxZoom () const
 
virtual int32_t GetMinZoom () const
 
virtual const QString & GetName () const
 
virtual bool IsCustom () 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 ()
 

Static Public Attributes

static const QString WMTS_TYPE = "wmts"
 

Private Attributes

boost::hash< std::string > hash_
 

Additional Inherited Members

- Signals inherited from tile_map::TileSource
void ErrorMessage (const std::string &error_msg) const
 
void InfoMessage (const std::string &info_msg) const
 
- Protected Member Functions inherited from tile_map::TileSource
 TileSource ()
 
- Protected Attributes inherited from tile_map::TileSource
QString base_url_
 
bool is_custom_
 
int32_t max_zoom_
 
int32_t min_zoom_
 
QString name_
 

Detailed Description

Definition at line 40 of file wmts_source.h.

Constructor & Destructor Documentation

tile_map::WmtsSource::WmtsSource ( const QString &  name,
const QString &  base_url,
bool  is_custom,
int32_t  max_zoom 
)
explicit

Creates a new tile source from a set of known parameters.

Parameters
[in]nameA user-friendly display name
[in]base_urlThe base HTTP URL of the data source; e. g.: "http://tile.stamen.com/terrain/"
[in]is_customIf this is a custom (i. e. not one of the default) tile source; custom sources are saved and loaded from our settings
[in]max_zoomThe maximum zoom level

Definition at line 39 of file wmts_source.cpp.

Member Function Documentation

size_t tile_map::WmtsSource::GenerateTileHash ( int32_t  level,
int64_t  x,
int64_t  y 
)
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

Implements tile_map::TileSource.

Definition at line 56 of file wmts_source.cpp.

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

Given a zoom level and x and y coordinates appropriate for the tile source's projection, this will generate a URL that points to an image tile for that location.

This expects the URL to have three strings in it, "{level}", "{x}", and "{y}", which will be replaced with the passed values. See tile_map_plugin.cpp for example URLs.

Parameters
[in]levelThe zoom level
[in]xThe X coordinate of the tile
[in]yThe Y coordinate of the tile
Returns
A URL that references that tile

Implements tile_map::TileSource.

Definition at line 61 of file wmts_source.cpp.

QString tile_map::WmtsSource::GetType ( ) const
virtual

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

Returns

Implements tile_map::TileSource.

Definition at line 51 of file wmts_source.cpp.

Member Data Documentation

boost::hash<std::string> tile_map::WmtsSource::hash_
private

Definition at line 82 of file wmts_source.h.

const QString tile_map::WmtsSource::WMTS_TYPE = "wmts"
static

Definition at line 79 of file wmts_source.h.


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


tile_map
Author(s): Marc Alban
autogenerated on Thu Jun 6 2019 19:25:35