![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
ChamplainNetworkTileSourceChamplainNetworkTileSource — A map source that downloads tile data from a web server |
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
);
GObject +----GInitiallyUnowned +----ChamplainMapSource +----ChamplainTileSource +----ChamplainNetworkTileSource
"offline" gboolean : Read / Write "proxy-uri" gchar* : Read / Write "uri-format" gchar* : Read / Write / Construct
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.
struct ChamplainNetworkTileSource;
The ChamplainNetworkTileSource structure contains only private data and should be accessed using the provided API
Since 0.6
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.
|
the map source's id |
|
the map source's name |
|
the map source's license |
|
the map source's license URI |
|
the map source's minimum zoom level |
|
the map source's maximum zoom level |
|
the map source's tile size (in pixels) |
|
the map source's projection |
|
the URI to fetch the tiles from, see champlain_network_tile_source_set_uri_format |
|
the ChamplainRenderer used to render tiles |
Returns : |
a constructed ChamplainNetworkTileSource object |
Since 0.4
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"
|
the ChamplainNetworkTileSource |
|
the URI format |
Since 0.4
const gchar * champlain_network_tile_source_get_uri_format
(ChamplainNetworkTileSource *tile_source
);
Default constructor of ChamplainNetworkTileSource.
|
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
void champlain_network_tile_source_set_offline (ChamplainNetworkTileSource *tile_source
,gboolean offline
);
Sets offline status.
|
the ChamplainNetworkTileSource |
|
TRUE when the tile source should be offline; FALSE otherwise |
Since 0.6
gboolean champlain_network_tile_source_get_offline
(ChamplainNetworkTileSource *tile_source
);
Gets offline status.
|
the ChamplainNetworkTileSource |
Returns : |
TRUE when the tile source is set to be offline; FALSE otherwise. |
Since 0.6
void champlain_network_tile_source_set_proxy_uri (ChamplainNetworkTileSource *tile_source
,const gchar *proxy_uri
);
Sets the proxy uri used to access network.
|
the ChamplainNetworkTileSource |
|
the proxy uri used to access network |
Since 0.6
const gchar * champlain_network_tile_source_get_proxy_uri
(ChamplainNetworkTileSource *tile_source
);
Gets the proxy uri used to access network.
|
the ChamplainNetworkTileSource |
Returns : |
the proxy uri |
Since 0.6
"offline"
property"offline" gboolean : Read / Write
Specifies whether the network tile source can access network
Default value: FALSE
Since 0.4
"proxy-uri"
property"proxy-uri" gchar* : Read / Write
The proxy uri used to access network
Default value: ""
Since 0.4
"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