ChamplainNetworkTileSource

ChamplainNetworkTileSource — A map source that downloads tile data from a web server

Synopsis

struct              ChamplainNetworkTileSource;
ChamplainNetworkTileSource * champlain_network_tile_source_new_full
                                                        (const gchar *id,
                                                         const gchar *name,
                                                         const gchar *license,
                                                         const gchar *license_uri,
                                                         guint min_zoom,
                                                         guint max_zoom,
                                                         guint tile_size,
                                                         ChamplainMapProjection projection,
                                                         const gchar *uri_format,
                                                         ChamplainRenderer *renderer);
void                champlain_network_tile_source_set_uri_format
                                                        (ChamplainNetworkTileSource *tile_source,
                                                         const gchar *uri_format);
const gchar *       champlain_network_tile_source_get_uri_format
                                                        (ChamplainNetworkTileSource *tile_source);
void                champlain_network_tile_source_set_offline
                                                        (ChamplainNetworkTileSource *tile_source,
                                                         gboolean offline);
gboolean            champlain_network_tile_source_get_offline
                                                        (ChamplainNetworkTileSource *tile_source);
void                champlain_network_tile_source_set_proxy_uri
                                                        (ChamplainNetworkTileSource *tile_source,
                                                         const gchar *proxy_uri);
const gchar *       champlain_network_tile_source_get_proxy_uri
                                                        (ChamplainNetworkTileSource *tile_source);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ChamplainMapSource
               +----ChamplainTileSource
                     +----ChamplainNetworkTileSource

Properties

  "offline"                  gboolean              : Read / Write
  "proxy-uri"                gchar*                : Read / Write
  "uri-format"               gchar*                : Read / Write / Construct

Description

This class is specialized for map tiles that can be downloaded from a web server. This includes all web based map services such as OpenStreetMap, Google Maps, Yahoo Maps and more. This class contains all mechanisms necessary to download tiles.

Some preconfigured network map sources are built-in this library, see ChamplainMapSourceFactory.

Details

struct ChamplainNetworkTileSource

struct ChamplainNetworkTileSource;

The ChamplainNetworkTileSource structure contains only private data and should be accessed using the provided API

Since 0.6


champlain_network_tile_source_new_full ()

ChamplainNetworkTileSource * champlain_network_tile_source_new_full
                                                        (const gchar *id,
                                                         const gchar *name,
                                                         const gchar *license,
                                                         const gchar *license_uri,
                                                         guint min_zoom,
                                                         guint max_zoom,
                                                         guint tile_size,
                                                         ChamplainMapProjection projection,
                                                         const gchar *uri_format,
                                                         ChamplainRenderer *renderer);

Constructor of ChamplainNetworkTileSource.

id :

the map source's id

name :

the map source's name

license :

the map source's license

license_uri :

the map source's license URI

min_zoom :

the map source's minimum zoom level

max_zoom :

the map source's maximum zoom level

tile_size :

the map source's tile size (in pixels)

projection :

the map source's projection

uri_format :

the URI to fetch the tiles from, see champlain_network_tile_source_set_uri_format

renderer :

the ChamplainRenderer used to render tiles

Returns :

a constructed ChamplainNetworkTileSource object

Since 0.4


champlain_network_tile_source_set_uri_format ()

void                champlain_network_tile_source_set_uri_format
                                                        (ChamplainNetworkTileSource *tile_source,
                                                         const gchar *uri_format);

A URI format is a URI where x, y and zoom level information have been marked for parsing and insertion. There can be an unlimited number of marked items in a URI format. They are delimited by "#" before and after the variable name. There are 3 defined variable names: X, Y, and Z.

For example, this is the OpenStreetMap URI format: "http://tile.openstreetmap.org/#Z#/#X#/#Y#.png"

tile_source :

the ChamplainNetworkTileSource

uri_format :

the URI format

Since 0.4


champlain_network_tile_source_get_uri_format ()

const gchar *       champlain_network_tile_source_get_uri_format
                                                        (ChamplainNetworkTileSource *tile_source);

Default constructor of ChamplainNetworkTileSource.

tile_source :

the ChamplainNetworkTileSource

Returns :

A URI format used for URI creation when downloading tiles. See champlain_network_tile_source_set_uri_format() for more information.

Since 0.6


champlain_network_tile_source_set_offline ()

void                champlain_network_tile_source_set_offline
                                                        (ChamplainNetworkTileSource *tile_source,
                                                         gboolean offline);

Sets offline status.

tile_source :

the ChamplainNetworkTileSource

offline :

TRUE when the tile source should be offline; FALSE otherwise

Since 0.6


champlain_network_tile_source_get_offline ()

gboolean            champlain_network_tile_source_get_offline
                                                        (ChamplainNetworkTileSource *tile_source);

Gets offline status.

tile_source :

the ChamplainNetworkTileSource

Returns :

TRUE when the tile source is set to be offline; FALSE otherwise.

Since 0.6


champlain_network_tile_source_set_proxy_uri ()

void                champlain_network_tile_source_set_proxy_uri
                                                        (ChamplainNetworkTileSource *tile_source,
                                                         const gchar *proxy_uri);

Sets the proxy uri used to access network.

tile_source :

the ChamplainNetworkTileSource

proxy_uri :

the proxy uri used to access network

Since 0.6


champlain_network_tile_source_get_proxy_uri ()

const gchar *       champlain_network_tile_source_get_proxy_uri
                                                        (ChamplainNetworkTileSource *tile_source);

Gets the proxy uri used to access network.

tile_source :

the ChamplainNetworkTileSource

Returns :

the proxy uri

Since 0.6

Property Details

The "offline" property

  "offline"                  gboolean              : Read / Write

Specifies whether the network tile source can access network

Default value: FALSE

Since 0.4


The "proxy-uri" property

  "proxy-uri"                gchar*                : Read / Write

The proxy uri used to access network

Default value: ""

Since 0.4


The "uri-format" property

  "uri-format"               gchar*                : Read / Write / Construct

The uri format of the tile source, see champlain_network_tile_source_set_uri_format

Default value: ""

Since 0.4