Top |
ChamplainNetworkTileSourceChamplainNetworkTileSource — A map source that downloads tile data from a web server |
Functions
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── ChamplainMapSource ╰── ChamplainTileSource ╰── ChamplainNetworkTileSource
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.
Functions
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.
Parameters
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 |
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 4 defined variable names: X, Y, Z, and TMSY for Y in TMS coordinates.
For example, this is the OpenStreetMap URI format: "http://tile.openstreetmap.org/#Z#/#X#/#Y#.png"
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.
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.
Since 0.6
champlain_network_tile_source_get_offline ()
gboolean
champlain_network_tile_source_get_offline
(ChamplainNetworkTileSource *tile_source
);
Gets offline status.
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
);
Override the default proxy for accessing the 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.
Since 0.6
Types and Values
struct ChamplainNetworkTileSource
struct ChamplainNetworkTileSource;
The ChamplainNetworkTileSource structure contains only private data and should be accessed using the provided API
Since 0.6
Property Details
The “offline”
property
“offline” gboolean
Specifies whether the network tile source can access network
Flags: Read / Write
Default value: FALSE
Since 0.4
The “proxy-uri”
property
“proxy-uri” gchar *
Used to override the default proxy for accessing the network.
Flags: Read / Write
Default value: ""
Since 0.4
The “uri-format”
property
“uri-format” gchar *
The uri format of the tile source, see champlain_network_tile_source_set_uri_format
Flags: Read / Write / Construct
Default value: ""
Since 0.4