#include <wmts_source.h>
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_ |
Definition at line 40 of file wmts_source.h.
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.
[in] | name | A user-friendly display name |
[in] | base_url | The base HTTP URL of the data source; e. g.: "http://tile.stamen.com/terrain/" |
[in] | is_custom | If this is a custom (i. e. not one of the default) tile source; custom sources are saved and loaded from our settings |
[in] | max_zoom | The maximum zoom level |
Definition at line 39 of file wmts_source.cpp.
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.
level | The zoom level |
x | The X coordinate |
y | The Y coordinate |
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.
[in] | level | The zoom level |
[in] | x | The X coordinate of the tile |
[in] | y | The Y coordinate of the 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.)
Implements tile_map::TileSource.
Definition at line 51 of file wmts_source.cpp.
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.