Public Member Functions | Static Public Attributes | Private Attributes
tile_map::WmtsSource Class Reference

#include <wmts_source.h>

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

List of all members.

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)

Static Public Attributes

static const QString WMTS_TYPE = "wmts"

Private Attributes

boost::hash< std::string > hash_

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 Aug 24 2017 02:46:24