Top |
ChamplainNetworkTileSourceChamplainNetworkTileSource — A map source that downloads tile data from a web server |
gint | max-conns | Read / Write |
gboolean | offline | Read / Write |
gchar * | proxy-uri | Read / Write |
gchar * | uri-format | Read / Write / Construct |
gchar * | user-agent | Write |
GObject ╰── GInitiallyUnowned ╰── ChamplainMapSource ╰── ChamplainTileSource ╰── ChamplainNetworkTileSource
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.
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 |
Since: 0.4
const gchar *
champlain_network_tile_source_get_uri_format
(ChamplainNetworkTileSource *tile_source
);
Default constructor of ChamplainNetworkTileSource.
A URI format used for URI creation when downloading tiles. See
champlain_network_tile_source_set_uri_format()
for more information.
Since: 0.6
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: "https://tile.openstreetmap.org/#Z#/#X#/#Y#.png"
Since: 0.4
gboolean
champlain_network_tile_source_get_offline
(ChamplainNetworkTileSource *tile_source
);
Gets offline status.
Since: 0.6
void champlain_network_tile_source_set_offline (ChamplainNetworkTileSource *tile_source
,gboolean offline
);
Sets offline status.
Since: 0.6
const gchar *
champlain_network_tile_source_get_proxy_uri
(ChamplainNetworkTileSource *tile_source
);
Gets the proxy uri used to access network.
Since: 0.6
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
gint
champlain_network_tile_source_get_max_conns
(ChamplainNetworkTileSource *tile_source
);
Gets the max number of allowed simultaneous connections for this tile source.
Since: 0.12.14
void champlain_network_tile_source_set_max_conns (ChamplainNetworkTileSource *tile_source
,gint max_conns
);
Sets the max number of allowed simultaneous connections for this tile source.
Before changing this remember to verify how many simultaneous connections your tile provider allows you to make.
Since: 0.12.14
void champlain_network_tile_source_set_user_agent (ChamplainNetworkTileSource *tile_source
,const gchar *user_agent
);
Sets the User-Agent header used communicating with the server.
Since: 0.12.16
struct ChamplainNetworkTileSource;
The ChamplainNetworkTileSource structure contains only private data and should be accessed using the provided API
Since: 0.6
“max-conns”
property“max-conns” gint
Specifies the max number of allowed simultaneous connections for this tile source.
Before changing this remember to verify how many simultaneous connections your tile provider allows you to make.
Owner: ChamplainNetworkTileSource
Flags: Read / Write
Allowed values: >= 1
Default value: 2
Since: 0.12.14
“offline”
property“offline” gboolean
Specifies whether the network tile source can access network
Owner: ChamplainNetworkTileSource
Flags: Read / Write
Default value: FALSE
Since: 0.4
“proxy-uri”
property“proxy-uri” gchar *
Used to override the default proxy for accessing the network.
Owner: ChamplainNetworkTileSource
Flags: Read / Write
Default value: ""
Since: 0.4
“uri-format”
property“uri-format” gchar *
The uri format of the tile source, see champlain_network_tile_source_set_uri_format
Owner: ChamplainNetworkTileSource
Flags: Read / Write / Construct
Default value: ""
Since: 0.4