#include <MAP/GoogleMapSource.h>
Inheritance diagram for MAP::GoogleMapSource:
NOTE: This code is just a sample, Google's Static Maps service is not intended for use as a map tile server.
Public Member Functions | |
GoogleMapSource (GoogleMapKind mapKind) | |
virtual | ~GoogleMapSource () |
MapSourceKind | getSourceKind () const |
MAExtent | getTileSize () const |
int | getMagnificationMin () const |
int | getMagnificationMax () const |
void | getTileUrl (char *buffer, MapTileCoordinate tileXY) |
MapTileCoordinate | lonLatToTile (LonLat lonlat, int magnification) |
PixelCoordinate | lonLatToPixel (LonLat lonlat, int magnification) |
LonLat | tileCenterToLonLat (const int tileSize, const MapTileCoordinate &tile, const double offsetX, const double offsetY) |
void | requestTile (const MapTileCoordinate tileXY, IMapSourceListener *listener, MapSourceClientData *clientData) |
void | clearQueue () |
void | finishedDownloading (Downloader *downloader, MAHandle data) |
void | downloadCancelled (Downloader *downloader) |
void | error (Downloader *downloader, int code) |
virtual void | notifyProgress (Downloader *downloader, int downloadedBytes, int totalBytes) |
virtual bool | outOfMemory (Downloader *downloader) |
Static Public Attributes | |
static const char * | ApiKey |
|
Creates a GoogleMapSource of the specified map kind. |
|
|
|
Returns source kind Implements MAP::MapSource. |
|
Returns tile size Implements MAP::MapSource. |
|
Returns minimum magnification Implements MAP::MapSource. |
|
Returns maximum magnification Implements MAP::MapSource. |
|
Returns URL for retrieving a tile Implements MAP::MapSource. |
|
Converts LonLat to tile coordinates for a tile that contains the lonlat point. Implements MAP::MapSource. |
|
Converts LonLat to a pixel coordinate, in a global pixel grid Implements MAP::MapSource. |
|
Convert tile center plus pixel offset to WGS84 lat/lon. Implements MAP::MapSource. |
|
Returns all tiles required to cover specified rectangle around centerpoint. |
|
Clears any queued requests |
|
Called when all data has been downloaded.
Implements MAUtil::DownloadListener. |
|
Called if the download has been cancelled.
Implements MAUtil::DownloadListener. |
|
Called if an error occured.
Implements MAUtil::DownloadListener. |
|
Called when some data has been downloaded to notify about the progress of the download.
|
|
Called if the Downloader runs out of memory. Try to free some resource memory. If you managed to free some, return true to make the Downloader try again. If you can't free any more, return false to make the Downloader fail with CONNERR_DOWNLOADER_OOM. The default implementation does nothing and returns false. |
|
Google Static Maps reqires a registered API key. see http://code.google.com/apis/maps/documentation/staticmaps/ for details. NOTE: Assign your registered key string to GoogleMapSource::ApiKey before using this map source. |